The Orxonox Build System
We use CMake to configure the build. It can either generate makefiles or project files (Visual Studio, KDevelop, Code::Blocks, etc.). More information on which generator they support can be found on their website. Orxonox officially supports UNIX makefiles, Code::Blocks projects, Visual Studio solutions and XCode project files.
Our version requirement for CMake can be found in the root CMakeLists.txt (it will complain if your version is insufficient).
Dependencies
Orxonox has of course some library dependencies which you will have to get beforehand. If you are compiling on Windows or OS X, we strongly recommend to use our precompiled archives, supplied on the download page. These dependencies have been tested and compiled in an optimal way.
This is a list of requirements:
Library name | Version requirements
|
OGRE 3D Graphics Engine | 1.6 - 1.7
|
CEGUI (Crazy Eddie's GUI System) | 0.6 - 0.7
|
Boost libraries | 1.40 -
|
Lua scripting language | 5.1
|
Tcl shell script language | 8.4 - 8.5
|
OpenAL (audio) | Any current version should work
|
ALUT (audio utilities) | Any current version should work
|
LibOgg | Any current version should work
|
LibVorbis | Any current version should work
|
ZLib compression library | Any current version should work
|
On Windows, you will also need at least the DirectX 8 SDK (necessary parts in included in the dependency archives).
CMake Basics
Either you get yourself a GUI version (recommend if you haven't used CMake yet) or you use the command line version.
Generally speaking, CMake will generate all needed files in a single directory tree called build (or binary) directory. That means your source tree doesn't get 'polluted' with unversioned files. We still recommend to make the build directory in the source tree for convenience though.
In short for the command line version:
(pwd is your checkout directory)
mkdir build
cd build
cmake ..
Why ".." in the subfolder? Because that's how CMake works. It will generate the output files in the current current directory, ".." only specifies our source tree (with a CMakeLists.txt file).
CMake Options
Specifying them can either be done in the GUI very easily (please exclude the advanced entries) or on the command line with:
cmake -D MYVALUE=value ..
If you wish to have more options than listed here, you will have to consult an Orxonox developer or the CMake online docs.
Variable Name | Availability | Default Value | Description
|
CMAKE_BUILD_TYPE | | Debug | Debug, Release, RelWithDebInfo, RelForDevs, …
|
CMAKE_INSTALL_PREFIX | | /usr (UNIX), %ProgramFiles%\Orxonox (Windows) | Where you would like to install Orxonox. See the install sections below for more information
|
DEPENDENCY_PACKAGE_DIR | Windows, OS X | ../dependencies/ or dependencies/ relative to the source dir | The directory in which the precompiled dependencies can be found (version.txt has to be there!)
|
DISABLE_COMPILATIONS | | false | Disables compiling multiple designated source files as a single translation unit
|
EXTRA_COMPILER_WARNINGS | | false | "—Wextra —Wno-unused-parameter" for GCC and "-W4" for MSVC
|
INSTALL_COPYABLE | | false (Unix), true (Windows) | Use relative paths for the installation version. See below in the Installation section for more information.
|
EXTERNAL_DATA_DIRECTORY | | data_extern/ or ../data_extern/ from the src/ directory | Specifies the location of the media files (textures, scripts, maps, etc.). The search routine looks for "resources.oxr"
|
USER_SCRIPT_LIBRARY_CONFIG | | empty | Like above, but gets included earlier before finding the libraries.
|
VISUAL_LEAK_DETECTOR_ENABLE | MSVC | false | Enable including the Visual Leak detector in every source file to help tracking memory leaks. This option is only available when using Visual Studio and you need to have the library configured (global included and library folder set
|
ENABLE_GCOV | GCC | false | Enables code coverage analysis with gcov
|
ENABLE_BUILD_UNITS | | partial | Enabels build units. Possible values: off (or false), partial, full# (with # being the number of files per build unit)
|
Installation
We also provide an install target. When using makefiles, type make install and Orxonox will get installed. For project files, there's usually an INSTALL project which you can "build".
There are two modes to install the game:
Non Copyable Installation (Unix default), INSTALL_COPYABLE=false
Use absolute paths when installing and use the user directory for the log and configuration files. For Linux this means installing the binary, library and media files as superuser to the CMAKE_INSTALL_PREFIX (/usr per default) and then creating the configuration and log files in ~/.orxonox.
On Windows the default location is %ProgramFiles%\Orxonox (usually C:\Program Files\Orxonox) and for the config and log files %ProgramData%\.orxonox (usually C:\Documents and Settings\username\Application Data\.orxonox).
You can start the application from any working directory, but you cannot move or rename the installation directory, paths are hard coded.
Copyable Installation (Windows default), INSTALL_COPYABLE=true
With this option, all paths will be stored relatively. That means you can copy and rename the installation directory as you wish. But you may not rename or copy the subdirectories.
On Windows the application can be started from anywhere, on Unix the working directory has to be in the binary directory so that the libraries can be found. Anyway symlink to the executable gets created in the installation directory for convenience.
The config and log files go to the corresponding folders, but relative to the installation directory. For instance MyDirectory/bin, MyDirectory/config, etc.