Changes between Version 397 and Version 398 of BuildInstructions


Ignore:
Timestamp:
Feb 20, 2021, 11:14:48 PM (3 years ago)
Author:
thedwarf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildInstructions

    v397 v398  
    2222
    2323== Introduction ==
    24 
    2524The development environment for 0 A.D. is comprised of three layers. Each goes on top of the previous:
    2625
    27 1. Libraries.
    28 2. Workspaces.
    29 3. Source code.
     26 1. Libraries.
     27 1. Workspaces.
     28 1. Source code.
    3029
    3130Libraries are external dependencies (such as SpiderMonkey). For Windows and Linux, the script to create or update the Workspaces also handles installation and updating of libraries. For macOS, the `libraries/osx/build-osx-libs.sh` script should be used instead.
     
    5453
    5554=== Getting the code ===
    56 
    5755See [wiki:BuildInstructionsGettingTheCode Getting the Code].
    5856
     
    8684
    8785=== Building Windows dependencies ===
    88 
    8986By default windows come with prebuilt libraries but you might want to rebuild them yourself, to do so follow the instructions at BuildingWindowsDependencies.
    9087
     
    171168    gloox-devel libicu-devel miniupnpc-devel fmt-devel
    172169}}}
    173 
    174 * To submit a patch for review via arcanist ([wiki:Phabricator Phabricator]), php is needed:  `dnf install php-cli php-json php-xml`.
     170 * To submit a patch for review via arcanist ([wiki:Phabricator]), php is needed:  `dnf install php-cli php-json php-xml`.
    175171
    176172==== openSUSE ====
     
    184180    gloox-devel libicu-devel miniupnpc-devel libfmt-devel
    185181}}}
    186 
    187182==== !ArchLinux/Manjaro ====
    188183{{{
     
    192187    python2 rust sdl2 subversion wxgtk3 zip zlib
    193188}}}
    194 
    195189==== Solus ====
    196190{{{
     
    198192sudo eopkg install libboost-devel curl-devel enet-devel gloox-devel libicu-devel libogg-devel libpng-devel libsodium-devel libvorbis-devel libxml2-devel miniupnpc-devel openal-soft-devel mesalib-devel sdl2-devel zlib-devel wxwidgets-devel libgnutls-devel fmt-devel
    199193}}}
    200 
    201194==== Slackware ====
    202 
    203195After installing the dependencies for your particular version, you can build **0 A.D.** from the [#Gettingthecode svn code] using the instructions from the [#Building Building] section.
    204196
     
    210202
    211203 * enet
    212  * fmt
    213  * gloox
     204 * fmt^1^
     205 * gloox^2^
    214206 * libsodium
    215207 * miniupnpc
     
    219211
    220212Required to build Atlas:
     213
    221214 * wxGTK3 (install/build this first, required by wxPython3)
    222215 * wxPython3
     
    225218
    226219Default 14.2 packages:
     220
    227221{{{
    228222a/sed-4.2.2-x86_64-1.txz
     
    241235x/mesa-11.2.2-x86_64-1.txz
    242236}}}
    243 
    244237Upgraded packages:
     238
    245239{{{
    246240OpenAL-1.18.1-x86_64-1alien.txz
     
    262256zlib-1.2.11-x86_64-1_slack14.2.txz
    263257}}}
    264 
    265258Special packages:
     259
    266260{{{
    267261gloox-1.0.24-x86_64-1_SBo.tgz
    268262kernel-headers-4.4.157-x86-1.txz
    269263}}}
    270 
    271 Notes:
    272 
    273 Gloox 1.0.24 was created using src2pkg or this [https://slackbuilds.org/repository/14.2/libraries/gloox/ Slackbuild]. If using the slackbuild script open the Slackbuild script and change version from 1.0.13 to 1.0.24 and compile with this [https://camaya.net/download/gloox-1.0.24.tar.bz2 tarball].
     264Notes:[[BR]]^1^Gloox 1.0.24 was created using src2pkg or this [https://slackbuilds.org/repository/14.2/libraries/gloox/ Slackbuild]. If using the slackbuild script open the Slackbuild script and change version from 1.0.13 to 1.0.24 and compile with this [https://camaya.net/download/gloox-1.0.24.tar.bz2 tarball].
     265
     266^2^Fmt will need to be built using src2pkg from https://github.com/fmtlib/fmt/releases/
    274267
    275268Kernel headers must match your kernel version.
     
    277270'''''Slackware-current'''''
    278271
    279 Get the updated build scripts from:
    280 http://ponce.cc/slackware/testing/0ad/
    281 http://ponce.cc/slackware/testing/0ad-data/
    282 
    283 Make the following modifications to both 0ad.SlackBuild and 0ad-data.SlackBuild build scripts:
    284 tar xvf $CWD/$PRGNAM-$VERSION-$RELEASE-unix-build.tar.xz
    285 cd $PRGNAM-$VERSION-$RELEASE
    286 chown -R root:root .
    287 
    288 tar xvf $CWD/$PRGNAM-$VERSION-$RELEASE-unix-build.tar.xz
    289 # cd $PRGNAM-$VERSION-$RELEASE
    290 chown -R root:root .
    291 
     272Get the updated build scripts from: http://ponce.cc/slackware/testing/0ad/ http://ponce.cc/slackware/testing/0ad-data/
     273
     274Make the following modifications to both 0ad.[wiki:SlackBuild] and 0ad-data.[wiki:SlackBuild] build scripts: tar xvf $CWD/$PRGNAM-$VERSION-$RELEASE-unix-build.tar.xz cd $PRGNAM-$VERSION-$RELEASE chown -R root:root .
     275
     276tar xvf $CWD/$PRGNAM-$VERSION-$RELEASE-unix-build.tar.xz # cd $PRGNAM-$VERSION-$RELEASE chown -R root:root .
    292277
    293278==== CentOS ====
    294 
    295279Discussion of installing on //CentOS 7// can be found on the forums [https://wildfiregames.com/forum/index.php?/topic/24985-installation-on-centos-7 here].
    296280
    297281**Note:** The advice below is derived from installing in a Virtual Machine with //CentOS 7// 64-bit minimally installed. If you have //CentOS 6// (or earlier), the following steps may not be possible. Installation on a physical machine, a machine with more stuff already installed upon it, or a machine that is 32-bit, may differ slightly.
    298282
    299 1. Firstly, you will need to enable the "Extra Packages for Enterprise Linux" (or "EPEL") repository (if you haven't already). You can do this by running (as root/via sudo)
    300    {{{ #!sh
    301    yum install epel-release
    302    }}}
    303 
    304 2. Install some auxiliary packages. These are not dependencies of 0 A.D. itself, but are necessary to run update_workspaces.sh successfully. They might already be installed on your system:
    305    {{{ #!sh
    306    yum install bzip2 patch
    307    }}}
    308 
    309 3. Install the 0 A.D. dependencies that are available directly from repos:
    310    {{{ #!sh
    311    yum install cmake gcc-c++ enet-devel libglvnd-devel gloox-devel libicu-devel \
    312         libogg-devel libpng-devel libsodium-devel libvorbis-devel libxml2-devel \
    313         miniupnpc-devel openal-soft-devel subversion wxGTK3-devel zlib-devel SDL2-devel
    314    }}}
    315 
    316 4. Acquire a sufficiently recent version of //libcurl//:
     283 1. Firstly, you will need to enable the "Extra Packages for Enterprise Linux" (or "EPEL") repository (if you haven't already). You can do this by running (as root/via sudo) {{{ #!sh yum install epel-release }}}
     284
     285 2. Install some auxiliary packages. These are not dependencies of 0 A.D. itself, but are necessary to run update_workspaces.sh successfully. They might already be installed on your system: {{{ #!sh yum install bzip2 patch }}}
     286
     287 3. Install the 0 A.D. dependencies that are available directly from repos: {{{ #!sh yum install cmake gcc-c++ enet-devel libglvnd-devel gloox-devel libicu-devel \ libogg-devel libpng-devel libsodium-devel libvorbis-devel libxml2-devel \ miniupnpc-devel openal-soft-devel subversion wxGTK3-devel zlib-devel SDL2-devel }}}
     288
     289 4. Acquire a sufficiently recent version of //libcurl//:
    317290   * From this site: https://mirror.city-fan.org/ftp/contrib/libraries/, download the two files that satisfy one of the following patterns:
    318      - `libssh2-{version}.cf.rhel7.{arch}.rpm`
    319      - `libssh2-devel-{version}.cf.rhel7.{arch}.rpm`
     291     * `libssh2-{version}.cf.rhel7.{arch}.rpm`
     292     * `libssh2-devel-{version}.cf.rhel7.{arch}.rpm`
    320293   * From this site: https://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/, download the three files that satisfy one of the following patterns:
    321      - `curl-{version}.cf.rhel7.{arch}.rpm`
    322      - `libcurl-{version}.cf.rhel7.{arch}.rpm`
    323      - `libcurl-devel-{version}.cf.rhel7.{arch}.rpm`
    324    * Install some dependencies from repos:
    325      {{{ #!sh
    326      yum install nss-devel libnghttp2 libpsl libmetalink
    327      }}}
    328    * Install dependencies from downloaded packages.
    329      [[BR]][[BR]]
    330      **Note:** This will replace the version of //libssh2// that is provided by the //CentOS// official repos. This is necessary as the version of //libcurl// we're installing needs a more up-to-date version than what the official repos can provide. As the packages we've acquired are compiled as to be interoperable with //CentOS// systems, this shouldn't cause any problems with other programs installed on your system.
    331      [[BR]][[BR]]
    332      Install the `libssh2-*` and `libssh2-devel-*` packages using `rpm -Uvh`. For example:
    333      {{{ #!sh
    334      rpm -Uvh libssh2-1.8.0-8.0.cf.rhel7.x86_64.rpm libssh2-devel-1.8.0-8.0.cf.rhel7.x86_64.rpm
    335      }}}
    336    * Install the updated //curl// packages (`curl-*`, `libcurl-*` and `libcurl-devel-*`) using `rpm -Uvh`. For example:
    337      {{{ #!sh
    338      rpm -Uvh curl-7.61.1-3.0.cf.rhel7.x86_64.rpm libcurl-7.61.1-3.0.cf.rhel7.x86_64.rpm libcurl-devel-7.61.1-3.0.cf.rhel7.x86_64.rpm
    339      }}}
    340 
    341 5. Acquire a sufficiently recent version of //boost//:
     294     * `curl-{version}.cf.rhel7.{arch}.rpm`
     295     * `libcurl-{version}.cf.rhel7.{arch}.rpm`
     296     * `libcurl-devel-{version}.cf.rhel7.{arch}.rpm`
     297   * Install some dependencies from repos: {{{ #!sh yum install nss-devel libnghttp2 libpsl libmetalink }}}
     298   * Install dependencies from downloaded packages. [[BR]][[BR]] **Note:** This will replace the version of //libssh2// that is provided by the //CentOS// official repos. This is necessary as the version of //libcurl// we're installing needs a more up-to-date version than what the official repos can provide. As the packages we've acquired are compiled as to be interoperable with //CentOS// systems, this shouldn't cause any problems with other programs installed on your system. [[BR]][[BR]] Install the `libssh2-*` and `libssh2-devel-*` packages using `rpm -Uvh`. For example: {{{ #!sh rpm -Uvh libssh2-1.8.0-8.0.cf.rhel7.x86_64.rpm libssh2-devel-1.8.0-8.0.cf.rhel7.x86_64.rpm }}}
     299   * Install the updated //curl// packages (`curl-*`, `libcurl-*` and `libcurl-devel-*`) using `rpm -Uvh`. For example: {{{ #!sh rpm -Uvh curl-7.61.1-3.0.cf.rhel7.x86_64.rpm libcurl-7.61.1-3.0.cf.rhel7.x86_64.rpm libcurl-devel-7.61.1-3.0.cf.rhel7.x86_64.rpm }}}
     300
     301 5. Acquire a sufficiently recent version of //boost//:
    342302   * From https://www.boost.org/users/history/version_1_70_0.html, download `boost_1_70_0.tar.gz`.
    343303   * Uncompress archive:
    344      - $ `tar -xf boost_1_70_0.tar.gz`
     304     * $ `tar -xf boost_1_70_0.tar.gz`
    345305   * Enter folder:
    346      - $ `cd ./boost_1_70_0`
     306     * $ `cd ./boost_1_70_0`
    347307   * Compile the parts that are needed to be compiled, and install the libraries:
    348      - $ `./bootstrap.sh --with-libraries=filesystem,system`
    349      - # `./b2 install`
    350      - (Compiled files end up in `/usr/local/lib/`, header files in `/usr/local/include/boost/`)
     308     * $ `./bootstrap.sh --with-libraries=filesystem,system`
     309     * # `./b2 install`
     310     * (Compiled files end up in `/usr/local/lib/`, header files in `/usr/local/include/boost/`)
    351311   * Make sure the runtime linker can find the updated //boost// libraries:
    352      - Navigate to `/etc/ld.so.conf.d` and create a blank file called `pyro.conf`.
    353      - Within this file, enter the text `/usr/local/lib` and save.
    354 
    355 6. Acquire a sufficiently recent version of //fmt//:
     312     * Navigate to `/etc/ld.so.conf.d` and create a blank file called `pyro.conf`.
     313     * Within this file, enter the text `/usr/local/lib` and save.
     314
     315 6. Acquire a sufficiently recent version of //fmt//:
    356316   * From https://github.com/fmtlib/fmt/releases, download the latest release.
    357317   * Follow the instructions to build and install.
    358318
    359 7. You should now have all dependencies for 0 A.D. Continue by [#Gettingthecode getting the code], as described below. When you get to the part below in [#Building Building] where you run `./update-workspaces.sh`, you **must** use the argument `--prefer-local-libs`.
     319 7. You should now have all dependencies for 0 A.D. Continue by [#Gettingthecode getting the code], as described below. When you get to the part below in [#Building Building] where you run `./update-workspaces.sh`, you **must** use the argument `--prefer-local-libs`.
    360320
    361321==== !VoidLinux ====
     
    364324sudo xbps-install -Syv base-devel boost-devel cmake curl fmt-devel gcc icu-devel libcurl-devel libenet-devel libogg-devel libopenal-devel libpng-devel libsodium-devel libvorbis-devel libxml2 MesaLib-devel miniupnpc-devel patch pkg-config SDL2-devel wxWidgets-devel zip zlib
    365325}}}
    366 If there are issues, install more header files depending on the compiler's error message.
    367 pyrogenesis requires `MesaLib-devel` to provide header files for libGL.
    368 Custom compile `gloox` for the Lobby or use xbps source packages or use `update-workspaces.sh --without-lobby`.
    369 If there are unresolved shlibs or an update breaks a package, then e.g.
     326If there are issues, install more header files depending on the compiler's error message. pyrogenesis requires `MesaLib-devel` to provide header files for libGL. Custom compile `gloox` for the Lobby or use xbps source packages or use `update-workspaces.sh --without-lobby`.  If there are unresolved shlibs or an update breaks a package, then e.g.
     327
    370328{{{
    371329#!sh
     
    373331sudo xpbs-install -Su  # update, add -d for debugging, credit duncaen
    374332}}}
    375 
    376 
    377333=== Getting the code ===
    378 
    379334See [wiki:BuildInstructionsGettingTheCode Getting the Code].
    380335
     
    425380If you want to create packages for a Linux distribution see the current [https://salsa.debian.org/games-team/0ad/tree/master/debian 0ad] and [https://salsa.debian.org/games-team/0ad-data/tree/master/debian 0ad-data] packages on [https://salsa.debian.org/public Salsa] for examples (especially the `control` and `rules` files).
    426381
    427 {{{#!comment Keep anchor for convenient fragment links to the former "OS X" heading.
    428 }}}
    429 [=#OS_X]
     382{{{#!comment Keep anchor for convenient fragment links to the former "OS X" heading. }}} [=#OS_X]
     383
    430384== macOS ==
    431 
    432385The process on macOS is similar to Linux:
    433386
    434387=== Dependencies ===
    435 1. Install Xcode, version 10.1+ is recommended. Only 10.13+ are supported to compile the game.
    436 2. Install the command line tools for Xcode:
     388 1. Install Xcode, version 10.1+ is recommended. Only 10.13+ are supported to compile the game.
     389 1. Install the command line tools for Xcode:
    437390   * Open a Terminal window and enter `xcode-select --install`.
    438 2. Install the rust toolchain.
    439    * (recommended) If you have [https://brew.sh/ Homebrew] installed, use [https://formulae.brew.sh/formula/rust `brew install rust`]. 
     391 1. Install the rust toolchain.
     392   * (recommended) If you have [https://brew.sh/ Homebrew] installed, use [https://formulae.brew.sh/formula/rust `brew install rust`].
    440393   * Alternatively, open a Terminal window and enter `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`.
    441394   * See https://www.rust-lang.org/tools/install for more information.
    442 3. CMake:
     395 1. CMake:
    443396   * (recommended) If you have [https://brew.sh/ Homebrew] installed, use [https://formulae.brew.sh/formula/cmake `brew install cmake`].
    444397   * Alternatively, download a prebuilt macOS package at https://cmake.org/download/. If prompted, choose to install the "CMake command line tools" to the **default location**.
     
    447400
    448401=== Getting the code ===
    449 
    450402See [wiki:BuildInstructionsGettingTheCode Getting the Code].
    451403
     
    484436
    485437=== macOS Troubleshooting ===
    486 
    487 * `ERROR: virtualenv is not compatible with this system or executable` [[BR]]
    488   `ERROR: The executable …0ad/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/_virtualenvs/init_py3/bin/python3.9 is not functioning` [[BR]]
    489   `ERROR: It thinks sys.prefix is '/usr/local/Cellar/python@3.9/…' (should be '…/init_py3')` [[BR]]
    490   There is a known issue with how SpiderMonkey asserts whether python-virtualenv is working correctly. If you have a custom version of Python 3 installed from Homebrew, you may need to uninstall this first, by running: `brew uninstall --ignore-dependencies --force python@3.9`. Beware that if you did not explicitly choose to install this override, it likely came from another Homebrew package and uninstalling it may break that. Note that macOS 10.15+ comes with Python 3.8 by default, which means an override from Homebrew should generally not be necessary any more.
    491 
     438 * `ERROR: virtualenv is not compatible with this system or executable` [[BR]] `ERROR: The executable …0ad/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/_virtualenvs/init_py3/bin/python3.9 is not functioning` [[BR]]  `ERROR: It thinks sys.prefix is '/usr/local/Cellar/python@3.9/…' (should be '…/init_py3')` [[BR]] There is a known issue with how SpiderMonkey asserts whether python-virtualenv is working correctly. If you have a custom version of Python 3 installed from Homebrew, you may need to uninstall this first, by running: `brew uninstall --ignore-dependencies --force python@3.9`. Beware that if you did not explicitly choose to install this override, it likely came from another Homebrew package and uninstalling it may break that. Note that macOS 10.15+ comes with Python 3.8 by default, which means an override from Homebrew should generally not be necessary any more.
    492439
    493440== Create macOS distributable app bundle ==