Windows Builds

On Windows you can choose between a Visual Studio (MSVC) build or a GCC build environment. Between the two, we recommend using Visual Studio as it produces optimised builds approximately 25 to 33 percent smaller and 10% faster than the GCC equivalent.

Visual Studio

If you opt to install the full Visual Studio C++ suite from Microsoft, it will do most of the heavy lifting for you. Open the parasol folder from VS and it will auto-detect Parasol's CMake files. We recommend adding -j 8 to the cmake "Build command arguments" input box for faster builds.

Once built, VS can run Fluid scripts using the parasol.exe program. The .vs/launch.vs.json file manages launch configuration, and a working example is included below.

{
  "version": "0.2.1", "defaults": {},
  "configurations": [ {
      "type": "launch",
      "project": "CMakeLists.txt",
      "projectTarget": "parasol.exe (Install)",
      "name": "Widgets Demo",
      "args": [ "--log-api", "${workspaceRoot}/examples/widgets.fluid" ]
    }
  ]
}

MSVC Shell

It is possible to forgo the Visual Studio UI and opt for a leaner build environment with MSVC Build Tools. This is a more hands-on build process. Obtain the Microsoft C++ Build Tools and choose 'Desktop Development with C++' on install. Your Start Menu will include a new launch option for 'Developer PowerShell for VS' that you can use to open a correctly preconfigured build environment.

Using PowerShell you should cd to the Parasol Framework folder and run cmake for configuration as follows:

cmake -S . -B visual-studio -DCMAKE_INSTALL_PREFIX=local -DBUILD_DEFS=OFF -DPARASOL_STATIC=ON

To compile a release build, run cmake --build visual-studio -j 8 --config Release.

To install a release build to the local folder, run cmake --install visual-studio --config Release.

Debug builds are created by switching from --config Release to --config Debug in the above.

GCC (MSYS & MinGW)

MSYS2 and MinGW are required for a GCC based Windows build. Please note that the default MSYS2 release of GCC is not supported. The MinGW toolchain must be installed as indicated below.

  • Download the MSYS2 archive and install to C:\msys64.
  • Launch MSYS2 and run pacman -Syu; relaunch MSYS2 and run pacman -Syu again.
  • Install all necessary dev packages with pacman -S base-devel gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain
  • Install Cmder
  • Run Cmder, open Settings, then under Tasks add a new MINGW64 shell with a command script of set MSYSTEM=MINGW64 & set "PATH=/mingw64/bin;%PATH%" & C:\msys64\usr\bin\bash.exe --login -i
  • Open a new console tab and you should see a bash shell. Enter gcc --version to ensure that the build environment's gcc executable is accessible.

From the Parasol Framework folder, the following will configure the build process, compile the framework and then install it:

cmake -S . -B release -DCMAKE_BUILD_TYPE=Release -G"MinGW Makefiles"
cmake --build release -j 8 -- -O
cmake --install release

If you need to use GDB to debug the framework then the following would suffice. In this case we are going to install to a local folder so that the build will not interfere with the release installation.

cmake -S . -B debug -DCMAKE_BUILD_TYPE=Debug -G"MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=local -DBUILD_DEFS=OFF
cmake --build debug -j 8 -- -O
cmake --install debug