Changes between Version 122 and Version 123 of BuildInstructions


Ignore:
Timestamp:
May 15, 2011, 8:19:07 PM (13 years ago)
Author:
Philip Taylor
Comment:

reorganise a little

Legend:

Unmodified
Added
Removed
Modified
  • BuildInstructions

    v122 v123  
    5555 * Build again.
    5656
    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 ==
    6158
    6259 * 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)
    6461   * Subversion
    6562   * NASM
     
    8582#!html
    8683<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-dev
     84sudo 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
    8885</pre>
    8986}}}
     87     * You can also use `libcurl4-openssl-dev` instead of `libcurl4-gnutls-dev` (it's not possible to install both at once).
    9088   * For '''Mandriva''' (tested with 2009.1):
    9189     {{{
     
    9593</pre>
    9694}}}
    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].
    9896   * For '''Fedora''' (tested with 14):
    9997 {{{
     
    108106svn co http://svn.wildfiregames.com/public/ps/trunk/ 0ad
    109107cd 0ad/build/workspaces
    110 ./update-workspaces.sh
     108./update-workspaces.sh -j3
    111109cd gcc
    112110make CONFIG=Release -j3
    113111}}}
    114112 "`-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).
    116114 * The Release mode builds are more optimised, are harder to debug. Use `CONFIG=Debug` (and run `pyrogenesis_dbg`) if you need better debugging support.
    117115 * 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.
     
    123121}}}
    124122
    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
     125If 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
     129set -e
    128130svn up
    129131cd build/workspaces
     
    135137}}}
    136138
    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 
     139If you want to rebuild after just changing a source code file, you only need to run the command:
     140{{{
     141make CONFIG=Release -j3
     142}}}
     143
     144If you want to rebuild quickly after updating from SVN, you can usually get away with:
     145{{{
    147146svn up
    148 
    149147cd build/workspaces
    150 ./clean-workspaces.sh
    151148./update-workspaces.sh
    152149cd gcc
    153 make CONFIG=Release clean
    154 make CONFIG=Release -j4
    155 cd $srcHome/binaries/system/
    156 ./test
    157 }}}
    158 
    159 
    160 === OS X ===
     150make CONFIG=Release -j3
     151}}}
     152If 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 ==
    161155The process on OS X is similar to Linux:
    162156
     
    198192 * Then, restart the compilation starting from `./update-workspace.sh`
    199193
    200 === Known problems and solutions ===
     194== Known problems and solutions ==
    201195 * 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.
    202196