Compile WarMUX
Redirect from Compile wormux
Table of contents
WarMUX works on Linux, FreeBSD, OpenBSD, NetBSD, PowerPC and Windows.
It is reported to build on the following architectures: alpha, amd64, arm, hppa, i386, ia64, mipsel, powerpc, s390 and sparc
To compile it, first download source code. You have two choice:
- Stable release on download page
- Development version using Subversion
If you are using Windows, please see Compile WarMUX on Windows page.
Dependencies
Generic dependencies
These dependencies are common to all C++ projects :
- GNU make
- GNU g++ (3.0 ?)
WarMUX dependencies
- libxml2
- SDL 1.2 (debian: libsdl1.2-dev
- SDL Image 1.2 (debian: libsdl-image1.2-dev)
- depends on libjpeg
- depends on libpng
- SDL Mixer 1.2 (debian: libsdl-mixer1.2-dev)
- depends on libogg
- depends on libvorbis and libvorbisfile
- SDL TTF 2.0 (debian: libsdl-ttf2.0-dev)
- depends on libfreetype
- depends on libfreetype
- SDL_gfx 2.0.22 (debian: libsdl-gfx1.2-dev)
- SDL_net 1.2.6 (debian: libsdl-net1.2-dev)
- Fribidi (optional, debian: libfribidi-dev)
Subversion version dependencies
If you use the get the source code using Subversion, you will also need :
- autoconf (2.53 ?)
- automake 1.5+
- aclocal 1.5+
- autoheader
Compilation
Stable version
If you use the stable version of source code :
- Extract archive
- Type following commands :
Code BASH :./configure make sudo make install # or su -c "make intall"
Subversion's version
If you use Subversion's version, we will assume you want to modify or study WarMUX source code.
- Type the following command in the WarMUX directory:
Code BASH :./autogen.sh ./configure --enable-debug make
- Then instead of installing the game, you can set the data path:
Code BASH :export WARMUX_DATADIR=./data export WARMUX_FONT_PATH=./data/font/DejaVuSans.ttf
You can also add these commands in your ".bashrc" file.
- Finally, you can run the game directly or from gdb
Code BASH :src/warmux
Code BASH :gdb src/warmux
Configuration
Some interesting ./configure options
- ./configure --help: Display configure help
- ./configure --enable-debug: Enable all debug things (assertions, compile including symbols and file name, etc.), useful to debug Wormux
- ./configure --prefix=/usr: Install WarMUX in /usr instead of /usr/local
- copy binary in /usr/bin
- copy data in /usr/share/games/warmux
- copy locales in /usr/share/locale
- ./configure --with-datadir-name=warmux: Use old config (don't use games sub-directory)
- copy binary in /usr/local/bin
- copy data in /usr/local/share/warmux
- copy locales in /usr/local/share/locale
- ./configure --bindir /usr/local/games: Copy warmux binary in /usr/local/games instead of $PREFIX/bin
- ./configure --with-font-path=./data/font/DejaVuSan.ttf: Set path to the ttf font used by WarMUX, maybe if stored in a subdirectory.
Troubles
Troubles with SDL_gfx directories ?
If you see this message during ./configure step:
Code TEXT :
checking for SDL_rotozoom.h... no configure: error: SDL_gfx library headers are missing
You can use following command:
Code BASH :
$ ./configure --with-sdl-gfx-prefix=/usr/local
And, if you get another error message when you try to run WarMUX:
Code TEXT :
warmux: error while loading shared libraries: libSDL_gfx.so.13: cannot open shared object file: No such file or directory
You can use following command:
Code BASH :
LD_LIBRARY_PATH=/usr/local/lib ./warmux
Better solution: install SDL_gfx in /usr instead of /usr/local ;-)
New files are not compiled
If you modify WarMUX and add cpp files in source code, you will need to :
- Add a line in src/Makefile.am (see existing line for syntax)
- Run ./autogen.sh, ./configure once again. If you don't use Subversion version, you will not have "./autogen.sh" file : in this case, you must use the Subversion version to regenerate your "configure" file.
For an easy to follow Ubuntu Guide Click Here...
This page has been seen 32819 times
Tools
Contribute