Skip to content

A small game engine for creating 3D games, made with C++.

Notifications You must be signed in to change notification settings

i-am-Els/PurityEngine

Repository files navigation

Build Setup Process (for contributors)

  1. Ensure vcpkg is installed. Get the package manager on your machine.
  • clone vcpkg into any location of your choice,
git clone https://github.com/microsoft/vcpkg.git
  • cd into the install path and run the bootstrap bat file.
cd vcpkg; .\bootstrap-vcpkg.bat
  1. Create a new CMakeUserPresets.json in the root of the project to accompany the CMakePresets.json. Your CMakeUserPresets.json should look something like this...
{
  "version": 3,
  "configurePresets": [
    {
      "name": "debug",
      "inherits": "base",
      "environment": {
        "VCPKG_ROOT": "C:/path/to/vcpkg"
      }
    },
    {
      "name": "release",
      "inherits": "debug",
      "cacheVariables": {
        "CMAKE_BUILD_TYPE": "Release"
      }
    }
  ],
  "buildPresets": [
    {
      "name": "default-build-windows",
      "displayName": "Default",
      "configurePreset": "debug",
      "description": "Vanilla build"
    },
    {
      "name": "release_build_windows",
      "configurePreset": "release",
      "displayName": "Release",
      "description": "Vanilla Build"
    }
  ]
}

You can directly copy this and change the VCPKG_ROOT path value to the instance location of vcpkg on your machine.

Note: Do not commit the CMakeUserPresets.json file, Ever!!!

Optionally

  1. To download the dependencies listed in the project's vcpkg.json, run this:
vcpkg install --triplet <triplet>

for example, in my Visual Studio project, I use this:

vcpkg install --triplet x64-windows

Cont'd

  1. Then in your IDE(in my case Visual Studio 2022), reset Cache and Configure the project.
  2. Build all projects.
  3. Run the install Executables.

There are executables such as Game.exe and PurityEditor.exe in the install directories ${projectDir}/out/install/${presetName}/bin, accompanied by the required runtime artefacts. Running these executables instead of the ones in the target binary directories will resolve the DLL not found errors.

No more manually copying dlls to executable location. You get the latest build in the install directory.

For more help, check the vcpkg documentation here

To resolve relative path issues, use the json snippet below to setup your launch.vs.json

{
  "version": "0.2.1",
  "defaults": {},
  "configurations": [
    {
      "type": "default",
      "project": "CMakeLists.txt",
      "projectTarget": "PurityEditor.exe (Install)",
      "name": "PurityEditor.exe (Install)",
      "currentDir": "${workspaceRoot}"
    },
    {
      "type": "default",
      "project": "CMakeLists.txt",
      "projectTarget": "Game.exe (Install)",
      "name": "Game.exe (Install)",
      "currentDir": "${workspaceRoot}"
    },
    {
      "type": "default",
      "project": "CMakeLists.txt",
      "projectTarget": "PurityGem.exe (Install)",
      "name": "PurityGem.exe (Install)",
      "currentDir": "${workspaceRoot}"
    }
  ]
}

About

A small game engine for creating 3D games, made with C++.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published