GAE/Linux Compiling
- Getting the source:
$ svn co https://glestae.svn.sourceforge.net/svnroot/glestae/trunk glestae_svn
This creates a new folder in the current directory named glestae_svn with all the sources and data. The rest of the article assumes you're in this folder.
- Get the dependencies:
- CMake 2.6 or later
- SDL 1.2.5 or later
- OpenAL
- Vorbis
- Lua 5.1
- PhysicsFS (physfs) 2.0 or later
- wxWidgets 2.8 or later, optional, needed by tools
- CppUnit?, optional, needed for testsuite
- Build:
$ mkdir build
$ cd build $ cmake .. $ make
Set configdir or datadir with '-DGAE_CONFIG_DIR=path -DGAE_DATA_DIR=path' as argument for cmake. To enable physfs set '-DGAE_USE_PHYSFS=ON'. You can edit these values more easily when using a gui like ccmake (ncurses) or cmake-gui (Qt).
For streamlinig this add the following bash function to ~/.bashrc:
function cmakeglest {
srcfolder=$PWD
buildfolder='build'
mkdir -p ${buildfolder}
cd ${buildfolder}
# saves configs/logs at working dir
cmake -DGAE_CONFIG_DIR=./ -DGAE_DATA_DIR=${srcfolder}/data/game/ -DGAE_USE_PHYSFS=ON ${srcfolder} &&
nice make -j2
cd ${srcfolder}
return 0
}
now you need only this command at the toplevel directory:
$ cmakeglest
run glestae then with:
$ ./build/source/game/glestadv
It is also possible to generate Eclipse andCodeBlocks? projects and start compiling from there. Just use the appropriate generator. Out-of-source builds have some problems in Eclipse, see: http://www.itk.org/Wiki/Eclipse_CDT4_Generator#Out-Of-Source_Builds