-
Notifications
You must be signed in to change notification settings - Fork 60
Compiling With Visual Studio
OmniBlade edited this page Dec 6, 2019
·
8 revisions
In order to build Thyme, you need to download and install the following programs:
- Windows 7 / 8 / 10
- Git client
- CMake
- Visual Studio 2017 or above: Enterprise, Professional or Community (Free) version
- DirectX8 SDK (august 2007)
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.
Note: this could also be done by using GitHub Desktop, but in this guide we will assume you used the Git client.
- Assuming you installed the mainline Windows Git client, open Git GUI.
- Click on "Clone Existing Respository"
- Enter the source location and the target directory. For the source location you want 'https://github.com/TheAssemblyArmada/Thyme.git'.
- Enter in the target directory. This can be where ever is convenient on your system.
- Now just click the "Clone" button and wait for the download to complete.
- Open CMake (cmake-gui).
- 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.
- 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.
- Click the "Configure" button.
- 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.
- 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.
- 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.
- 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.
- Open Visual Studio.
- Use the normal file open menu to find the .sln solution file that CMake generated in the build directory and open it.
- 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'.
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.