Changes between Version 129 and Version 130 of BuildInstructions


Ignore:
Timestamp:
Jul 7, 2011, 3:55:11 PM (13 years ago)
Author:
hennr
Comment:

reorganized the whole linux section to make it much more readable

Legend:

Unmodified
Added
Removed
Modified
  • BuildInstructions

    v129 v130  
    5757== Linux ==
    5858
    59  * Install various standard tools and development libraries:
    60    * GCC (at least 4.0, preferably 4.3 or later)
    61    * Subversion
    62    * NASM
    63      * There is a [http://sourceforge.net/tracker/?func=detail&aid=2821249&group_id=6208&atid=106208 bug] in NASM 2.06 on x86_64, so you might want to try a different version if you get errors.
    64    * SDL
    65    * Boost
    66    * zlib
    67    * libpng
    68    * libxml2
    69    * OpenGL
    70    * OpenAL
    71    * zip (needed by spidermonkey)
    72    * libogg
    73    * libvorbis
    74    * libcurl
    75    * wxWidgets (probably called wxgtk on Linux) (optional, but required for the editor tools)
    76    * Gamin (FAM should work too) (Linux only)
    77    * ENet (pass the flag `--with-system-enet` to `update-workspaces.sh` to use the installed version, otherwise an included version will be used)
    78    * DevIL
    79    * CMake
    80    * ''Optionally'': [http://code.google.com/p/nvidia-texture-tools NVTT] (pass the flag `--with-system-nvtt` to `update-workspaces.sh` to use the installed version; otherwise we'll automatically use a bundled copy of the library)
    81    * For '''Ubuntu''' or '''Debian''' (at least unstable and testing) the following might help:
    82  {{{
     59Linux is a supported platform as well. 0ad runs smoothly, just give it a try!
     60
     61==== Dependecies ====
     62
     63First you need to install various standard tools and development libraries:
     64
     65 * GCC (at least 4.0, preferably 4.3 or later)
     66 * Subversion (or git if you want to use the git mirror; read below)
     67 * NASM
     68  * There is a [http://sourceforge.net/tracker/?func=detail&aid=2821249&group_id=6208&atid=106208 bug] in NASM 2.06 on x86_64, so you might want to try a different version if you get errors.
     69 * SDL
     70 * Boost
     71 * zlib
     72 * libpng
     73 * libxml2
     74 * OpenGL
     75 * OpenAL
     76 * zip (needed by spidermonkey)
     77 * libogg
     78 * libvorbis
     79 * libcurl
     80 * Gamin (FAM should work too, but is considered deprecated)
     81 * ENet (pass the flag `--with-system-enet` to `update-workspaces.sh` to use the installed version, otherwise an included version will be used)
     82 * DevIL
     83 * CMake
     84 * '''Optionally''' for editor tools: wxWidgets (probably called wxgtk)
     85 * '''Optionally''' for Nvidia cards: [http://code.google.com/p/nvidia-texture-tools NVTT] (pass the flag `--with-system-nvtt` to `update-workspaces.sh` to use the installed version; otherwise we'll automatically use a bundled copy of the library)
     86
     87==== Debian/Ubuntu ====
     88
     89Install the dependencies like this:
     90   
     91{{{
    8392#!html
    8493<pre class="wiki" style="white-space: pre-wrap">
     
    8695</pre>
    8796}}}
    88      * You can also use `libcurl4-openssl-dev` instead of `libcurl4-gnutls-dev` (it's not possible to install both at once).
    89    * For '''Mandriva''' (tested with 2009.1):
    90      {{{
     97 * You can also use `libcurl4-openssl-dev` instead of `libcurl4-gnutls-dev` (it's not possible to install both at once).
     98
     99==== Mandriva ====
     100
     101'''Note: '''No ENet package is yet available, so [http://enet.bespin.org/Installation.html install it from source].
     102
     103Install the rest of the dependencies like this (tested with 2009.1):
     104
     105{{{
    91106#!html
    92107<pre class="wiki" style="white-space: pre-wrap">
     
    94109</pre>
    95110}}}
    96      * No ENet package is yet available (see: https://admin.fedoraproject.org/pkgdb/acls/name/enet), so [http://enet.bespin.org/Installation.html install it from source].
    97    * For '''Fedora''' (tested with 14 and 15):
    98  {{{
     111     
     112==== Fedora ====
     113
     114Install the dependencies like this (tested with 14 and 15):
     115
     116{{{
    99117#!html
    100118<pre class="wiki" style="white-space: pre-wrap">
     
    103121}}}
    104122
    105  * Download and compile the code with:
    106  {{{
     123=== Getting the code ===
     124
     1250ad gets distributed in 2 ways.
     126The deveolpment finds place via SVN but there is also a git mirror. The mirror may be slightly less up-to-date but usually offers faster downloads.
     127
     128To checkout the svn trunk, run this command:
     129
     130{{{
    107131svn co http://svn.wildfiregames.com/public/ps/trunk/ 0ad
     132}}}
     133
     134To use the git mirror, use this command:
     135{{{
     136git clone https://github.com/0ad/0ad.git
     137}}}
     138
     139=== Building ===
     140
     141Compile the code with:
     142{{{
    108143cd 0ad/build/workspaces
    109144./update-workspaces.sh -j3
     
    111146make CONFIG=Release -j3
    112147}}}
    113  "`-j3`" gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available.
    114  * 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).
    115  * The Release mode builds are more optimised, are harder to debug. Use `CONFIG=Debug` (and run `pyrogenesis_dbg`) if you need better debugging support.
    116  * 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.
    117  * Run the automated tests to verify that everything works as expected, then run the game:
    118  {{{
    119 cd ../../../binaries/system
    120 ./test
    121 ./pyrogenesis
    122 }}}
     148
     149 * '''-j3''' gives the number of parallel builds to run, and should typically be one plus the number of CPU cores available.
     150 * The '''Release''' mode builds are more optimised, are harder to debug. Use `CONFIG=Debug` (and run `pyrogenesis_dbg`) if you need better debugging support.
     151
     152
     153If you encounter any build errors, review the [http://trac.wildfiregames.com/report existing bug reports], check the [#Knownproblemsandsolutions known problems section] or please file a [http://trac.wildfiregames.com/newticket new bug in the tracker].
     154
     155=== Testing ===
     156
     157Run the automated tests to verify that everything works as expected like this:
     158
     159{{{
     160binaries/system/test
     161}}}
     162
     163=== Running ===
     164
     165If everything went well, compiling the code worked and all tests passed, it's finally time to run the game:
     166
     167{{{
     168binaries/system/pyrogenesis
     169}}}
     170
    123171
    124172=== Keeping up to date ===
    125173
    126 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:
     174If you already checked out the code and only want to update und rebuild it, you may find it helpful to save the lines below to a script called e.g. `rebuild.sh`, place it  in your 0ad directory, make it executable and run it.
    127175
    128176{{{
     
    138186}}}
    139187
    140 If you want to rebuild after just changing a source code file, you only need to run the command:
     188If you just edited one source code file and want to rebuild, you can usually get away with:
    141189{{{
    142190make CONFIG=Release -j3
     
    213261== Creating Linux packages ==
    214262
    215 If you want to create packages for a Linux distro, see the current [https://build.opensuse.org/package/files?package=0ad&project=games 0ad] and [https://build.opensuse.org/package/files?package=0ad-data&project=games 0ad-data] packages on OBS for examples (especially the `.spec` and `debian.rules` files).
     263If you want to create packages for a Linux distribution, see the current [https://build.opensuse.org/package/files?package=0ad&project=games 0ad] and [https://build.opensuse.org/package/files?package=0ad-data&project=games 0ad-data] packages on OBS for examples (especially the `.spec` and `debian.rules` files).