Skip to content

Building Courage Reborn#

Requirements#

  • Git
  • Python 3
  • Ninja
  • MSVC (Visual Studio 2022 Build Tools or full IDE)
  • CMake 3.20+

1. Clone the repository#

git clone -b 0.8 https://github.com/linifadomra/Courage-Reborn.git --recurse-submodules
cd Courage-Reborn

Tip

This uses the 0.8 branch. Replace it with your desired branch name if needed.


2. Build options#

Important

On Windows, you must at the very least use a build option with vcpkg. This is due to libffi, a depedency of Augment, which is unable to be fetched any other way.

  1. Set up the local vcpkg:

    cd pc
    .\scripts\setup_vcpkg.bat
    

    Tip

    By default this clones vcpkg into pc\vcpkg, which the CMake configure step picks up automatically. To share one vcpkg across projects, pass a directory: .\scripts\setup_vcpkg.bat D:\dev\shared. The script persists VCPKG_COURAGE_REBORN to your user environment. Open a fresh terminal afterwards.

  2. Launch x64 Native Tools Command Prompt for VS 2022 and cd into pc/.

  3. Configure:

    cmake -B build --preset vcpkg-ninja
    

    Important

    If it's your first time building, or you've made large changes, please see how to build the modding framework. You need this. Mods will otherwise break.

  4. Build:

    cmake --build build [-- -jX]
    

    Tip

    Replace X with your CPU thread count for a parallel build.


Option B: Visual Studio 2022#

  1. Configure:

    cd pc
    cmake -B build --preset vcpkg-vs
    
  2. Build:

    cmake --build build --config RelWithDebInfo
    

Option C: Without vcpkg (CPM)#

Note

Building without a package manager uses CPM and may take longer on first run.

With Ninja#

  1. Launch x86 Native Tools Command Prompt for VS 2022 and cd into pc/.

  2. Configure:

    cmake -B build --preset ninja-gen
    
  3. Build:

    cmake --build build
    

Without Ninja#

  1. Configure:

    cd pc
    cmake -B build --preset vs-gen
    
  2. Build:

    cmake --build build --config RelWithDebInfo
    

See also#