Skip to content

Commit 84b8fe0

Browse files
superusercodeBenau
authored andcommitted
Fix format of INSTALL.md (supertuxkart#4054)
1 parent 58ad947 commit 84b8fe0

File tree

1 file changed

+58
-43
lines changed

1 file changed

+58
-43
lines changed

INSTALL.md

Lines changed: 58 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Building from source
1+
# Building from source
22

33
In order to build SuperTuxKart from source, you'll need both the code and the assets (See <https://supertuxkart.net/Source_control> for more information):
44

@@ -13,19 +13,19 @@ svn co https://svn.code.sf.net/p/supertuxkart/code/stk-assets stk-assets
1313

1414
To build SuperTuxKart from source, you'll need to install the following packages:
1515

16-
* OpenGL (mesa)
17-
* OpenAL (recommended: openal-soft-devel)
18-
* Ogg (libogg-dev)
19-
* Vorbis (libvorbis-dev)
20-
* Freetype (libfreetype6-dev)
21-
* Harfbuzz (libharfbuzz-dev)
22-
* Fribidi (libfribidi-dev)
23-
* libcurl (libcurl-devel)
24-
* libbluetooth (bluez-devel)
25-
* libnettle (nettle-dev)
26-
* libpng (libpng-devel)
27-
* zlib (zlib-devel)
28-
* jpeg (libjpeg-turbo-devel)
16+
* OpenGL (mesa)
17+
* OpenAL (recommended: openal-soft-devel)
18+
* Ogg (libogg-dev)
19+
* Vorbis (libvorbis-dev)
20+
* Freetype (libfreetype6-dev)
21+
* Harfbuzz (libharfbuzz-dev)
22+
* Fribidi (libfribidi-dev)
23+
* libcurl (libcurl-devel)
24+
* libbluetooth (bluez-devel)
25+
* libnettle (nettle-dev)
26+
* libpng (libpng-devel)
27+
* zlib (zlib-devel)
28+
* jpeg (libjpeg-turbo-devel)
2929

3030
Fedora command:
3131

@@ -35,6 +35,7 @@ openssl-devel libcurl-devel freetype-devel harfbuzz-devel fribidi-devel mesa-lib
3535
libjpeg-turbo-devel libogg-devel openal-soft-devel libpng-devel \
3636
libvorbis-devel libXrandr-devel libGLEW nettle-devel pkgconf zlib-devel
3737
```
38+
3839
Mageia 6 command:
3940

4041
```bash
@@ -43,6 +44,7 @@ fribidi-devel libjpeg-turbo-devel libogg-devel openal-soft-devel \
4344
libpng-devel libvorbis-devel nettle-devel zlib-devel git subversion \
4445
mesa-comon-devel libxrandr-devel libbluez-devel libfreetype6-devel'
4546
```
47+
4648
OpenSUSE command:
4749

4850
```bash
@@ -51,6 +53,7 @@ freetype-devel harfbuzz-devel fribidi-devel libogg-devel openal-soft-devel libpn
5153
libvorbis-devel libXrandr-devel pkgconf zlib-devel enet-devel glew-devel \
5254
libjpeg-devel bluez-devel freetype2-devel glu-devel
5355
```
56+
5457
Ubuntu command:
5558

5659
```bash
@@ -69,18 +72,18 @@ Compilation instruction is explained there. If you don't need this feature, pass
6972
### Compiling
7073

7174
To compile SuperTuxKart, run the following commands inside `stk-code` directory
72-
75+
7376
```bash
7477
# go into the stk-code directory
7578
cd stk-code
76-
79+
7780
# create and enter the cmake_build directory
7881
mkdir cmake_build
7982
cd cmake_build
80-
83+
8184
# run cmake to generate the makefile
8285
cmake ..
83-
86+
8487
# compile
8588
make -j$(nproc)
8689
```
@@ -122,32 +125,33 @@ will be copied to `/usr/local/bin`. To change the default installation
122125
location, specify `CMAKE_INSTALL_PREFIX` when running cmake, e.g.:
123126
`cmake .. -DCMAKE_INSTALL_PREFIX=/opt/stk`
124127

125-
126-
127128
## Building SuperTuxKart on Windows
129+
128130
To Build SuperTuxKart on Windows, follow these instructions:
129131

130132
1. Download and install Visual Studio from here: [Visual Studio - Download](https://www.visualstudio.com/downloads/). The free Visual Studio Community edition works fine. Remember to select "Desktop development with C++" in the installer.
131133

132-
2a. If you want the stable version, download the SuperTuxKart source package from the latest stable version [SuperTuxKart download area - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart/) and unpack it.
133-
2b. If you want the development version, you will need a Git client and a SVN client. More information can be found here: [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control).
134+
2. If you want the stable version, download the SuperTuxKart source package from the latest stable version [SuperTuxKart download area - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart/) and unpack it.
135+
136+
3. If you want the development version, you will need a Git client and a SVN client. More information can be found here: [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control).
134137
Open your file browser and find somewhere you want to put the development version of SuperTuxKart. For example in C:\Users\<Your Username> as the Git and SVN clients will have write permissions there, and you should create its own directory, for example SuperTuxKart-dev. Enter that directory, and create a directory inside called stk-assets, and enter it. If you installed TortoiseSVN, right-click, select TortoiseSVN -> Checkout... and paste the correspodning URL found in [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control). While it is downloading the game assets, go back to your file browser and one level up. Right-click again somewhere empty and select "Git clone..." and paste the corresponding link found in [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control).
135138
*Note: Both `stk-code` and `stk-assets` **must** be in the same directory, otherwise the build will likely fail!*
136139

137-
3a. If you got the stable version, download the Windows dependencies package from [SuperTuxKart download area: Dependencies - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/Windows/) and unpack it.
138-
3b. If you got the development version go to SuperTuxKart-dev in your file browser, right-click somewhere empty, select "Git clone..." and paste https://github.com/supertuxkart/dependencies.git in the URL field; click OK. When finished, copy the `dependencies` directory from either the `windows` or the `windows_64bit` directories into the `stk-code` directory; rename the latter to `dependencies-64bit` if you want to compile a 64-bit build.
140+
4. If you got the stable version, download the Windows dependencies package from [SuperTuxKart download area: Dependencies - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/Windows/) and unpack it.
141+
142+
5. If you got the development version go to SuperTuxKart-dev in your file browser, right-click somewhere empty, select "Git clone..." and paste <https://github.com/supertuxkart/dependencies.git> in the URL field; click OK. When finished, copy the `dependencies` directory from either the `windows` or the `windows_64bit` directories into the `stk-code` directory; rename the latter to `dependencies-64bit` if you want to compile a 64-bit build.
139143

140-
4. Download CMake from here: [CMake - download page](https://cmake.org/download/), install it; once CMake is installed, double click on the CMake icon on your desktop, and point it towards your `stk-code` directory in the 'Where is the source code' field, and point it to a new directory called `build` or `bld` inside the stk-code directory.
144+
6. Download CMake from here: [CMake - download page](https://cmake.org/download/), install it; once CMake is installed, double click on the CMake icon on your desktop, and point it towards your `stk-code` directory in the 'Where is the source code' field, and point it to a new directory called `build` or `bld` inside the stk-code directory.
141145

142-
5. Press 'Configure'; CMake will ask you if it is OK to create the aforementioned directory, press `Yes`. CMake will then ask you about your version of Visual Studio.
146+
7. Press 'Configure'; CMake will ask you if it is OK to create the aforementioned directory, press `Yes`. CMake will then ask you about your version of Visual Studio.
143147

144-
Confirm your selection; *Please look at the table below to avoid confusion between version numbers and releases of Visual Studio*; CMake will begin creating the required files for the build in the directory. If you want to do a 64-bit build, select the version of Visual Studio you installed with "Win64" appended.
148+
Confirm your selection; *Please look at the table below to avoid confusion between version numbers and releases of Visual Studio*; CMake will begin creating the required files for the build in the directory. If you want to do a 64-bit build, select the version of Visual Studio you installed with "Win64" appended.
145149

146-
6. Navigate to your build directory and open the `SuperTuxKart.sln` file; Visual Studio will now load the solution.
150+
8. Navigate to your build directory and open the `SuperTuxKart.sln` file; Visual Studio will now load the solution.
147151

148-
7. In the 'Solution Explorer', right click on the `supertuxkart` project and select "Set as StartUp project".
152+
9. In the 'Solution Explorer', right click on the `supertuxkart` project and select "Set as StartUp project".
149153

150-
8. Open the 'Build' menu and select 'Build Solution'; or, press the default keyboard shortcut: `CTRL + SHIFT + B` to build the solution.
154+
10. Open the 'Build' menu and select 'Build Solution'; or, press the default keyboard shortcut: `CTRL + SHIFT + B` to build the solution.
151155

152156
*Note: To avoid confusion between releases and versions, refer to this table:*
153157

@@ -158,27 +162,34 @@ Visual Studio 2015| 14
158162
Visual Studio 2013| 13
159163

160164
## Building SuperTuxKart on Windows (from PowerShell/Command line)
165+
161166
1. Download and install Visual Studio from here: [Visual Studio - Download](https://www.visualstudio.com/downloads/), the free Visual Studio Community edition works fine.
162167

163168
2. Download a source package from either [SuperTuxKart 0.9.2 download area - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart/0.9.2) or [SuperTuxKart.net - Source Control](https://supertuxkart.net/Source_control)
164-
NOTE: the `stk-code` and `stk-assets` directories **must** be in the same directory
169+
NOTE: the `stk-code` and `stk-assets` directories **must** be in the same directory
165170
3. Download the Windows dependencies package from either [SuperTuxKart download area - SourceForge.net](https://sourceforge.net/projects/supertuxkart/files/SuperTuxKart%20Dependencies/Windows/)
166171
or [SuperTuxKart on GitHub - Dependencies](https://github.com/supertuxkart/dependencies)
167172
and unpack the archive; once unpacked, copy the `dependencies` directory from either the `windows` or the `windows_64bit` directories into the `stk-code` directory
168173
4. Download CMake from here: [CMake - download page](https://cmake.org/download/); and install it. Navigate to the `stk-code` directory; and create an directory called "build":
169-
```cmd
170-
mkdir build
171-
cd build
172-
```
174+
175+
```cmd
176+
mkdir build
177+
cd build
178+
```
179+
173180
5. Once inside the build directory; run CMake to start the compilation process:
174-
```cmd
175-
cmake ..
176-
```
181+
182+
```cmd
183+
cmake ..
184+
```
185+
177186
6. Now that CMake finished configuring and creating the necessary files for the build, run the build command in the same directory:
187+
178188
```cmd
179-
msbuild.exe SuperTuxKart.sln
180-
```
181-
SuperTuxKart can now be run as `bin\Debug\supertuxkart.exe` or `bin\Release\supertuxkart.exe`
189+
msbuild.exe SuperTuxKart.sln
190+
```
191+
192+
SuperTuxKart can now be run as `bin\Debug\supertuxkart.exe` or `bin\Release\supertuxkart.exe`
182193

183194
## Building SuperTuxKart on macOS
184195

@@ -204,11 +215,12 @@ On OS X 10.9.5, you might need the following workaround:
204215
sudo ln -s `xcrun --show-sdk-path`/usr/include/ /usr/include
205216
sudo ln -s `xcrun --show-sdk-path`/System/Library/Frameworks/OpenGL.framework/Headers/ /usr/local/include/OpenGL
206217
```
218+
207219
The first link is required in order to find libcurl, the second to find opengl.
208220

209221
### STK 0.10 or later (or latest git)
210222

211-
Install homebrew (https://brew.sh/)
223+
Install [homebrew](https://brew.sh/)
212224
Install all of the dependencies using homebrew:
213225

214226
```bash
@@ -217,6 +229,7 @@ brew bundle
217229
```
218230

219231
Build STK
232+
220233
```bash
221234
mkdir cmake_build
222235
cd cmake_build
@@ -226,7 +239,7 @@ make
226239

227240
#### (Optional) packaging for distribution
228241

229-
By default, the executable that is produced is not ready for distribution. Install https://github.com/auriamg/macdylibbundler and run:
242+
By default, the executable that is produced is not ready for distribution. Install <https://github.com/auriamg/macdylibbundler> and run:
230243

231244
```bash
232245
dylibbundler -od -b -x ./bin/SuperTuxKart.app/Contents/MacOS/supertuxkart -d ./bin/SuperTuxKart.app/Contents/libs/ -p @executable_path/../libs/
@@ -249,6 +262,7 @@ make
249262
```
250263

251264
Building with GCC:
265+
252266
```bash
253267
cd /path/to/stk-code
254268
mkdir cmake_build
@@ -258,6 +272,7 @@ make
258272
```
259273

260274
Building on 10.10 with 10.9 compatibility:
275+
261276
```bash
262277
cmake .. -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
263278
```

0 commit comments

Comments
 (0)