Build OpenClonk: Difference between revisions

Newton (talk | contribs)
Created page with 'Windows users can check out this tutorial: Building with Visual C++ Otherwise, here is how you can build OpenClonk in three easy steps: : '''1. Get th…'
 
Ker (talk | contribs)
Line 3: Line 3:
Otherwise, here is how you can build OpenClonk in three easy steps:
Otherwise, here is how you can build OpenClonk in three easy steps:


: '''1. Get the source code'''
== 1. Get the source code ==
: See [[Mercurial Guide]]
See [[Git Workflow]]
: '''2. Install Build tools and libraries'''
 
: OpenClonk has a couple of dependencies on other libraries. Please refer to the Readme.*.txt in the freshly checked out source tree. You need to download and install the [http://www.fmod.org/index.php/release/version/fmodapi375win.zip FMOD SDK] and the [http://www.microsoft.com/downloads/details.aspx?FamilyID=24a541d6-0486-4453-8641-1eee9e21b282&displaylang=en DirectX SDK]. For windows, we provide prebuilt packages of libraries:
== 2. Install Build tools and libraries ==
OpenClonk has a couple of dependencies on other libraries. Please refer to the Readme.*.txt in the freshly checked out source tree.
: For Windows, we provide prebuilt packages of libraries:
:* [http://www.openclonk.org/openclonk-deps-vc90.zip for Microsoft C++ users]
:* [http://www.openclonk.org/openclonk-deps-vc90.zip for Microsoft C++ users]
:* [http://www.openclonk.org/mingwlibs2.zip for GNU Compiler Collection users]
:* [http://www.openclonk.org/mingwlibs2.zip for GNU Compiler Collection users]
: '''3. Compile the game'''
:You probably want to download and install the [http://www.fmod.org/index.php/release/version/fmodapi375win.zip FMOD SDK] for sound. The [http://www.microsoft.com/downloads/details.aspx?FamilyID=24a541d6-0486-4453-8641-1eee9e21b282&displaylang=en DirectX SDK] is optional, the default is OpenGL.
: Again, the Readme.*.txt has the details, as this step is highly platform dependent. But it's also comparatively uncomplicated: If you installed everything that's listed, and it doesn't build, you found a bug.
== 3. Compile the game ==
Again, the Readme.*.txt has the details, as this step is highly platform dependent. But it's also comparatively uncomplicated: If you installed everything that's listed, and it doesn't build, you found a bug.
 
= Building a debug engine =
 
The Clonk source code contains lots of little pieces of code that check that the engine works correctly. They can often help finding or preventing bugs, but slow the game down, so they are skipped in normal builds. To enable them, pass -DCMAKE_BUILD_TYPE=Debug to cmake, choose the Debug build in the IDE, or pass --enable-debug to configure. If you are using the GNU Compiler Collection, you can also enable [http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html the libstdc++ debug mode] by passing CPPFLAGS=-D_GLIBCXX_DEBUG to configure.

Revision as of 18:04, 22 January 2013

Windows users can check out this tutorial: Building with Visual C++

Otherwise, here is how you can build OpenClonk in three easy steps:

1. Get the source code

See Git Workflow

2. Install Build tools and libraries

OpenClonk has a couple of dependencies on other libraries. Please refer to the Readme.*.txt in the freshly checked out source tree.

For Windows, we provide prebuilt packages of libraries:
You probably want to download and install the FMOD SDK for sound. The DirectX SDK is optional, the default is OpenGL.

3. Compile the game

Again, the Readme.*.txt has the details, as this step is highly platform dependent. But it's also comparatively uncomplicated: If you installed everything that's listed, and it doesn't build, you found a bug.

Building a debug engine

The Clonk source code contains lots of little pieces of code that check that the engine works correctly. They can often help finding or preventing bugs, but slow the game down, so they are skipped in normal builds. To enable them, pass -DCMAKE_BUILD_TYPE=Debug to cmake, choose the Debug build in the IDE, or pass --enable-debug to configure. If you are using the GNU Compiler Collection, you can also enable the libstdc++ debug mode by passing CPPFLAGS=-D_GLIBCXX_DEBUG to configure.