= The Orxonox Build System = We use [http://www.cmake.org 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. [[br]] 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 [wiki:download] page. These dependencies have been tested and compiled in an optimal way.[[br]] 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 || [[br]] 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. [[br]] 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. [[br]] 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). [[br]] [[br]] == 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=TRUE .. }}} 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 || Default Value || Description || || CEGUILUA_USE_EXTERNAL_LIBRARY || false || Usually we supply the correct version (regarding the CEGUI version) of the CEGUI script libraries with the source repository. This eliminates the essential need to link CEGUILua and Orxonox against the same Lua version (5.0 or 5.1, subversion shouldn't matter). If you want to use your own CEGUILua library, activate this switch. BUT BE SURE TO KNOW WHICH VERSION OF LUA IS WAS LINKED AGAINST. Tests have shown that non concurring versions result in immediate crashes. || || CMAKE_INSTALL_PREFIX || /usr (Unix), %ProgramFiles%\Orxonox (Windows) || Where you would like to install Orxonox. See the install section below for more information. || || DEPENDENCY_PACKAGE_ENABLE || false (Unix), true (Windows) || Use a package of precompiled dependencies. This only works if there is already a PackageConfigX.cmake file in the "cmake" folder. Currently we deploy such packages for MSVC and MinGW on Windows, where this option is on per default. || || DEPENDENCY_PACKAGE_DIR || ../dependencies/ or dependencies/ from the source dir || The directory in which the precompiled dependencies can be found. That path has to contain the "include" folder || || EXTRA_COMPILER_WARNINGS || false || "--Wextra --Wno-unused-parameter" for GCC and "-W4" on MSVC || || INSTALL_COPYABLE || false (Unix), true (Windows) || Use relative paths for the installation version. See below in the Installation section for more information. || || LINK_XYZ_DYNAMIC (Windows) || all true || When importing libraries on Windows, you need to specify preprocessor macros to link dynamically/statically. Without regard to the default (no macro defined), Orxonox always links dynamically. If you have a static library, for instance enet.a (or enet.lib) then you need to set LINK_ENET_DYNAMIC to false. || || 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" || || OGRE_PLUGINS || Plugin_ParticleFX (and Plugin_CgProgramManager on Windows) || List of all the required OGRE plugins. Render systems are not included, they get found automatically. Note that all the plugins of the same build type (debug/release) need to be in the same location. || || TOLUA_PARSER_RELEASE || false || Omits compiling debug messages for the Lua/C++ interface. The option (if set to true) is only active in the release configurations. || || USER_SCRIPT_BUILD_CONFIG || empty || Specify a file to a script that contains additional build configuration code (usually for a specific compiler). || || 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 || == 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". [[br]] 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. [[br]] 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). [[br]] 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. [[br]] 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. [[br]] The config and log files go to the corresponding folders, but relative to the installation directory. For instance MyDirectory/bin, MyDirectory/config, etc.