build2 | Installation

The recommended way to install or upgrade build2 is using the automated install scripts. Download a version for your platform (see below), verify its checksum, run, and follow the onscreen instructions. The script will prompt for your confirmation before building or installing anything. See the Installation FAQ for common installation questions and Other Installation Methods for alternatives (binary packages, etc).

To build and install build2 all you will need is a reasonably recent C++ compiler. See Which compilers are supported? for details.

You will normally want to keep the build directory around for upgrades or to cleanly uninstall the toolchain. An automated upgrade can be performed from any previous patch release and from the most recent previous minor version.

UNIX (Linux, Mac OS, FreeBSD)

Create the build2 build directory, for example ~/build2-build in your home directory, then run:

$ cd ~/build2-build

$ curl -sSfO https://download.build2.org/0.10.0/build2-install-0.10.0.sh

$ shasum -a 256 -b build2-install-0.10.0.sh

  a284d98246b2d2ca8e3e3cb92af5cfeed576b2e3d214710408b70d3dc58694ea

$ sh build2-install-0.10.0.sh

Or, to upgrade from 0.9.0:

$ sh build2-install-0.10.0.sh --upgrade

To uninstall:

$ sh build2-install-0.10.0.sh --uninstall

Windows with MSVC

Create the build2 build directory, for example, C:\build2-build, download build2-install-msvc-0.10.0.bat into it, start the Visual Studio x64 Command Prompt, then run:

> cd C:\build2-build

> certutil -hashfile build2-install-msvc-0.10.0.bat SHA256

  f5f86bc5dc178f7cf04b0f0dfdc31362cfc67175b9f878f0ee27075efdf0b600

> build2-install-msvc-0.10.0.bat

Or, to upgrade from 0.9.0:

> build2-install-msvc-0.10.0.bat --upgrade

Note that currently the automated upgrade process does not upgrade the baseutils package. Use the from-scratch installation if you would like to upgrade this package.

To uninstall:

$ build2-install-msvc-0.10.0.bat --uninstall

Windows with MinGW

Create the build2 build directory, for example, C:\build2-build, download build2-install-mingw-0.10.0.bat into it, start the Command Prompt, then run:

> cd C:\build2-build

> certutil -hashfile build2-install-mingw-0.10.0.bat SHA256

  20c29a293880e3cf9b3b4967d940869c4558c9d0cbd91b8ae836020c13f4ef44

> build2-install-mingw-0.10.0.bat

The build2-install-mingw script downloads and installs (into the same directory as build2) a minimal MinGW GCC distribution that is then used to compile build2. If you would prefer to use your own MinGW GCC, see the alternative installation methods below.

Or, to upgrade from 0.9.0:

> build2-install-mingw-0.10.0.bat --upgrade

Note that currently the automated upgrade process does not upgrade the baseutils and mingw packages. Use the from-scratch installation if you would like to upgrade these packages.

To uninstall:

$ build2-install-mingw-0.10.0.bat --uninstall

Other Installation Methods

The steps described above are the preferred way to install build2 for most developers. For alternative from-source installation methods that offer more control see the Installation and Upgrade manual. To manually obtain various components of the build2 toolchain refer to the Download page.

There are also third-party binary packages for Debian, Ubuntu, CentOS/RedHat, and Fedora. Note, however, that they are not tested as part of the official build2 release process and are not guaranteed to be available in the future.