The Glest Wiki

Those informations are/may be very outdated, please go to: new wiki

This page explains how to compile MegaGlest on Linux platforms.

Recommended way: Scripted build[]

  • Change into the top level project directory (megaglest-source/).
  • You should have a mk/linux/ subdirectory there, change into this:
    cd mk/linux
  • Install / update the build dependencies:
    sudo ./
    If your Linux distribution is not supported or you prefer to install dependencies manually, check below.
  • Start the build:
  • To start MegaGlest do:


  • Download the project from the GIT repository using the command line or your favorite GIT tool (such as RabbitVCS or TortoiseGIT).
  • Download build dependencies. These are usally packaged by Linux distributions. On Debian, Ubuntu, Fedora, Opensuse and even more Linux distributions you may use mk/linux/ to install them. If your distribution is not supported or you prefer to install yourself: This is the current dependency list - where packages are available, the package names may start wih lib and usually have -dev(el) towards the end:
    • jpeg
    • png
    • lua5.1
    • SDL
    • SDLmain
    • curl
    • openal
    • ogg
    • vorbis
    • vorbisfile
    • vorbisenc
    • alut
    • z
    • GL
    • GLU
    • glew-dev
    • ircclient
    • ftgl
    • miniupnpc
    • fribidi
  • Additionally for map editor and model viewer:
    • wxbase2.8
    • wxgtk2.8
    • gtk2.0-dev
    • xml2-dev

Building using CMake by Hand[]

  • Open a terminal window and navigate to trunk (or the specified branch) and type the following:
cd mk/linux
mkdir build
cd build
cmake ../../..
  • If nothing goes wrong you will see megaglest (and other binaries) in the same folder (mk/linux).
  • NOTE: most developer that are not planning to run megaglest from the standard linux LHS paths (like usr/local/bin) should run cmake with the following syntax so that the resulting binaries look in the local compiled folders for data files:
cd mk/linux
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX= ../../..

Notice a space between the parameter -DCMAKE_INSTALL_PREFIX and ..

Notes: The follow are build types supported using cmake:

  • Release
  • Debug
  • RelWithDebInfo
  • MinSizeRel

To change the build type execute cmake (default is Release) using:

cmake -D CMAKE_BUILD_TYPE=<...>



Other special CMake options for customized builds:


Cross Compiling Windows binaries on Linux using MingW:[]

  • This process is still experimental and is not fully supported at the moment but rather for educational purposes.
  • Download and extract the MingW win32 dependency archive from Sourceforge and extract into the source folder.
  • Install the MingW cross compiler for your distro. In Ubuntu run:
sudo apt-get install mingw32 mingw32-binutils mingw32-runtime
  • Open a terminal and cd to the root folder of your Mega-Glest folder (usually trunk).
  • Modify the script. You also need to change windows_deps/curl-7.20.1 to windows_deps/curl-7.21.3
  • Run the script:
cd mk/linux
  • If all goes well you should see the Windows .exe binaries produced in the data/glest_game folder.

Test binaries[]

To test running the game, run the binary in mk/linux like this:


These are some commandline options:

./megaglest --help
./megaglest --version
./megaglest --opengl-info

See Also[]