Skip to content

Compiling With Visual Studio

OmniBlade edited this page Dec 6, 2019 · 8 revisions

Requirements

In order to build Thyme, you need to download and install the following programs:

Visual Studio additional notes

When installing make sure you include the C++ development tools when given the option of what components to install. Also, make sure to update Visual Studio to the latest version to prevent potential problems.

Building Thyme

Downloading the source using git

Note: this could also be done by using GitHub Desktop, but in this guide we will assume you used the Git client.

  1. Assuming you installed the mainline Windows Git client, open Git GUI.
  2. Click on "Clone Existing Respository"

Clone%20Existing

  1. Enter the source location and the target directory. For the source location you want 'https://github.com/TheAssemblyArmada/Thyme.git'.
  2. Enter in the target directory. This can be where ever is convenient on your system.

Clone%20Settings

  1. Now just click the "Clone" button and wait for the download to complete.

Configuring with CMake

  1. Open CMake (cmake-gui).
  2. Either browse to the directory that you cloned the repository to (target directory) or just type it for the "Where is the source code" box.
  3. For the "Where to build the binaries" box we recommend that you use a subdirectory under the folder that you cloned to called "build" as in the screen shot below.

CMake%20Paths

  1. Click the "Configure" button.
  2. Select the appropriate Visual Studio generator, either 2017 or 2019. This depends on which version of Visual Studio you previously installed. For the 2019 generator and later you must specifically choose the 32bit generator as it defaults to 64bit, 32bit is the default for 2017 and earlier. Do not try to use the Win64 generators as this will produce a malfunctioning build.
  3. Click on "Finish." CMake will now do some testing to check you have working compilers installed and try and detect any required development libraries, such as the previously installed DirectX SDK.

CMake%20Generator

  1. Once complete, the main window of CMake will fill with the various parameters that will be used as part of the build. Provided there were no errors, this configuration shouldn't need any tweaking. If you see any errors you're not able to solve, contact us through our Discord channel.
  2. Now, go ahead and click "Generate". This should generate a solution that you can load into Visual Studio in the build directory we specified initially in the CMake window.

Compiling the Code

  1. Open Visual Studio.
  2. Use the normal file open menu to find the .sln solution file that CMake generated in the build directory and open it.
  3. Select the "Build" menu item and lick on "Build Solution". Now the project should compile. This can take a few minutes. When its finished, under your build directory should be a directory named after the type of build (Debug, Release, RelWithDebInfo). This directory contains your compiled 'thyme.dll' and 'launchthyme.exe'.

Troubleshooting

"S1023" error at the end of the installation of the DirectX SDK.

At the end of the installation of the DirectX SDK a "S1023" could pop up. This error can be ignored and everything will be fine. But if you want to fix it, these instructions can be followed.