First Start Network Play Configuration FAQ Bugs Todo List Changelog Compilation

Compilation

If you want to compile Armagetron, this is what you need:

Linux Compilation

To compile Armagetron in a Linux environment, simply change to the main Armagetron directory and type

CXXFLAGS="<your favorite C++ flags>" ./configure
make

and you are done. If configure produced error messages, you probably do not have all the libraries you need; look hard at the error message, then check the file LIBS to see where you can get the missing libs. If make gave you errors, well... Mail me it's output or try to fix them yourself and send me a patch.

To install Armagetron, you need to be root and type

make install

and Armagetron will be installed in /usr/local/games/armagetron (Program, Data and Configuration files) and /usr/local/bin (Launcher). You can change the prefix (/usr/local) it will be in by supplying the command line option --prefix <prefix> ,
You may then clean up the installation directory by typing
make clean
(Delete compilation result, but keep configuration),
make distclean
(Restore everything to the state you got it in)
or just delete the directory you built in.

To run ArmageTron, you just type

armagetron
Your personal configuration and logs will be stored in the Directory
~.armagetron
.
To learn about command line options, type
armagetron -h
.

To uninstall Armagetron, you need to be root again and type

armagetron --uninstall
; this will remove the program, data, global configuration and launcher from your system. The user specific configuration files in
~.armagetron
will stay untouched, however.

I fear I have to apologize for the crude configuration script: it is my first project using this technique and it is probably full of bugs. If you have problems with it, simply send me the config.log (or fix the configure.in yorself if you can and mail me the changes; that would really be nice.)

To compile a dedicated server, use

./configure --disable-glout
insead of ./configure

Compiler Issues

I use gcc version 2.95.2 from gcc.gnu.org for linux compilation resp. visual c++ 6.0 for the Windows version. Your chances of success are best if you have exactly the same configuration.

gcc 2.96.x seemed to complain about about exception specifications in the memory manager. I hope I fixed them, but I am not sure.

gcc 3.0 now should works fine.

egcs 2.91.66 was reported to cause crashes right after start. IŽll try to investigate.

Everything before or equal to gcc 2.7.2.3 does NOT work; the corresponding c++ library is not compatible with SDL or the threads library, and exchanging the library alone does not help.

Maybe it was my fault, but pgcc from goof.com/pcg/ produced code that crashed every time an exception was thrown... Exceptions are only used in server mode to avoid a nasty way malevolent clients can block the server. Therefore, you still can use pgcc (tested: 2.95.2 and 2.95.3) to compile Armagetron, but exception handling will be disabled and you will be vulnerable to this attack. In a LAN game with friends, that should not be a problem.

Creating redistributables

In the main directory, tpye

make bindist

Advanced Compilation

If you wish to compile ArmageTron in a directory different from the location of the source, just create this directory, cd to it and tpye

{Path to source}/configure
make
and you are done.

Compiling for Win9x

If you are using Linux/GCC, simply read on in the next paragraph. If you are using Windows/MSVC++, the easiest way to get Armagetron compiled is to grab my complete development system from the windows download page. I'm too lazy to describe the hard way.

So you decided to build your own version of ArmageTron for Windows. Be warned: there lies a long and rocky path before you...

To compile ArmageTron for Win9x, you will need a Unix, a C++ cross-compiler and cross-compiled versions off all the libraries. Alternatively, get my development environment from the windows download page for MS Visual C++.

The cross compiler:

I use the Mingw32-version of gcc 2.95.2. Check www.devolution.com/~slouken/SDL/Xmingw32/index.html to learn how to install and configure it.
If that does not really help, you may try the GnuC++Win32-Page.

To use the cross compiler, you simply type

EXPORT PATH={prefix}/i386-mingw32/bin:%PATH
{do, whatever you would normally do, i.e. ./configute; make}
where {prefix} usually is /usr/local/cross-tools.

The libraries:

Check above for the sourcecode download locations. You can build all libraries from source (to test the compiler), but there are also binaries out there (://www.slothmud.org/~hayward/Xmingw32/). I chose to download the binary version of SDL (it saves a lot of work, i think), but built the other libs from source.

With libpng, there is a small problem: the Makefile fails to create libpng.a. You have to do it by hand typing

ar rcs libpng.a *.o

Compilation:

After all the work above is done, this is as easy as it can be: set up your cross compiler, i.e. by typing

EXPORT PATH=/usr/local/cross-tools/i386-mingw32/bin:%PATH
then follow the instructions above (normal case: type ./configure ; make), copy or link your version of SDL.DLL to your build directory. Execute armagetron.exe to play.
Type
make bindist
to recreate the files of the binary distribution in the directory bindist. Move it anywhere you want.


This document was created by Manuel Moos.

Last modification: Fri May 24 06:36:39 CEST 2002

First Start Network Play Configuration FAQ Bugs Todo List Changelog Compilation