Developers Guide
Build OpenClonk
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
We use Mercurial as our version control system. The TortoiseHG website describes how to install it. If you just want to download the OpenClonk source code, you can also install Mercurial without TortoiseHG. TortoiseHG is a GUI for Mercurial which makes using Mercurial much more comfortable.
Two tips for somebody new to Mercurial: Ignore the revision numbers, they are only there to mislead you. Pay attention to the changelog id. And activate the "Mercurial Queues" extension to get the "strip" command, with which one can delete changesets that are no longer needed.
To get the source, you have to clone the repository. Use the TortoiseHG dialog to clone http://hg.openclonk.org/ or execute this command in a commandline shell:
hg clone http://hg.openclonk.org/ openclonk
If you already cloned the repository and only want to update your local repository, use the Synchronise dialog of TortoiseHG to pull the repository and update. Or execute in the commandline:
hg pull --update
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:
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.
Get your changes into the openclonk.org repository
First, make the changes on your local copy of the repository. Then commit it to your local Mercurial repository. After that, you can export the changes as a patch (if you only changed source code or text) or as a bundle (if you changed binary files). Then attach the file to a forum post.
See also the topic in the developers corner.
Miscellanous notes
Mercurial extensions you really need
Add these to your ~/.hgrc:
hgext.mq=
This enables the "strip" command, with which you can remove a unwanted revision. Absolutely necessary, because the great thing about distributed revision control is that one can commit early and often and then go back and clean up, often creating new commits to replace the old ones. But the old ones do not disappear after being abandoned. Or maybe you want to try out some revision from somebody else, and get rid of it afterwards.
hgext.rebase= hgext.transplant=
These enable you to reorder history. Essential if you have an experimental feature followed by a bugfix and only want to push the bugfix to the public repository.