build2 | Installation

The easiest way to install build2 is using the automated install scripts. Download a version for your platform (see below), verify its checksum, run, and follow the onscreen instructions. See the Installation FAQ for common installation questions and problems.

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

The script will prompt for your confirmation before building or installing anything. Note also that you will normally want to keep the build directory around for upgrades or to cleanly uninstall the toolchain.

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.7.0/build2-install-0.7.0.sh

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

  36478aab7fb8636a8588bb0518b70770476b1cd3ce644ab2c72af07d9f72fa6c

$ sh build2-install-0.7.0.sh

Windows with MSVC

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

> cd C:\build2-build

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

  00a2835da9bcfcce4da8f8e891e19d72746503d896490ffdddfcac800c6d4cbc

> build2-install-msvc-0.7.0.bat

Windows with MinGW

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

> cd C:\build2-build

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

  9fe59d7f3d74159823cde67056186699cfa7f9d3af2a548a6b1e36d975492b77

> build2-install-mingw-0.7.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.

Other Installation Methods

The installation described above is the preferred way to install build2 for most developers. For alternative 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.