# TORCS 1.3.2 Download & Installation

- Binary installer for Windows (32 and 64 bit)
- Linux binary with installer (1.3.0)
- MacOS X Package (1.2.4)
- For Linux and FreeBSD from sources (all in one package)
- For Windows from sources (all in one package)
- For Linux from sources (separated packages)
- For Linux from CVS
- TORCS for your Linux distribution

## Binary Installer Package For Windows

- Download and run torcs_1.3.2_setup.exe. It requires at least an i686 compatible CPU to run.

## Linux Binary with Installer (1.3.0)

This binary is dynamically linked, be aware that it is possible that this does not work on your system. If you try it anyway please report any problems or as well successful installs, such that we can improve it (without feedback this is not possible, of course the installer works on our systems). You can get it here. Install it with "torcs-1.3.0-linux-glibc-2.3-pIII.bz2.run". To resolve missing dynamic libraries you can run "torcs -l" (have a look at the command line options). It requires at least a Pentium 3 compatible CPU to run.

## MacOS X Package (1.2.4)

- Review the release notes.
- Download Torcs.dmg.gz.

## For Linux and FreeBSD from "all-in-one" Source Package

1. Check the dependencies
2. Download the source package torcs-1.3.2.tar.bz2.
3. Unpack the package with "tar xfvj torcs-1.3.2.tar.bz2".
4. Run the following commands:

       $ cd torcs-1.3.2
       $ ./configure        # --prefix="target dir", --enable-debug or --disable-xrandr might be of interest
       $ make
       $ make install
       $ make datainstall

   Default installation directories:

   - `/usr/local/bin` - TORCS command (directory should be in your PATH)
   - `/usr/local/lib/torcs` - TORCS dynamic libs (directory MUST be in your LD_LIBRARY_PATH if you don't use the torcs shell)
   - `/usr/local/share/games/torcs` - TORCS data files
5. Run the "torcs" command (default location is /usr/local/bin/torcs), you can use those command line options.
   All the configuration data, race results and players options will be saved below the `$HOME/.torcs` directory.

## For Windows From "all-in-one" Source Package

1. Requires VS 6.0 (tested with sp6) or VS 2008 (tested with sp1).
2. Download the source package torcs-1.3.2.tar.bz2.
3. Unpack the package with "tar xfvj torcs-1.3.2.tar.bz2" or any application you like, be careful to select a path without whitespaces and other special characters.
4. Hint: You can build a release and a debug version side by side, the required step for the debug version is showed in brackets "()".
5. Open a command prompt and cd into the torcs-1.3.2 directory.
6. Run setup_win32.bat (setup_win32_debug.bat).
7. Run setup_win32-data-from-CVS.bat (setup_win32-data-from-CVS_debug.bat).
8. Open the file TORCS.dsw with VS 6.0 or the TORCS.sln with VS 2008.
9. Select the TORCS project and the win32-Release (win32-Debug) version.
10. Compile the project (0 warnings).
11. cd into the "runtime" ("runtimed") directory.
12. Run "wtorcs.exe".

## For Linux From Separated Source Packages

1. Check the dependencies
2. Download the following source packages:
   - TORCS-1.3.2-src.tgz (mandatory)
   - TORCS-1.3.2-src-robots-base.tgz (mandatory)
3. Unpack the packages (tar xvfz filename.tgz)
4. Run the following commands:

       $ cd torcs-1.3.2
       $ ./configure        # --prefix="target dir", --enable-debug or --disable-xrandr might be of interest
       $ make
       $ make install

   Default installation directories:

   - `/usr/local/bin` - TORCS command (directory should be in your PATH)
   - `/usr/local/lib/torcs` - TORCS dynamic libs (directory MUST be in your LD_LIBRARY_PATH if you don't use the torcs shell)
   - `/usr/local/share/games/torcs` - TORCS data files
5. Download the following data packages:
   - TORCS-1.3.2-data.tgz (mandatory, system data)
   - TORCS-1.3.2-data-tracks-road.tgz (mandatory, road-circuit tracks)
   - TORCS-1.3.2-data-tracks-oval.tgz (mandatory, oval-like tracks)
   - TORCS-1.3.2-data-tracks-dirt.tgz (mandatory, dirt tracks)
   - TORCS-1.3.2-data-cars-extra.tgz (mandatory, cars)
   - TORCS-1.3.2-data-cars-Patwo-Design.tgz (rally cars, optional)
   - TORCS-1.3.2-data-cars-kcendra-gt.tgz (GT cars from the 60's, optional)
   - TORCS-1.3.2-data-cars-kcendra-roadsters.tgz (roadsters from the 60's, optional)
   - TORCS-1.3.2-data-cars-kcendra-sport.tgz (sport cars from the 60's, optional)
6. Go to the `/usr/local/share/games/torcs` or `"target dir"/share/games/torcs` directory.
7. Untar the data packages.
8. Run the "torcs" command (default location is /usr/local/bin/torcs), you can use those command line options.
   All the configuration data, race results and players options will be saved below the `$HOME/.torcs` directory.

For more detailed installation instructions have a look at Bernhard "Berniw" Wymann's site.

## Linux From Sources CVS

You'll need those dependencies

### Getting the sources

You have to run the following commands to get the sources (might sometimes not compile or crash):

`cvs -d:pserver:anonymous@torcs.cvs.sourceforge.net:/cvsroot/torcs login`
The 1.3.1 trunk is:
`cvs -z3 -d:pserver:anonymous@torcs.cvs.sourceforge.net:/cvsroot/torcs co -r r1-3-1 -P torcs`
Get more info on CVS

### Compiling

Run the following commands:

    $ cd torcs/torcs
    $ ./configure        # --prefix="target dir", --enable-debug or --disable-xrandr might be of interest
    $ make
    $ make install
    $ make datainstall

Default installation directories:

- `/usr/local/bin` - TORCS command (directory should be in your PATH)
- `/usr/local/lib/torcs` - TORCS dynamic libs (directory MUST be in your LD_LIBRARY_PATH if you don't use the torcs shell)
- `/usr/local/share/games/torcs` - TORCS data files

Run the "torcs" command (default location is /usr/local/bin/torcs), you can use those command line options.
All the configuration data, race results and players options will be saved below the `$HOME/.torcs` directory.

## Dependencies

### Requisites for Linux

> You will need:
> - Hardware accelerated OpenGL (usually provided by your distro).
> - GLUT 3.7.
> - Or FreeGlut (better for full screen support than GLUT, usually provided by your distro).
> - PLIB 1.8.5 version.
> - OpenAL (usually provided by your distro).
> - libpng and zlib (usually provided by your distro).
> - libogg/vorbis (usually provided by your distro).

## TORCS Command Line Options

- -l list the dynamically linked libraries
- -d run under gdb and print stack trace on exit, makes most sense when compile with --enable-debug
- -e display the commands to issue when you want to run under gdb
- -s disable multitexturing, important for older graphics cards
- -m use X mouse cursor and do not hide it during races

## TORCS for your Linux distribution

TORCS has been adopted from a lot of distributions (e.g. SuSE, Debian, Fedora, Mandriva, Gentoo, ...), have a look at your installation CD's/DVD's or online repositories. Be aware that some of these versions are quite old or have been stripped down to reduce the package size.