Skip to content

Latest commit

 

History

History
59 lines (47 loc) · 2.92 KB

building-on-windows.md

File metadata and controls

59 lines (47 loc) · 2.92 KB

Building Executor 2000 Microsoft Windows

Executor 2000 can be built for Microsoft Windows, albeit only as a 32-bit Windows Desktop (i.e. Win32) application. The build procedure is nearly the same, however, some additional dependencies need to be installed, and then, some extra options need to be passed into CMake.

The following procedure has been used to prepare a Windows 10 machine to build Executor 2000 as a Windows app. Some of Microsoft's free, time-use-limited Windows VM images have, in the past, been sufficient to build Executor 2000. If you try this, please note that these VMs did have some, but not all of the above dependencies already installed.

Command line steps be performed once Visual Studio 2017 is installed, by running the Start Menu searchable program, Developer Command Prompt for VS 2017

  1. install Git
  2. install CMake
  3. install LLVM. (8.0.0, pre-built binaries have been used, for example.)
  4. install Visual Studio 2017, plus it's Desktop Development with C++ option
  5. install the VS-2017 add-on, LLVM Compiler Toolchain
  6. install perl and bison, via MinGW-get's packages for msys-bison-bin and msys-perl-bin - MinGW Getting Started
  7. add perl and bison to path. If MinGW is installed to C:\MinGW, the directory to add to PATH should be, C:\MinGW\msys\1.0\bin.
  8. install vcpkg. Installation to C:\vcpkg is recommended (but not strictly required, perhaps).
  9. use vcpkg to build and install Qt5, SDL2, and Boost. This may take multiple hours to perform (due primarily to Qt).
    1. cd C:\vcpkg
    2. vcpkg install sdl2 boost-filesystem boost-system qt5-base

With the above steps performed, building was done using the normal procedure, as listed above), but with the cmake-configuration step (aka. cmake ..) being issued as such:

cmake -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -T"llvm" ..

The important and new parts here are:

  • -DCMAKE_TOOLCHAIN_FILE=...: lets the build system know about the vcpkg-installed dependencies.
  • -T"llvm": lets the build system know to use Clang to compile C/C++ code (rather than Microsoft's Visual C++ engine, for example).

By default, the build step (of cmake --build .) will generate a Debug build. To make a Release build, run the build step as such:

cmake --build . --config Release

The resulting executor.exe will be in the Release sub-folder (or Debug, for Debug builds).