Changes between Version 397 and Version 398 of BuildInstructions
- Timestamp:
- Feb 20, 2021, 11:14:48 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildInstructions
v397 v398 22 22 23 23 == Introduction == 24 25 24 The development environment for 0 A.D. is comprised of three layers. Each goes on top of the previous: 26 25 27 1. Libraries.28 2. Workspaces.29 3. Source code.26 1. Libraries. 27 1. Workspaces. 28 1. Source code. 30 29 31 30 Libraries 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. … … 54 53 55 54 === Getting the code === 56 57 55 See [wiki:BuildInstructionsGettingTheCode Getting the Code]. 58 56 … … 86 84 87 85 === Building Windows dependencies === 88 89 86 By default windows come with prebuilt libraries but you might want to rebuild them yourself, to do so follow the instructions at BuildingWindowsDependencies. 90 87 … … 171 168 gloox-devel libicu-devel miniupnpc-devel fmt-devel 172 169 }}} 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`. 175 171 176 172 ==== openSUSE ==== … … 184 180 gloox-devel libicu-devel miniupnpc-devel libfmt-devel 185 181 }}} 186 187 182 ==== !ArchLinux/Manjaro ==== 188 183 {{{ … … 192 187 python2 rust sdl2 subversion wxgtk3 zip zlib 193 188 }}} 194 195 189 ==== Solus ==== 196 190 {{{ … … 198 192 sudo 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 199 193 }}} 200 201 194 ==== Slackware ==== 202 203 195 After 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. 204 196 … … 210 202 211 203 * enet 212 * fmt 213 * gloox 204 * fmt^1^ 205 * gloox^2^ 214 206 * libsodium 215 207 * miniupnpc … … 219 211 220 212 Required to build Atlas: 213 221 214 * wxGTK3 (install/build this first, required by wxPython3) 222 215 * wxPython3 … … 225 218 226 219 Default 14.2 packages: 220 227 221 {{{ 228 222 a/sed-4.2.2-x86_64-1.txz … … 241 235 x/mesa-11.2.2-x86_64-1.txz 242 236 }}} 243 244 237 Upgraded packages: 238 245 239 {{{ 246 240 OpenAL-1.18.1-x86_64-1alien.txz … … 262 256 zlib-1.2.11-x86_64-1_slack14.2.txz 263 257 }}} 264 265 258 Special packages: 259 266 260 {{{ 267 261 gloox-1.0.24-x86_64-1_SBo.tgz 268 262 kernel-headers-4.4.157-x86-1.txz 269 263 }}} 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]. 264 Notes:[[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/ 274 267 275 268 Kernel headers must match your kernel version. … … 277 270 '''''Slackware-current''''' 278 271 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 272 Get the updated build scripts from: http://ponce.cc/slackware/testing/0ad/ http://ponce.cc/slackware/testing/0ad-data/ 273 274 Make 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 276 tar xvf $CWD/$PRGNAM-$VERSION-$RELEASE-unix-build.tar.xz # cd $PRGNAM-$VERSION-$RELEASE chown -R root:root . 292 277 293 278 ==== CentOS ==== 294 295 279 Discussion of installing on //CentOS 7// can be found on the forums [https://wildfiregames.com/forum/index.php?/topic/24985-installation-on-centos-7 here]. 296 280 297 281 **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. 298 282 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//: 317 290 * 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` 320 293 * 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//: 342 302 * From https://www.boost.org/users/history/version_1_70_0.html, download `boost_1_70_0.tar.gz`. 343 303 * Uncompress archive: 344 -$ `tar -xf boost_1_70_0.tar.gz`304 * $ `tar -xf boost_1_70_0.tar.gz` 345 305 * Enter folder: 346 -$ `cd ./boost_1_70_0`306 * $ `cd ./boost_1_70_0` 347 307 * 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/`) 351 311 * 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//: 356 316 * From https://github.com/fmtlib/fmt/releases, download the latest release. 357 317 * Follow the instructions to build and install. 358 318 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`. 360 320 361 321 ==== !VoidLinux ==== … … 364 324 sudo 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 365 325 }}} 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. 326 If 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 370 328 {{{ 371 329 #!sh … … 373 331 sudo xpbs-install -Su # update, add -d for debugging, credit duncaen 374 332 }}} 375 376 377 333 === Getting the code === 378 379 334 See [wiki:BuildInstructionsGettingTheCode Getting the Code]. 380 335 … … 425 380 If 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). 426 381 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 430 384 == macOS == 431 432 385 The process on macOS is similar to Linux: 433 386 434 387 === 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: 437 390 * 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`]. 440 393 * Alternatively, open a Terminal window and enter `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`. 441 394 * See https://www.rust-lang.org/tools/install for more information. 442 3. CMake:395 1. CMake: 443 396 * (recommended) If you have [https://brew.sh/ Homebrew] installed, use [https://formulae.brew.sh/formula/cmake `brew install cmake`]. 444 397 * 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**. … … 447 400 448 401 === Getting the code === 449 450 402 See [wiki:BuildInstructionsGettingTheCode Getting the Code]. 451 403 … … 484 436 485 437 === 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. 492 439 493 440 == Create macOS distributable app bundle ==