Windows builds use Visual Studio 2022 as the IDE and toolchain host, but the actual compiler is Clang (via theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/hedge-dev/UnleashedRecomp/llms.txt
Use this file to discover all available pages before exploring further.
clang-cl frontend) rather than MSVC. The three available CMake presets — x64-Clang-Debug, x64-Clang-RelWithDebInfo, and x64-Clang-Release — are all self-contained: vcpkg dependency installation and CMake configuration happen automatically when you open the folder in Visual Studio.
Build Steps
Clone the repository
Open a terminal and clone the repository with all submodules:If you cloned without
--recurse-submodules, run update_submodules.bat from the repository root to pull in the missing submodules.Add the required game files
Copy the following files from your legally acquired copy of Sonic Unleashed into
./UnleashedRecompLib/private/:default.xex— found in the game’s root directorydefault.xexp— obtained from the title update packageshader.ar— found in the game’s root directory
Install Visual Studio 2022
Download and run the Visual Studio 2022 installer.In the Workloads and Individual components screens, select all of the following:
- Desktop development with C++ (workload)
- C++ Clang Compiler for Windows (individual component)
- C++ CMake tools for Windows (individual component)
clang-cl, lld-link, and the CMake integration that Visual Studio needs to configure and build the project automatically.Open the repository in Visual Studio
Launch Visual Studio 2022 and choose Open a local folder, then select the cloned
UnleashedRecomp directory.Visual Studio will detect CMakePresets.json and begin CMake generation automatically. Wait for the CMake generation finished message in the Output window before proceeding.Switch to CMake Targets View
In the Solution Explorer panel, right-click anywhere in the file tree and choose Switch to CMake Targets View. This replaces the folder view with a list of the project’s actual CMake targets.
Set UnleashedRecomp as the startup item
In the CMake Targets View, right-click the UnleashedRecomp target and choose Set as Startup Item, then select Add Debug Configuration.Visual Studio will create (or open) a
launch.vs.json file. It will look similar to this:Set the game directory
Add a Replace
currentDir property to the first element inside the configurations array and set its value to the path of your game directory — the folder that contains the dlc, game, and update subdirectories:C:\\Games\\SonicUnleashed with the actual path on your system. Use double backslashes (\\) or forward slashes (/) in the JSON string.Build and run
Press F5 (or click the green Start button in the toolbar) to build and launch UnleashedRecomp.
The first build takes longer than usual because XenonRecomp and
XenosRecomp must translate the game’s PowerPC binary and Xenos shader
bytecode into C++ and HLSL. Subsequent builds only recompile files that
have changed and are much faster.
Available Presets
| Preset | Build type | Notes |
|---|---|---|
x64-Clang-Debug | Debug | Full debug symbols, no optimisation |
x64-Clang-RelWithDebInfo | RelWithDebInfo | Debug symbols + optimisation; fastest to iterate on |
x64-Clang-Release | Release | LTO enabled; slowest to compile, fastest to run |
