Changes between Version 96 and Version 97 of BuildInstructions


Ignore:
Timestamp:
Aug 16, 2010, 2:39:10 AM (14 years ago)
Author:
Philip Taylor
Comment:

refer to existing package examples; suggest Release mode by default

Legend:

Unmodified
Added
Removed
Modified
  • BuildInstructions

    v96 v97  
    8686 * `./update-workspaces.sh` (if you update to a later version of the code from SVN, you should run this again each time)
    8787 * `cd gcc`
    88  * `make -j3` (where `3` is the number of parallel builds to run, and could perhaps be one plus the number of CPU cores available)
     88 * `make CONFIG=Release -j3` (where `3` is the number of parallel builds to run, and could perhaps be one plus the number of CPU cores available)
    8989   * '''Note''': Parallel building can cause errors due to race conditions. Run a "make clean" and try just "make" if you encounter problems.
     90   * The Release mode builds are more optimised, are harder to debug. Use `CONFIG=Debug` (and run `pyrogenesis_dbg`) if you are developing engine code that needs debugging.
    9091 * 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.
    9192 * `cd ../../../binaries/system`
    92  * Optionally, run the automated tests to verify that everything works as expected: `./test_dbg`
    93  * Run the game: `./pyrogenesis_dbg`
    94  * Optionally, run the map editor: `./pyrogenesis_dbg -editor`
    95 
    96 By default, the game is compiled in an unoptimised debug configuration, so that errors are easier to detect and understand and fix. To compile an optimised version, build with `CONFIG=Release make` and then run the game as `./pyrogenesis`
     93 * Optionally, run the automated tests to verify that everything works as expected: `./test`
     94 * Run the game: `./pyrogenesis`
     95 * Optionally, run the map editor: `./pyrogenesis -editor`
    9796
    9897=== OS X ===
     
    155154== Creating Linux packages ==
    156155
    157 This section is for people creating installable packages for Linux distros.
    158 
    159 Download the `build` tarball listed above. Follow the SVN build instructions. The default is an unoptimised debug-mode build (this is helpful since the game is unstable and buggy); if you want an optimised harder-to-debug build instead, compile with `CONFIG=Release make`.
    160 
    161 Run the automated tests to make sure nothing is broken: run `./test_dbg` (or `./test` for Release builds) from `binaries/system/`. There should be no error output. (There may be a harmless warning about missing component scripts; files from the `data` tarball are needed for some test cases, but it's fine to ignore these if you're just testing the package build.)
    162 
    163 You need to distribute the following files from `binaries/system/`:
    164  * `pyrogenesis_dbg` (Debug build) or `pyrogenesis` (Release build)
    165  * `libCollada_dbg.so` or `libCollada.so`
    166  * `libAtlasUI_dbg.so` or `libAtlasUI.so`
    167  * `libmozjs-ps-debug.so` or `libmozjs-ps-release.so`
    168 You also need to distribute the contents of the `data` tarball. You don't need to distribute anything from the `build` tarball. The executables should be located in a directory alongside the `data` tarball's `binaries/data/` directory, so they can access it as `../data/` relative to the executables path. (They don't need to be in a directory called `system/`, and that directory doesn't need to be in one called `binaries/`, if you prefer different names). The whole thing should probably go somewhere like `/opt/0ad/`, and you might want to set up a script with a nice name like `/usr/bin/0ad` to run it, depending on local conventions. See #492 for some files that might be useful.
    169 
    170 These directories and files should be read-only; all per-user output goes in [http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html XDG basedir] locations (unless we have bugs).
     156If 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).