Changes between Version 379 and Version 380 of BuildInstructions


Ignore:
Timestamp:
Nov 30, 2020, 10:12:59 AM (3 years ago)
Author:
wraitii
Comment:

Some changes for upcoming SM/C++17

Legend:

Unmodified
Added
Removed
Modified
  • BuildInstructions

    v379 v380  
    1616   * [#Windows Windows] (7 or newer)
    1717   * [#Linux Linux]
    18    * [#OSX macOS / OS X] (10.7/Lion or newer)
     18   * [#OSX macOS / OS X] (10.13/High Sierra or newer)
    1919   * [#BSD FreeBSD/OpenBSD] (only experimental support at this time)
    2020 * Up-to-date system software (Windows service packs, graphics driver updates, etc)
     
    3131Libraries 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.
    3232
    33 Workspaces contain the integrations for code editors (such as Visual Studio, Xcode, etc.) as well as the Makefile for the main source code. The workspaces are auto-generated by the `update-workspaces` script from the `buids/workspaces/` directory.  Once ready, the integrations are ready for use, such as `build/workspaces/gcc/Makefile` (for Linux and macOS) and `build\workspaces\vc2015` (for Windows).
     33Workspaces contain the integrations for code editors (such as Visual Studio, Xcode, etc.) as well as the Makefile for the main source code. The workspaces are auto-generated by the `update-workspaces` script from the `buids/workspaces/` directory.  Once ready, the integrations are ready for use, such as `build/workspaces/gcc/Makefile` (for Linux and macOS) and `build\workspaces\vs2017` (for Windows).
    3434
    3535Finally, the source code is build by the workspace. For example, by running `make` in `build/workspaces/gcc`.
     
    4545If you want to develop, the only supported IDE is:
    4646
    47  * Visual C++ 2015
     47 * Visual C++ 2017
    4848
    4949'''Important notes:'''
    5050
    51  * We have dropped support for older versions of Visual Studio when moving to C++11, see #2669.
    52  * XP and Vista are supported as targets, but not for installing Visual Studio 2015.
     51 * We have dropped support for older versions of Visual Studio when moving to C++14, see #5862.
     52 * XP and Vista are supported as targets, but not for installing Visual Studio 2017.
    5353 * Only 32-bit builds are supported, though they can be compiled and run on 64-bit Windows.
    5454
     
    5858
    5959=== Setting up the build environment ===
    60 The game must be compiled with Microsoft Visual C++. You can get the free 2015 Community edition here: [https://www.visualstudio.com/vs/older-downloads/ Visual Studio older downloads]. You can also install Visual Studio 2017/2019 and choose to install the 2015 compiler (version 14.0). When choosing Visual Studio 2019, firstly Visual Studio 2015 have to be installed to be able to select the 2015 compiler.
     60The game must be compiled with Microsoft Visual C++. You can get the free 2017 Community edition here: [https://www.visualstudio.com/vs/older-downloads/ Visual Studio older downloads]. You can also install Visual Studio 2019 and choose to install the 2017 compiler (version 14.0).
    6161
    6262The Visual Studio project/solution files are automatically generated from the source files:
    6363
    6464 * Run `cd build\workspaces` and then [source:/ps/trunk/build/workspaces/update-workspaces.bat update-workspaces.bat].
    65  * Open `build\workspaces\vc2015\pyrogenesis.sln`.
     65 * Open `build\workspaces\vs2017\pyrogenesis.sln`.
    6666
    6767=== Build configuration ===
     
    9595First you need to install various standard tools and development libraries:
    9696
     97 * a C++17 conforming compiler
     98 * the rust compiler and toolchain
    9799 * Boost (at least 1.57 since r21726)
    98100 * CMake (only needed if you use bundled NVTT)
    99  * GCC (at least 4.8.1, required by C++11 features)
    100101 * Python 2.7 (required for cxxtest and non-system SpiderMonkey 45)
    101102 * libcurl (at least 7.32)
     
    142143     * `./update-workspaces.sh --with-system-nvtt`
    143144     * If the game crashes at startup (#5757), you might need to use the bundled NVTT instead of the system-provided one: see below.
    144  * If you want to use a packaged **mozjs45**, which will be made available for example in [https://launchpad.net/~wfg/+archive/ubuntu/0ad.dev/+packages 0ad.dev PPA]:
    145    * you should add `libmozjs-45-dev` and run `update-workspace.sh` with `--with-system-mozjs45`.
     145 * If you want to use a packaged **SpiderMonkey**, which will be made available for example in [https://launchpad.net/~wfg/+archive/ubuntu/0ad.dev/+packages 0ad.dev PPA]:
     146   * you should add `libmozjs-68-dev` and run `update-workspace.sh` with `--with-system-mozjs`.
    146147 * When not using system nvidia-texture-tools, `libnvtt-dev` can be omitted, but `cmake` is needed to build the bundled NVTT.
    147148 * You can also use `libcurl4-openssl-dev` instead of `libcurl4-gnutls-dev` (it's not possible to install both at once), but [http://lintian.debian.org/tags/possible-gpl-code-linked-with-openssl.html note that openssl is not GPL compatible and the resulting binaries could not be redistributed].
     
    422423
    423424=== Dependencies ===
    424 1. '''Apple Command Line Tools for Xcode'''. There are a number of command-line tools you need that are not installed on macOS by default. Instead, these are available as a separate free download from Apple.  '''This does not include or require Xcode.''' It is branded as "for Xcode" but it works by itself.
    425    * If you're using macOS 10.7 Lion or later, install this package from [https://developer.apple.com/downloads/index.action Apple Developer Downloads]. You need a (free) Apple ID to access the download.
    426    * See [https://developer.apple.com/library/archive/technotes/tn2339/_index.html Apple Command Line FAQ] for additional instructions.
    427 2. Python 2.7.3 or later If you're on Mountain Lion (10.8) or earlier, you will need to first update your Python installation with the latest 2.7.x installer from [https://www.python.org/downloads/release/python-279/ here].
     4251. Install Xcode, version 10.1+ is recommended. Only 10.13+ are supported to compile the game.
     4262. Install the command line tools for Xcode:
     427   * Open a Terminal window and enter `xcode-select --install`.
     4282. Install the rust toolchain.
     429   * Open a Terminal window and enter `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`.
     430   * See https://www.rust-lang.org/tools/install for more information.
    4284313. CMake:
    429    * If you have [https://brew.sh/ Homebrew] installed, use [https://brewformulas.org/Cmake `brew install cmake`].
     432   * (recommended) If you have [https://brew.sh/ Homebrew] installed, use [https://brewformulas.org/Cmake `brew install cmake`].
    430433   * 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**.
    431434     * '''Note:''' Recent versions have no installer, so after copying the app bundle to '''Applications''', you need to run CMake with elevated permissions to install the command line tools. From the terminal: `sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install`.
     
    468471binaries/system/pyrogenesis
    469472}}}
    470  * '''Note:''' Newer versions of Xcode no longer include the command line tools by default, you need to install them as described above.
    471  * '''Note:''' It is recommended to use the command line build, since the Xcode build is not as well-tested, but Xcode's IDE can be very useful for code editing.
    472473
    473474== Create macOS distributable app bundle ==
     475'''This is outdated and will soon change.'''
     476
    474477 * You will need Xcode installed (for its SDKs)
    475478 * Open [source:/ps/trunk/build/workspaces/build-osx-bundle.sh build/workspaces/build-osx-bundle.sh] and read the comments. You will need to change a few settings depending on your version of macOS, Xcode, etc.
     
    543546
    544547=== OpenBSD ===
    545  * As we require GCC 4.8.1+ you need to set `CC` and `CXX` before building
     548 * You need to set `CC` and `CXX` before building
    546549{{{
    547550#!sh