This blog will regularly contain notices about new features in Kolf 2. To enable you to try these out immediately, follow the following steps. (I assume that you’re familiar with using your command-line interface. If not, please refer to your distribution’s manual, a web forum, a wiki or – even better – experts from your local Linux Users Group who will guide you through your first steps).

Step 1: Prepare your system

Please ensure you have the following packages installed: cmake, libqt4, libkde4. The package libqt4 may also be called just qt4 or qt4-x11. The package libkde4 may also be called kdelibs4; if both libkde4 and kdelibs4 are available, install both. Also, install the development packages (package names are the same, but with a suffix -dev or -devel) for all packages except for cmake.

Step 2: Install Box2D

Step 2.1: The easy way (from packages)

Kolf 2 uses the physics engine Box2D, so we need to install it first. I provide Box2D packages for some Linux distributions. If your Linux distribution appears in the following list, you’re lucky. Just execute the command next to it, and a repository with Box2D packages will be added to your package management.

For Fedora, I do not know how to add repositories on this distribution. Only the repository URL is given there. If you know what to do at this point, please write a comment. Apart from that, I apologize for any inconvenience arising from my blog layout. If you cannot see the whole command, use copy/paste to get everything.

Now again, choose from the following list your distribution (version does not matter at this point) and execute the command given for it.

openSUSE sudo zypper mr -r Box2D && sudo zypper in libBox2D2_1_0-devel
Mandriva sudo urpmi libBox2D2_1_0-devel
Fedora sudo yum install libBox2D2_1_0-devel

Step 2.2: The slightly more compliated way (from source)

Open a terminal and do the following: (Leave the terminal open!)

svn checkout box2d
cd box2d

This creates a directory “box2d”. (Stuff will fail if this directory exists already.) Continue on the terminal like this:

mkdir build
cd build

Note that everything after “cmake” is one command. Do not enter any line breaks inbetween, even if the command spans over multiple lines here. When CMake says “Build files have been written…”, do:

make -j2

And when this says “[100%] Built target…” twice, do:

sudo make install/fast

If you encounter any errors, please post a comment and explain your problems.

Step 3: Build Kolf

Open a terminal and do the following:

svn checkout svn:// kolf2

This creates a new subdirectory “kolf2” containing the Kolf 2 source code. Again, this won’t work if there is another directory with the same name around. In the “kolf2” directory you just created, create a subdirectory “build”. Open a terminal in the “build” directory and issue the following commands:

P=$(kde4-config --prefix)
make -j2
sudo make install/fast

This is very similar to the procedure for Box2D. Again, drop a note if anything produces errors.

Step 4: Updating

The “kolf2” directory contains a reference to the KDE server, therefore you can update it simply by opening a terminal in the “kolf2” directory and running:

svn update

Then, navigate into the “build” directory and rerun the commands used for building (except for the “cmake” command):

make -j2
sudo make install/fast

2 Responses to “How to build Kolf 2”

  1. […] How to build Kolf 2 […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s