-
Notifications
You must be signed in to change notification settings - Fork 0
Project Setup: Visual Studio Code
Firstly, ensure you have the following installed:
-
CMake - Check by seeing if you can execute the
cmakecommand in your terminal -
Doxygen - Check by trying to execute
doxygen(Non-windows) or see if you have the doxywizard executable (Windows)
Firstly, clone the repository:
git clone https://github.com/Questionable-Engineering-Decisions/HortrogOnce the repository is cloned, open it in Visual Studio Code. After a short while it should prompt you to install the Recommended Extensions:

This will take you to the Extensions view, where you should install the recommended extensions:

When you open a .cpp file, the clangd extension should prompt you to install the language server (if not already installed):

After installing CMake Tools it will prompt you to configure the project, which you should accept:

Depending on your platform, you will then be prompted so select a preset. Select whichever one is available to you:

NOTE: The windows preset requires the use of the MSVC compiler, which can be installed using the Visual Studio Installer
After this CMake will configure the project and setup all the dependencies. This may take a significant amount of time depending on your internet connection, so go have a coffee/tea while you wait :). Once configured, you should see something like this:

To compile the project, you can simply hit F7. This will compile both the main executable and the test executables and will also take quite a bit of time.

To run the final executable, press Shift+F5. On first use, you will be prompted to select which launch target to run. Select COS214_FinalProject

After a while it should build and execute the project and - if all went well - you should be greeted with a window:

A couple of things to note:
- When you get an unresolved link error when compiling, this is most probably cause it didn't pick up a .cpp file. Just reconfigure the project (as seen above)
- When you add any asset files, be sure to rebuild the project (F7 by default). This copies the assets to the right folder before you execute the program
To run unit tests, go the Testing tab, where you should see a button to execute all the tests:
