MG/Linux Compiling

Linux Compiling:

1. Get the project from SVN using the commandline or your favorite SVN tool (rabbitvcs or tortoise)

2. Download package dependencies for your Linux distribution (see mk/linux/setupBuildDeps.sh which can do that for Debian, Ubuntu, Fedora and Open SuSE based distro's). The following is the current dependency list:

jpeg, lua5.1, png, SDL, openal, curl, xerces-c, ogg, vorbis, vorbisfile, vorbisenc, z, GL, GLU, SDLmain, 'ircclient' (and the tools require wx)

3.1 Build using CMake by Script

Go to the directory megaglest.


 * On linux run build-mg.sh


 * On windows run build-mg.bat


 * To compile for windows under linux run build-mg-win32.sh

3.2 Build using CMake by Hand

a. Open a terminal window and navigate to trunk (or the specified branch) and type the following: mkdir build cd build cmake .. make b. If nothing goes wrong you will see glest.bin (and other binaries) in the same folder (mk/linux). Notes:

The follow are build types supported using cmake: Release, Debug, RelWithDebInfo and MinSizeRel To change the build type execute cmake as follows (default is Release): cmake -D CMAKE_BUILD_TYPE=Debug .. 4. (Optional) Cross Compiling Windows binaries on Linux using MingW:

a) Download and extract the MingW win32 dependency archive from here and extract under the source folder.

b) Install the MingW cross compiler for your distro. In Ubuntu run:

sudo apt-get install mingw32 mingw32-binutils mingw32-runtime c) Open a terminal and cd to the root folder of your Mega-Glest folder (usually trunk)

d) Modify the script: You also need to change win32_deps/curl-7.20.1 to win32_deps/curl-7.21.3 e) Run the script:

./build-mg-win.sh f) If all goes well you should see the Windows *.exe binaries produced in the data/glest_game folder.

5. Test binaries

1. To test running the game, run the binary in mk/linux like this: ./glest.bin

These are some commandline options: ./glest.bin --help ./glest.bin --version ./glest.bin --opengl-info

There are some more useful scripts here: Misc Scripts