aboutsummaryrefslogtreecommitdiff
path: root/BOOTSTRAP-WINDOWS.cli
diff options
context:
space:
mode:
Diffstat (limited to 'BOOTSTRAP-WINDOWS.cli')
-rw-r--r--BOOTSTRAP-WINDOWS.cli136
1 files changed, 136 insertions, 0 deletions
diff --git a/BOOTSTRAP-WINDOWS.cli b/BOOTSTRAP-WINDOWS.cli
new file mode 100644
index 0000000..872a10a
--- /dev/null
+++ b/BOOTSTRAP-WINDOWS.cli
@@ -0,0 +1,136 @@
+// file : BOOTSTRAP-WINDOWS.cli
+// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+"
+The following instructions are for bootstrapping \c{build2} with either MSVC
+or MinGW using the Windows command prompt. If you are using any kind of UNIX
+emulation layer (for example, MSYS2 or Cygwin) and already have a UNIX shell
+with standard utilitis, then you most likely should follow \l{#BOOTSTRAP-UNIX
+Bootstrapping on UNIX} instead.
+
+The \c{build2} toolchain on Windows requires a set of extra utilities
+(\c{install}, \c{diff}, \c{wget}, \c{tar}, etc). These are provided in the
+\c{build2-baseutils} package (see the \c{README} file inside for details).
+Normally the \c{build2} toolchain itself is installed into the same directory
+as the utilities in order to produce a combined \c{build2+utilities}
+installation.
+
+To build on Windows you will need either MSVC 14 Update 2 or later or MinGW
+GCC 4.8 or later. Note also that MinGW GCC must be configured with the
+\c{posix} threading model (this is currently the only configuration that
+implements C++11 threads; run \c{g++ --version} to verify).
+
+If you don't already have a suitable C++ compiler, then you can use the
+\c{build2-mingw} package which provides a minimal MinGW-W64 GCC distribution
+(see the \c{README} file inside for details). If used, then it should be
+unpacked into the same directory as \c{build2-baseutils} as described below.
+
+\dl|
+
+\li|1. Open Command Prompt\n
+
+Start the standard Windows Command Prompt. If you plan to build with MSVC,
+then you may go ahead and start the Visual Studio Command Prompt (or wait
+until MSVC-specific instructions).
+|
+
+\li|\n2. Create Build Directory\n
+
+Note that you will want to keep this directory around in order to upgrade
+to new toolchain versions in the future. In this guide we will use
+\c{C:\\build2-build\\} as the build directory and \c{C:\\build2\\} as the
+installation directory but you can use other paths.
+
+\
+> C:
+> cd \
+> mkdir build2-build
+> cd build2-build
+\
+
+|
+
+\li|\n3. Download Archives\n
+
+Download the following files as well as their \c{.sha256} checksums from
+\l{https://download.build2.org}, replacing \i{<arch>} with \c{x86_64} for
+64-bin Windows and with \c{i686} for 32-bit. Place everything into
+\c{C:\\build2-build\\} (build directory).
+
+\
+build2-baseutils-X.Y.Z-<arch>.zip
+build2-mingw-X.Y.Z-<arch>.tar.xz (if required)
+build2-toolchain-X.Y.Z.tar.xz
+\
+
+|
+
+\li|\n4. Verify Archive Checksums\n
+
+Verify archive checksums match:
+
+\
+> type *.sha256
+> for %f in (*.zip *.xz) do certutil -hashfile %f SHA256
+\
+
+|
+
+\li|\n5. Unpack \c{build2-baseutils}\n
+
+Unpack the \c{build2-baseutils-X.Y.Z-<arch>.zip} archive into to \c{C:\\} using
+Windows Explorer (for example, copy the archive directory and paste it).
+Rename it to \c{C:\\build2\\}. This will be the toolchain installation
+directory.
+|
+
+\li|\n6. Set \c{PATH}\n
+
+Also verify the utilities are found and work:
+
+\
+> set PATH=C:\build2\bin;%PATH%
+> where tar
+> tar --version
+\
+
+|
+
+\li|\n7. Unpack \c{build2-mingw}\n
+
+If required, unpack the \c{build2-mingw-X.Y.Z-<arch>.tar.xz} archive into
+\c{C:\\build2\\}:
+
+\
+> tar xf build2-mingw-X.Y.Z-<arch>-windows.tar.xz ^
+ --one-top-level=C:\build2 --strip-components=1
+\
+
+Verify the MinGW GCC is found and works:
+
+\
+> where g++
+> g++ --version
+\
+
+|
+
+\li|\n8. Unpack \c{build2-toolchain}\n
+
+Unpack the \c{build2-toolchain-X.Y.Z.tar.xz} archive and change to its
+directory:
+
+\
+> tar xf build2-toolchain-X.Y.Z.tar.xz
+> cd build2-toolchain-X.Y.Z
+\
+
+||
+
+If building with MSVC, continue with \l{#BOOTSTRAP-MSVC Bootstrapping with
+MSVC}.
+
+If building with MinGW, continue with \l{#BOOTSTRAP-MINGW Bootstrapping with
+MINGW}.
+"