| 1 | Table of contents |
|---|
| 2 | ----------------- |
|---|
| 3 | |
|---|
| 4 | WARNING: Only intended for developers who'll build Speed Dreams from sources. |
|---|
| 5 | |
|---|
| 6 | I - Pre-requisites |
|---|
| 7 | |
|---|
| 8 | II - Linux Installation from sources |
|---|
| 9 | |
|---|
| 10 | 1 - Introduction |
|---|
| 11 | 2 - Installation from the official tarballs |
|---|
| 12 | 3 - Installation from SVN (developers only) |
|---|
| 13 | 4 - Run Speed-Dreams |
|---|
| 14 | 5 - Getting Help |
|---|
| 15 | |
|---|
| 16 | III - Windows Installation from sources |
|---|
| 17 | |
|---|
| 18 | 1 - Cmake and MS VC++ 2005 (8) / 2008 (9) on Windows XP 32 |
|---|
| 19 | 2 - MS VC++ 6 no more supported |
|---|
| 20 | |
|---|
| 21 | IV - FreeBSD Installation from sources (Work in progress) |
|---|
| 22 | |
|---|
| 23 | V - MacOS X installation from sources (TODO) |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | I - Pre-requisites |
|---|
| 28 | ------------------ |
|---|
| 29 | |
|---|
| 30 | - Working OpenGL Driver and header files / associated libraries |
|---|
| 31 | - SDL 1.2 (http://www.libsdl.org/) |
|---|
| 32 | - PLIB 1.8.3 / 4 / 5 (http://plib.sourceforge.net/). |
|---|
| 33 | Linux: Be carefull to compile plib with -fPIC on AMD64 if you run a 64 bit version. |
|---|
| 34 | - OpenAL soft 1.5 / 1.6 / 1.11 (http://connect.creativelabs.com/openal) |
|---|
| 35 | (Torcs modified 0.0.8 from www.torcs.org also used to work in the past). |
|---|
| 36 | - ENet 1.2 (http://enet.bespin.org) |
|---|
| 37 | Linux: Be carefull to compile ENet with -fPIC on AMD64 if you run a 64 bit build. |
|---|
| 38 | - libpng |
|---|
| 39 | - zlib |
|---|
| 40 | - jpeg |
|---|
| 41 | |
|---|
| 42 | WARNING: On Windows, be carefull to compile anything for multi-threaded DLL integration (/MD & /MDd) |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | II - Linux installation from sources |
|---|
| 46 | ------------------------------------ |
|---|
| 47 | |
|---|
| 48 | 1 - Introduction |
|---|
| 49 | |
|---|
| 50 | There are 2 ways to build and install Speed Dreams from sources : |
|---|
| 51 | - from the official source tarballs, |
|---|
| 52 | - from the subversion repository. |
|---|
| 53 | |
|---|
| 54 | Pick only one of the above options. If you have trouble during the installation, |
|---|
| 55 | have a look in the FAQ on the above sites. In case you get stuck, |
|---|
| 56 | please learn how to report the problem in the FAQ before filing a bug or contact us. |
|---|
| 57 | |
|---|
| 58 | Have fun, |
|---|
| 59 | |
|---|
| 60 | The Speed Dreams Team. |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | 2 - Installation from the official tarballs |
|---|
| 64 | |
|---|
| 65 | a - get these tarballs : please go to our SF.net download page at |
|---|
| 66 | |
|---|
| 67 | http://sourceforge.net/projects/speed-dreams/files/2.0.0, |
|---|
| 68 | |
|---|
| 69 | and you should find : |
|---|
| 70 | |
|---|
| 71 | speed-dreams-src-base-<version>.tar.xz |
|---|
| 72 | speed-dreams-src-hq-cars-and-tracks-<version>.tar.xz |
|---|
| 73 | speed-dreams-src-more-hq-cars-and-tracks-<version>.tar.xz |
|---|
| 74 | speed-dreams-src-wip-cars-and-tracks-<version>.tar.xz |
|---|
| 75 | speed-dreams-src-unmaintained-<version>.tar.xz |
|---|
| 76 | |
|---|
| 77 | where <version> is something like "2.0.0-rc1-r4420", "2.0.0-r4687", ... |
|---|
| 78 | |
|---|
| 79 | Warning: you must download them all, as our current build system |
|---|
| 80 | can't cope with missing files. |
|---|
| 81 | |
|---|
| 82 | Let's say that : |
|---|
| 83 | * you downloaded them all in $HOME/sd, |
|---|
| 84 | * and that <version> is x.y.z-rabcd. |
|---|
| 85 | (you can do as you like, but we'll use this folder in the explanations below). |
|---|
| 86 | |
|---|
| 87 | b - uncompress the tarballs : |
|---|
| 88 | |
|---|
| 89 | $ cd $HOME/sd |
|---|
| 90 | $ mkdir x.y.z-rabcd |
|---|
| 91 | $ cd x.y.z-rabcd |
|---|
| 92 | $ for file in ../*.xz; do tar xvfa $file; done |
|---|
| 93 | |
|---|
| 94 | You should now see "cmake", "data" and "src" folders (among others). |
|---|
| 95 | |
|---|
| 96 | c - configure : |
|---|
| 97 | |
|---|
| 98 | 1. create the build dir for CMake |
|---|
| 99 | |
|---|
| 100 | $ mkdir build |
|---|
| 101 | $ cd build |
|---|
| 102 | |
|---|
| 103 | 2. run CMake : |
|---|
| 104 | |
|---|
| 105 | - for a Release build using default 3rd party libs |
|---|
| 106 | |
|---|
| 107 | $ cmake -D OPTION_OFFICIAL_ONLY:BOOL=ON .. |
|---|
| 108 | |
|---|
| 109 | Note: This "OFFICIAL_ONLY" stuff is mandatory, otherwise |
|---|
| 110 | you'll get errors saying that some (unofficial contents) folders |
|---|
| 111 | are missing, just because the official tarballs don't include them. |
|---|
| 112 | |
|---|
| 113 | - you may also want to override some default settings : |
|---|
| 114 | |
|---|
| 115 | for that, you can use the -D option of cmake : |
|---|
| 116 | |
|---|
| 117 | Example : |
|---|
| 118 | |
|---|
| 119 | $ cmake -D SD_LOCALDIR:STRING=~/dev/.sd-settings \ |
|---|
| 120 | -D CMAKE_PREFIX_PATH:STRING=/usr/local |
|---|
| 121 | -D CMAKE_BUILD_TYPE:STRING=Debug |
|---|
| 122 | |
|---|
| 123 | or else you can use ccmake to change the variables interactively : |
|---|
| 124 | |
|---|
| 125 | $ ccmake .. |
|---|
| 126 | |
|---|
| 127 | * press (t) for advanced options if needed |
|---|
| 128 | * in order to change a variable : |
|---|
| 129 | * select the associated line using the up/down arrow keys |
|---|
| 130 | * press (enter) |
|---|
| 131 | * edit the value |
|---|
| 132 | * press (enter) |
|---|
| 133 | * press (c) for configure |
|---|
| 134 | * press (g) for generate |
|---|
| 135 | * press (e) to exit |
|---|
| 136 | |
|---|
| 137 | |
|---|
| 138 | Usefull CMake variables for Speed Dreams (note that some might be "advanced" ones) : |
|---|
| 139 | |
|---|
| 140 | - CMAKE_BUILD_TYPE:STRING : |
|---|
| 141 | Debug, Release, RelWithDebInfo, MinSizeRel (def: Release) |
|---|
| 142 | |
|---|
| 143 | - OPTION_OFFICIAL_ONLY:BOOL : |
|---|
| 144 | Build/install only official contents (def: OFF) |
|---|
| 145 | |
|---|
| 146 | - SD_LOCALDIR:STRING : |
|---|
| 147 | User settings dir for run-time (def: ~/.speed-dreams-2) |
|---|
| 148 | |
|---|
| 149 | - CMAKE_PREFIX_PATH:STRING : |
|---|
| 150 | Path prefixes for additional 3rdParty libraries (def:empty) |
|---|
| 151 | (use /usr/local if you compiled some 3rdParty libs yourself). |
|---|
| 152 | - CMAKE_INSTALL_PREFIX:PATH : |
|---|
| 153 | Install path for Speed Dreams (def: /usr/local) |
|---|
| 154 | |
|---|
| 155 | - OPTION_TRACE:BOOL : |
|---|
| 156 | Full run-time traces if ON (def: ON) |
|---|
| 157 | |
|---|
| 158 | - OPTION_TRACE_LEVEL:STRING : |
|---|
| 159 | Run-time traces level integer threshold, only if OPTION_TRACE |
|---|
| 160 | (traces with higher level are not logged ; |
|---|
| 161 | 0=Fatal, 1=Error, 2=Warning, 3=Info, 4=Trace, 5=Debug, ...) (def: 5) |
|---|
| 162 | |
|---|
| 163 | - OPTION_UNLOAD_SSGGRAPH:BOOL : |
|---|
| 164 | The 'ssggraph' graphics engine module will never be unloaded if OFF (def: ON) |
|---|
| 165 | Usefull under some Linux configurations where this unloading badly crashes XOrg |
|---|
| 166 | (see http://sourceforge.net/apps/trac/speed-dreams/ticket/209), |
|---|
| 167 | or simply makes SD crash because PLib is shipped as a set of shared libraries |
|---|
| 168 | (see http://sourceforge.net/apps/trac/speed-dreams/ticket/459). |
|---|
| 169 | |
|---|
| 170 | - OPTION_FORCE_DEBUG:BOOL : |
|---|
| 171 | Enable debug symbols even in Release builds (def: OFF) |
|---|
| 172 | |
|---|
| 173 | Tips reported about some issues : |
|---|
| 174 | - sometimes, ENET_INCLUDE_DIR is not detected correctly, resulting in something like |
|---|
| 175 | /usr/include/enet or so, and, consequently, in bad compilation errors because |
|---|
| 176 | /usr/include/enet contains a special time.h header file that conflicts with the standard |
|---|
| 177 | one in /usr/include. Removing the "enet" postfix from ENET_INCLUDE_DIR should fix this |
|---|
| 178 | (in cmake command line or interactively through ccmake). |
|---|
| 179 | |
|---|
| 180 | d - build: |
|---|
| 181 | |
|---|
| 182 | $ make |
|---|
| 183 | |
|---|
| 184 | e - install: |
|---|
| 185 | |
|---|
| 186 | $ sudo make install |
|---|
| 187 | |
|---|
| 188 | Notes: |
|---|
| 189 | * sudo is only useful if your install PREFIX is a read-only folder (like default /usr/local) |
|---|
| 190 | * sudo configuration : you may ask your system administrator to enable you to run |
|---|
| 191 | 'sudo make install' ; if he doesn't know how, you can tell him/her |
|---|
| 192 | to add a line like this in /etc/sudoers (or something less permissive ;-) : |
|---|
| 193 | <your login name> ALL=(ALL) NOPASSWD: ALL |
|---|
| 194 | |
|---|
| 195 | 3 - Installation from SVN |
|---|
| 196 | |
|---|
| 197 | Before you start, be aware that the SVN trunk / branches might crash or even not compile |
|---|
| 198 | sometimes. If you want to get it anyway, follow the instructions at |
|---|
| 199 | http://sourceforge.net/svn/?group_id=239111 |
|---|
| 200 | |
|---|
| 201 | For the moment, |
|---|
| 202 | - the developments for the next release are located in the trunk ; |
|---|
| 203 | you can checkout the current _development_ state through : |
|---|
| 204 | $ svn co https://speed-dreams.svn.sourceforge.net/svnroot/speed-dreams/trunk sd-trunk |
|---|
| 205 | - we make branches under the "branches" root dir ; as an exemple, |
|---|
| 206 | you can get the "1.4.x" release maintenance branch current state through : |
|---|
| 207 | $ svn co https://speed-dreams.svn.sourceforge.net/svnroot/speed-dreams/branches/1.4.x sd-1.4.x |
|---|
| 208 | - we make release tags under the "tags" root dir ; |
|---|
| 209 | as an exemple, you can get the "2.0.0 RC 1" pre-release through : |
|---|
| 210 | $ svn co https://speed-dreams.svn.sourceforge.net/svnroot/speed-dreams/tags/2.0.0-rc1 sd-2.0.0-rc1 |
|---|
| 211 | |
|---|
| 212 | See configure, build and install method above (2) |
|---|
| 213 | (note however that branches/1.4.x and tags/1.4.0 are not built through cmake : |
|---|
| 214 | please refer to the dedicated INSTALL file for these). |
|---|
| 215 | |
|---|
| 216 | 4 - Run Speed-Dreams |
|---|
| 217 | |
|---|
| 218 | If the default CMake settings were kept, Speed Dreams is normally installed in /usr/local. |
|---|
| 219 | |
|---|
| 220 | So, if /usr/local/games is already in your PATH variable, simply try : |
|---|
| 221 | |
|---|
| 222 | $ speed-dreams-2 |
|---|
| 223 | |
|---|
| 224 | If /usr/local/games not already in your PATH variable, you may want to add it ; to do so, |
|---|
| 225 | simply add the line "export PATH=$PATH:/usr/local/games" to your ~/.bashrc file ; |
|---|
| 226 | you can use : |
|---|
| 227 | |
|---|
| 228 | $ echo "export PATH=$PATH:/usr/local/games" >> ~/.bashrc" for that |
|---|
| 229 | |
|---|
| 230 | Then, the above startup command should work now : |
|---|
| 231 | |
|---|
| 232 | $ speed-dreams-2 |
|---|
| 233 | |
|---|
| 234 | If not or if the game crashes, see right below "5 - Known run-time issues". |
|---|
| 235 | |
|---|
| 236 | Runtime options : type this command to get them explained : |
|---|
| 237 | |
|---|
| 238 | $ speed-dreams-2 --help |
|---|
| 239 | |
|---|
| 240 | 5 - Known run-time issues : |
|---|
| 241 | |
|---|
| 242 | * Under some Linux configurations, the game crashes after restarting a race, |
|---|
| 243 | of when exiting ; we have a build-time workaround for this : |
|---|
| 244 | see above, in II-2-c-2, the OPTION_UNLOAD_SSGGRAPH CMake option. |
|---|
| 245 | |
|---|
| 246 | * If you get all white rectangles or ugly fonts in the menus, |
|---|
| 247 | it's likely that some game data was not properly installed ; |
|---|
| 248 | check again carefully the build and install instructions. |
|---|
| 249 | |
|---|
| 250 | 6 - Getting Help |
|---|
| 251 | |
|---|
| 252 | From inside the game, press F1 at any time, you'll get a help page explaining |
|---|
| 253 | the available keyboard shorcuts. |
|---|
| 254 | |
|---|
| 255 | If you are stuck please report problems through speed-dreams-users mailing list |
|---|
| 256 | or our bug tracker at http://sourceforge.net/apps/trac/speed-dreams/report. |
|---|
| 257 | |
|---|
| 258 | |
|---|
| 259 | II - Windows installation from sources |
|---|
| 260 | --------------------------------------- |
|---|
| 261 | |
|---|
| 262 | 1) Cmake and MinGW : We want it ! Who can help us in this MinGW porting work :-? |
|---|
| 263 | |
|---|
| 264 | 2) Cmake and MS VC++ 2005 (8) / 2008 (9) / 2010 (10) on Windows XP 32 |
|---|
| 265 | |
|---|
| 266 | Note: If you use an "Express" version, don't forget to install also the Windows SDK. |
|---|
| 267 | |
|---|
| 268 | a. Install CMake v2.6+ http://www.cmake.org/cmake/resources/software.html |
|---|
| 269 | b. Download the official tarballs from SF.net |
|---|
| 270 | http://sourceforge.net/projects/speed-dreams/files/2.0.0 |
|---|
| 271 | (speed-dreams-src-<package>-<version>.tar.xz) |
|---|
| 272 | c. Extract their contents to your local disk (7Zip is an excellent tool for that), |
|---|
| 273 | all in the same target folder. |
|---|
| 274 | Warning: You need to extract all of the source packages in order to start building |
|---|
| 275 | (see ablove 2-a chapter for more). |
|---|
| 276 | d. Download the "MSVC 2005" release of the "3rdParty" package on SF.net |
|---|
| 277 | http://sourceforge.net/projects/speed-dreams/files/3rd%20party |
|---|
| 278 | (it contains necessary 3rd party libs compiled with/for MSVC 2005) |
|---|
| 279 | e. Extract from the zip file the "3rdParty" directory to where speed-dreams sources |
|---|
| 280 | are installed. |
|---|
| 281 | Example: If sources are in c:\gamesources\speed-dreams\src-2.0.0 |
|---|
| 282 | (inside which you should find at least the "src" and "data" folders), |
|---|
| 283 | then extract 3rd party zip in c:\gamesources\speed-dreams\3rdParty |
|---|
| 284 | (inside which you should find at least the "include" and "lib" folders), |
|---|
| 285 | f. Startup CMake and set : |
|---|
| 286 | * "Where is the source code" to c:\gamesources\speed-dreams\src-2.0.0 |
|---|
| 287 | * "Where to build the binaries" to c:\gamesources\speed-dreams\src-2.0.0\build |
|---|
| 288 | (if you follow the folder specs above). |
|---|
| 289 | g. Press "Configure" button, answer "Yes, create the ...\build folder" |
|---|
| 290 | and select the compiler. |
|---|
| 291 | Press the "Configure" button again, until the "OK" button is no more greyed. |
|---|
| 292 | h. Press the "Generate" button. CMake will generate the solution file "speed-dreams-2.sln" |
|---|
| 293 | and associated project files (*.vcproj) in the ...\build folder |
|---|
| 294 | (Note : .sln/.vcproj are OK for MSVC 2005, but you might get other files extensions |
|---|
| 295 | the later MSVC versions). |
|---|
| 296 | i. Load speed-dreams-2.sln in MSVC IDE. |
|---|
| 297 | j. Select the build configuration (Debug, Release, ...). |
|---|
| 298 | k. Build the whole Solution (Build / Build Solution) |
|---|
| 299 | l. Build the 'INSTALL' project (right click on it and select Build). |
|---|
| 300 | m. Double-click on speed-dreams-2.exe in c:\Program Files\speed-dreams-2\bin |
|---|
| 301 | |
|---|
| 302 | Note: First-ever startups sometimes fail to correctly write the necessary stuff |
|---|
| 303 | into <My documents>\speed-dreams-2.settings and this prevents the game from starting. |
|---|
| 304 | If this happens, simply remove the <My documents>\speed-dreams-2.settings folder |
|---|
| 305 | with Windows explorer, and restart the game : it should now work. |
|---|
| 306 | |
|---|
| 307 | Note: This should also work with MSVC 2008/2010. |
|---|
| 308 | For MSVC 2003, you'll probably need to rebuild |
|---|
| 309 | a dedicated 3rdParty package for this compiler |
|---|
| 310 | |
|---|
| 311 | Note : If you need to recompile the 3rdParty package from sources, |
|---|
| 312 | (the "Sources" release of the "3rdParty" package on SF.net Download page) |
|---|
| 313 | be carefull then to rebuild : |
|---|
| 314 | - everything possible |
|---|
| 315 | - for the same configuration (don't mix Release and Debug) |
|---|
| 316 | - everything for multithreaded DLL integration (/MD & /MDd), |
|---|
| 317 | ... or be ready for headaches, and no support at all ;-) |
|---|
| 318 | |
|---|
| 319 | |
|---|
| 320 | 3) MS VC++ 6 : No more supported. |
|---|
| 321 | |
|---|
| 322 | III - FreeBSD installation from sources |
|---|
| 323 | --------------------------------------- |
|---|
| 324 | |
|---|
| 325 | Mostly the same as for "Linux installation from sources" ... |
|---|
| 326 | |
|---|
| 327 | Some specific details though : |
|---|
| 328 | |
|---|
| 329 | 2 - Installation from official tarballs |
|---|
| 330 | |
|---|
| 331 | b - build and install: |
|---|
| 332 | |
|---|
| 333 | 1. cd $HOME/sd/2.0.0/build |
|---|
| 334 | 2. ccmake .. |
|---|
| 335 | 3. press (t) for advanced options |
|---|
| 336 | 4. wanted rows CMake CPPFLAGS |
|---|
| 337 | 5. press (enter) |
|---|
| 338 | 6. add /usr/local/include |
|---|
| 339 | 7. press (enter) |
|---|
| 340 | 8. press (c) for configure |
|---|
| 341 | 9. press (g) for generate and press (e) |
|---|
| 342 | 10. make && sudo make install |
|---|
| 343 | |
|---|
| 344 | |
|---|
| 345 | TO BE COMPLETED |
|---|
| 346 | |
|---|
| 347 | |
|---|
| 348 | IV - MacOS X installation from sources |
|---|
| 349 | -------------------------------------- |
|---|
| 350 | |
|---|
| 351 | To do ... |
|---|
| 352 | |
|---|