Build STK on Linux

(better folder structure)
m (Installing dependencies)
 
Line 12: Line 12:
* Fedora
* Fedora
-
<code>yum install gcc-c++ autoconf automake git-core libogg-devel libvorbis-devel openal-soft-devel fribidi-devel subversion libcurl-devel cmake libbluedevil-devel.x86_64</code>
+
<code>yum install gcc-c++ autoconf automake git-core libogg-devel libvorbis-devel libXrandr-devel mesa-libGL-devel mesa-libGLU-devel openal-soft-devel fribidi-devel subversion libcurl-devel cmake libbluedevil-devel</code>
* Ubuntu/Debian
* Ubuntu/Debian
-
<code>sudo apt-get install autoconf automake build-essential cmake git libogg-dev libvorbis-dev libopenal-dev libxxf86vm-dev libgl1-mesa-dev libglu1-mesa-dev libcurl4-openssl-dev libfribidi-dev libbluetooth-dev subversion libxrandr-dev</code>
+
<code>sudo apt-get install autoconf automake build-essential cmake git libogg-dev libvorbis-dev libopenal-dev libxxf86vm-dev libgl1-mesa-dev libglu1-mesa-dev libcurl4-openssl-dev libfribidi-dev libfreetype6-dev libbluetooth-dev subversion libxrandr-dev zlib1g-dev libpng12-dev libjpeg-turbo8-dev libsm-dev</code>
== Obtain code and assets ==
== Obtain code and assets ==
Line 22: Line 22:
See [[Source control]] for more information.
See [[Source control]] for more information.
-
== Building SuperTuxKart ==
+
The <TT>stk-code</TT> and the <TT>stk-assets</TT> directory need to be in the same folder. This means that you need the following folder structure:
-
 
+
-
Then build SuperTuxKart using CMake
+
-
 
+
-
'''The <TT>stk-code</TT> and the <TT>stk-assets</TT> directory need to be in the same folder.''' This means that you need the following folder structure:
+
* base dir
* base dir
** stk-code
** stk-code
Line 35: Line 31:
*** tracks
*** tracks
*** ...
*** ...
 +
 +
== Building SuperTuxKart ==
 +
 +
Next, build SuperTuxKart using CMake:
<code>cd stk-code
<code>cd stk-code
Line 45: Line 45:
You can speed up compilation heavily by changing the number behind <tt>-j</tt> to the number of cores you have.
You can speed up compilation heavily by changing the number behind <tt>-j</tt> to the number of cores you have.
-
To make a debug build add <tt>-DCMAKE_BUILD_TYPE=Debug</tt> like this:
+
=== CMake Options ===
 +
There is a varity ofCMake options. The most important ones are listed below:
 +
* To make a debug build add <tt>-DCMAKE_BUILD_TYPE=Debug</tt> like this: <code>cmake .. -DCMAKE_BUILD_TYPE=Debug</code>
-
<code>cmake .. -DCMAKE_BUILD_TYPE=Debug</code>
+
* Another option is to build the regular release version with its optimizations, but with debugging symbols still enabled. Replace the <tt>Debug</tt> with <tt>RelWithDebInfo</tt> for that, ie: <code>cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo</code>
-
Another option is to build the regular release version with its optimizations, but with debugging symbols still enabled. Replace the <tt>Debug</tt> with <tt>RelWithDebInfo</tt> for that.
+
* wiiuse can be enable with <code>-DUSE_WIIUSE=yes</code>
-
To enable wiiuse, add:
 
-
<code> -DUSE_WIIUSE=yes</code>
 
-
To run supertuxkart, just start it from the build directory:
+
Finally, you can simply run SuperTuxKart from the build directory:
<code>./bin/supertuxkart</code>
<code>./bin/supertuxkart</code>
-
''And finally, to install (optional):
+
Optionally, STK can be installed /usr/local in using
<code>sudo make install</code>''
<code>sudo make install</code>''
-
This will install in /usr/local. If you want to install somewhere else, replace the "cmake" command with something like:
+
If you want to install somewhere else, add the following options to cmake:
-
<code>cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install</code>
+
<code>-DCMAKE_INSTALL_PREFIX=/path/to/install</code>
-
If you want to update your copy of stk-code and stk-assets, go in the parent directory of stk-code:
+
If you want to update your copy of STK to the current git/SVN versions, go to the parent directory of stk-code:
<code>cd stk-code
<code>cd stk-code
git pull
git pull
-
cd ../stk-assets
+
cd cmake_build
 +
make -j2
 +
cd ../../stk-assets
svn update</code>
svn update</code>

Latest revision as of 22:06, 18 March 2016

Retrieved from "http://supertuxkart.sourceforge.net/Build_STK_on_Linux"

User Tools