Developers Guide: Difference between revisions

Newton (talk | contribs)
No edit summary
Newton (talk | contribs)
No edit summary
Line 7: Line 7:
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]]
 
: '''2. Install Build tools and libraries'''
We use Mercurial as our version control system. The [http://bitbucket.org/tortoisehg/stable/wiki/install TortoiseHG website] describes how to install it. If you just want to download the OpenClonk source code, you can also install Mercurial without TortoiseHG.
: 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:
TortoiseHG is a GUI for Mercurial which makes using Mercurial much more comfortable.
:* [http://www.openclonk.org/openclonk-deps-vc90.zip for Microsoft C++ users]
 
:* [http://www.openclonk.org/mingwlibs2.zip for GNU Compiler Collection users]
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.
: '''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.
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:
<nowiki>hg clone http://hg.openclonk.org/ openclonk</nowiki>
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:
<nowiki>hg pull --update</nowiki>
 
 
'''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://forum.openclonk.org/topic_show.pl?pid=1405#pid1405 for Microsoft C++ users]
* [http://forum.openclonk.org/topic_show.pl?pid=1522#pid1522 for GNU Compiler Collection users]
 
 
'''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.
 
== Contribute changes ==
 
We're using the distributed version control system Mercurial, so you actually already have your own repository which is a clone of the openclonk.org repository. So what you got to do is to make the changes on your local copy of the repository. You commit them to your local Mercurial repository and after that export them as a patch (if you only changed source code or text) or as a bundle (if you changed binary files).
You can show your piece of code to one of the people with write access to our repository by posting it in the forum. We'll have a look at the changeset and determine if your changes are fit for incorporating them into the source tree.

Revision as of 00:06, 1 March 2010

Probably the first thing you want to do is to check out the repository and compile your own binaries. This article explains this and how you commit changes to our repository.

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
See Mercurial Guide
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 FMOD SDK and the DirectX SDK. 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.