First Start | Installation | Network Play | Configuration | FAQ | Redistribution

# Installation

## General comments

All installation has to be carried out as root. Installation from a source archive is recommended, as Armagetron will be tailored for your system and missing libraries will be identified and pointed out to you. Only as a last resort, you should choose the binary archives. The binary RPMs and Debian packages are a reasonable choice if your system supports them and you can get hold of the corresponding library packages in the right versions.

The executable should not be started directly, as it will not find its data files. Instead, call the scripts installed in /usr/local/bin.

It is very important that Armagetron and all of its dependencies are built with the same compiler. The different versions of gcc tend to be slightly binary incompatible with each other, and on complex projects like this one these small glitches tend to cause unexplainable problems. The distributed binaries are compiled with gcc 2.95.3, sometimes I do tests with gcc 3.3 and gcc 3.2.2.

## Required libraries

- OpenGL or Mesa for rendering
- SDL version 1.2.x (Simple Direct Media Layer) for input and sound output
- SDL_image version 1.2.x for the textures which itself needs the libs
- pnglib and zlib (they should be included in your distribution)
- Optional: SDL_mixer
- Binary versions only: libstdc++-libc6.2-2.so.3. Use rpmfind or google to find a RPM with that library for your system. Sorry, Debian users: I don't know what you need to do; use the source packages instead.

## Installation

### Source archive

Unpack the archive and change into the unpacked directory; type

    ./configure
    gmake install

Everything will be copied to /usr/local/games/armagetron. Should there already be a version, make will fail; use gmake update. If gmake is not found on your system, try make; however, only GNU make is supported. To build the dedicated server, add the option --disable-glout to the configure script. To change the installation path, use the option --prefix=new_path. Type

    armagetronad --uninstall

to uninstall.

Please report it if this procedure gives you errors you cannot resolve; the goal is to make it work on as many systems as possible.

### Binary RPM

Type

    rpm -i filename.rpm

The RPM build is quite untested, so it may be that it has registered too many dependencies and you are not allowed to install it; you may use the additional switch --nodeps to ignore these errors. However, you may then end up with a broken installation.
The documentation can then found in /usr/share/doc/packages/armagetron. To uninstall, type

    rpm -e armagetron

### Source RPM

Type

    rpm --rebuild filename.src.rpm

This should build binary RPMs suitable for your system in /usr/src/redhat/RPMS/i386 ( RedHat ) resp. /usr/src/packages/RPMS/i386 ( SuSE ); you may have to look into the other subdirectories of RPMS to find them. Proceed as described in the previous paragraph.
Alternatively, type

    rpm -i filename.src.rpm

This should extract a source package in /usr/src/.../SOURCES you can handle like described in the first section. You can surely ignore all failed dependencies with --nodeps since the dependencies were all there when you built the package. ( It is possible, if not likely, that the automatic dependency generation of RPM produces junk. )

### Binary archive

Unpack the archive and change into the unpacked directory; type

    ./install

Everything will be copied to /usr/local/games/armagetron. Type

    armagetronad --uninstall

to uninstall.

## Dedicated Server

To install the dedicated server from binaries, follow all the procedures above with the corresponding download files; the server will be installed in usr/local/games/armagetronad_dedicated and can be invoked by

    armagetronad_dedicated

If you want it to run in the background, start it with the command line

    armagetronad_dedicated --daemon

The dedicated server will read its configuration from /usr/local/games/armagetronad_dedicated/config and ~/.armagetron/var.

## Result

The contents of the installation directory should be something like this:

bin | (the directory with the executables and scripts)
models | (the directory for the cycle models)
sound | (the directory for sound files)
textures | (the directory for textures and the icon)
doc | (the documentation you are just reading)
language | (the game's text messages)
config | (static configuration files)
var | (game logs and custom configuration)

The system wide configuration is stored in

Additionally, if you installed the moviepack/moviesounds from the addons page, you'll see the two directories

moviepack
moviesounds

containing ONLY files and no subdirectories. When you have run Armagetron Advanced, you'll see the additional files

highscores.txt,ladder.txt,won_matches.txt and won_rounds.txt | (score statistics files)
user.cfg | (Armagetron Advanced custom configuration file)

Inside ~/.armagetron/var, You may want to create your own configuration files

autoexec.cfg | (config file read at every start)

inside ~/.armagetron/var or the config subdirectory for your custom modifications; that way, they don't get overwritten by the defaults the next time you install an update.

### Command line switches

-h, +h, --help | get help
-v, +v, --version | print version number
--datadir <Directory> | systemwide data directory; read game data (textures, sounds and text) from this directory.
--userdatadir <Directory> | user data dir; try to read all game data from this directory first.
--configdir <Directory> | read game configuration (.cfg-files) from this directory.
--userconfigdir <Directory> | user configuration directory; try to read the configuration from here first.
--vardir <Directory> | save game logs, highscores and user configuration in this directory.
-f, +f, --fullscreen | start in fullscreen mode
-w, +w, --window, --windowed | start in windowed mode
-d, +d, --daemon | allow the dedicated server to run as a daemon (will not poll for input on stdin)

The various directories you can set have the following impact on how the game loads and saves files.( Usually, you don't have to bother about it; there are reasonable defaults. But if you want to do some meddling with the data, these options are your ticket. )

#### Data

Sounds, textures and models will be first looked for in the directory specified with --userdatadir. If they are not found there or if --userdatadir was not used, they are looked for in the directory specified with --datadir. This directory defaults to the current directory if not specified.

#### Configuration

(I'll leave out the bits about "if option xxx is not set" from now on ) Configuration files are first looked for in --userconfigdir, then --userdatadir/config ( the dir passed to --userdatadir, appended with /config ), then --configdir and finally --datadir/config.

#### Logs and user configuration

Log files ( game results, the settings made in the in game menu ) are loaded from --vardir, then, if not found there, from --userdatadir/var and finally from --datadir/var. They are only saved in the first of these directories that was specified.

The starter scripts will use the options --datadir /usr/local/games/armagetronad --userdatadir ~/.armagetronad --configdir /etc/armagetronad. So, your personal configuration will sit in ~.armagetron/var.

## Play

Type

    armagetronad

as a normal user to play.

In case you want to install a permanent server: in /usr/local/games/armagetronad_dedicated/rc.d is a a System V init script; putting soft link to it into /etc/init.d/... will start the server as the user "armagetron" as a background process when your system starts. Feel free to adapt it to your needs.

This document was created by Manuel Moos

Last modification: Mon Mar 6 15:57:29 UTC 2006

First Start | Installation | Network Play | Configuration | FAQ | Redistribution