Changes between Version 122 and Version 123 of BuildInstructions
- Timestamp:
- May 15, 2011, 8:19:07 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildInstructions
v122 v123 55 55 * Build again. 56 56 57 == Unix == 58 This is much less streamlined than the process for Windows. But you're cooler than a Windows developer, so you should be able to cope: 59 60 === Linux === 57 == Linux == 61 58 62 59 * Install various standard tools and development libraries: 63 * GCC (at least 4.0, preferably 4.3 )60 * GCC (at least 4.0, preferably 4.3 or later) 64 61 * Subversion 65 62 * NASM … … 85 82 #!html 86 83 <pre class="wiki" style="white-space: pre-wrap"> 87 sudo apt-get install subversion build-essential cmake libsdl1.2-dev zlib1g-dev libpng12-dev libjpeg62-dev libgamin-dev nasm libwxgtk2.8-dev libboost-dev libboost-signals-dev libboost-filesystem-dev libopenal-dev libalut-dev libvorbis-dev libogg-dev libdevil-dev libenet-dev libxml2-dev libcurl4-gnutls-dev libcurl4-openssl-dev84 sudo apt-get install subversion build-essential cmake libsdl1.2-dev zlib1g-dev libpng12-dev libjpeg62-dev libgamin-dev nasm libwxgtk2.8-dev libboost-dev libboost-signals-dev libboost-filesystem-dev libopenal-dev libalut-dev libvorbis-dev libogg-dev libdevil-dev libenet-dev libxml2-dev libcurl4-gnutls-dev 88 85 </pre> 89 86 }}} 87 * You can also use `libcurl4-openssl-dev` instead of `libcurl4-gnutls-dev` (it's not possible to install both at once). 90 88 * For '''Mandriva''' (tested with 2009.1): 91 89 {{{ … … 95 93 </pre> 96 94 }}} 97 No ENet package is available, so [http://enet.bespin.org/Installation.html install it from source].95 * No ENet package is available, so [http://enet.bespin.org/Installation.html install it from source]. 98 96 * For '''Fedora''' (tested with 14): 99 97 {{{ … … 108 106 svn co http://svn.wildfiregames.com/public/ps/trunk/ 0ad 109 107 cd 0ad/build/workspaces 110 ./update-workspaces.sh 108 ./update-workspaces.sh -j3 111 109 cd gcc 112 110 make CONFIG=Release -j3 113 111 }}} 114 112 "`-j3`" gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available. 115 * Alternatively you could download the code from a [http://github.com/0ad/0ad/ Git mirror] (which may be slightly less up-to-date than SVN ).113 * Alternatively you could download the code from a [http://github.com/0ad/0ad/ Git mirror] (which may be slightly less up-to-date than SVN, but likely much faster to download). 116 114 * The Release mode builds are more optimised, are harder to debug. Use `CONFIG=Debug` (and run `pyrogenesis_dbg`) if you need better debugging support. 117 115 * If you encounter any build errors, look for an existing bug report or report a new bug. Also check the [#Knownproblemsandsolutions known problems section] below. … … 123 121 }}} 124 122 125 * If you have already compiled the game from SVN and want to update to the latest version: 126 {{{ 127 cd 0ad 123 === Keeping up to date === 124 125 If you have already compiled the game from SVN and want to update to the latest version and do a complete rebuild, save the following script to a file (e.g. `rebuild.sh`) in the `0ad` directory and make it executable and run it to update: 126 127 {{{ 128 #!/bin/sh 129 set -e 128 130 svn up 129 131 cd build/workspaces … … 135 137 }}} 136 138 137 * You may don't want to type all these commands every time you test the new trunk version. 138 139 140 Simply save the following lines in a script (e.g. <yourName>.sh), place it in the 0ad source folder and make it executable. 141 142 {{{ 143 #!/bin/sh 144 145 srcHome=`pwd` 146 139 If you want to rebuild after just changing a source code file, you only need to run the command: 140 {{{ 141 make CONFIG=Release -j3 142 }}} 143 144 If you want to rebuild quickly after updating from SVN, you can usually get away with: 145 {{{ 147 146 svn up 148 149 147 cd build/workspaces 150 ./clean-workspaces.sh151 148 ./update-workspaces.sh 152 149 cd gcc 153 make CONFIG=Release clean 154 make CONFIG=Release -j4 155 cd $srcHome/binaries/system/ 156 ./test 157 }}} 158 159 160 === OS X === 150 make CONFIG=Release -j3 151 }}} 152 If the `make` line gives errors, you may need to run `make CONFIG=Release clean` before it. If the `update-workspaces.sh` gives errors, you may need to run `clean-workspaces.sh` before it. 153 154 == OS X == 161 155 The process on OS X is similar to Linux: 162 156 … … 198 192 * Then, restart the compilation starting from `./update-workspace.sh` 199 193 200 == = Known problems and solutions ===194 == Known problems and solutions == 201 195 * If you get linker errors like '''`multiple definition of '(anonymous namespace)::_1'`''', particularly when using GCC 4.1, try running `./update-workspaces.sh --without-pch` and then `cd gcc; make clean` and rebuild. 202 196