Build STK on Linux

m (make install isn't broken anymore)
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 svn</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 21: Line 21:
svn checkout https://svn.code.sf.net/p/supertuxkart/code/stk-assets stk-assets # about 650 MB</code>
svn checkout https://svn.code.sf.net/p/supertuxkart/code/stk-assets stk-assets # about 650 MB</code>
See [[Source control]] for more information.
See [[Source control]] for more information.
 +
 +
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
 +
** stk-code
 +
*** src
 +
*** lib
 +
*** ...
 +
** stk-assets
 +
*** tracks
 +
*** ...
== Building SuperTuxKart ==
== Building SuperTuxKart ==
-
Then build SuperTuxKart using CMake
+
Next, build SuperTuxKart using CMake:
-
 
+
-
'''The <TT>stk-code</TT> and the <TT>stk-assets</TT> directory need to be in the same folder.'''
+
<code>cd stk-code
<code>cd stk-code
Line 35: Line 43:
</code>
</code>
-
You can speed up compilation 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 to the current git/SVN versions, go to the parent directory of stk-code:
 +
<code>cd stk-code
 +
git pull
 +
cd cmake_build
 +
make -j2
 +
cd ../../stk-assets
 +
svn update</code>
== Using Eclipse ==
== Using Eclipse ==

Latest revision as of 22:06, 18 March 2016

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

User Tools