Soup Build Tutorial: Windows Setup

Posted by mwasplund on August 29, 2020

Overview

The first step to using any new project or tool is to get it installed and setup on your machine. This quick guide will walk through the process of getting your Windows box setup to use the Soup Command Line Application to build your C++ code.

Get A Compiler

Soup Build is at the end of the day just a build system; you will need a Compiler and Linker to do anything useful. In the future Soup will work with all compilers (and may even ship with one in the box), however, due to C++ 20 implementation limitations, its first iteration only supports the Microsoft C++ Compiler (MSVC). MSVC can be found in either Visual Studio 2019 by selecting the "Desktop development with c++" workload or in the Visual Studio 2019 Build Tools. Once installed, Soup relies on a tool called vswhere to locate the compiler installation and automatically inject it into the build execution. Note: You will want to have the latest versions of MSVC if you plan to do any C++20 Modules code, which is a main focus of the Soup build system.

Download Installer

The fastest and easiest way to get Soup is to download the installer from the latest release artifacts on GitHub. If you would like to have full control over where the executable is placed on your machine you do have the option to download the raw zip archive. This tutorial assumes that you want to take the easy path and rely on the installer.

GitHub Soup Latest Release Website

  • Step 2: Download and run the Soup.msi installer.

GitHub Soup Latest Release Dialog

Step 3: Grant permissions to the unknown installer. Note: The reason there are so many scary looking messages from Windows is because Soup is in Alpha and has not setup code signing for its installer yet. Generally you should not trust any installer that has not been signed by an offical publisher, and in this case please ensure you only download the version that is uploaded to the GitHub artifacts store. This will all be streamlined when the project enters Beta.

Windows Protected Your PC Dialog

Windows Protected Your PC More Info Dialog

Step 4: Accept the end user license agreement and complete the installation.

Soup Setup License

Soup Setup Installing

Soup Setup Finished

What Was Installed?

The installers primary job is to place all of the required executable binaries and their dependencies into the correct Soup folder under the x64 Program Files folder (C:\Program Files\SoupBuild\Soup)

Program Files Soup Folder

  • copy.exe - This is a simple CLI application that performs copy operations without touching extra folders to help with incremental builds.
  • libcrypto-3.dll + libssl-3.dll - These are the two OpenSSL runtime dlls that are used to securely connect to the Soup REST API for publishing and downloading packages.
  • LocalUserConfig.json - [Deprecated] A user override for custom properties. This file will most likely be replaced with a TOML variant to allow for system wide default overrides.
  • mkdir.exe - Similar to copy.exe, this simple Command Line Application will create a missing directory without touching all parent directories to allow for incremental builds while using Windows Detours.
  • Monitor.Detours.32.dll + Monitor.Detours.64.dll - These are the two dynamic libraries that are attached to the runtime execution of child processes using Windows Detours during build execution to track input/output files to support incremental builds.
  • Soup.exe - The main executable!
  • Soup.RecipeBuild.dll - This is the set of default build tasks that will be registered and run during all builds. They generally take the internal Recipe TOML files properties and map them to the logic that knows how to generate a graph of CL.exe, LINK.exe, COPY.exe, etc operations that make up a complete build.

Lastly the installation will register the Soup Program Files folder to the system Environment Variable PATH so it is available from all command prompts.

Edit Environment Variable Path

Give it a try!

soup version

Command Soup Version

Now that everything is setup and running check out my next set of tutorials showing how to build a simple executable.