Building the RSDKv3 Decompilation
The RSDKv3 Decompilation uses CMake, a versatile building system that supports many different compilers and platforms.
Note
This guide requires basic knowledge of how to use the appropriate terminal for your OS, such as Command Prompt for Windows. If you aren't familiar with opening terminals in specific directories, look up a tutorial online.
Get the source code
In order to clone the repository, you need to install Git, which you can get here.
Clone the repo recursively, using:
If you've already cloned the repo, run these commands inside of the repository to ensure the clone is up-to-date:
Getting dependencies
Install CMake. Make sure to enable the feature to add CMake to the system PATH during the installation.
To handle dependencies, you'll need to install Visual Studio Community with the Desktop development with C++
workload. If you already have Visual Studio installed, you can manage your installed workloads by opening Visual Studio Installer from the Start Menu and clicking the Modify
button next to your Visual Studio installation.
You will also need to set up vcpkg. You only need to follow 1 - Set up vcpkg
in the guide.
Tip
It's recommended to clone vcpkg into a short path such as C:/src
to keep future commands from getting too long.
Run the following command in the vcpkg repository in Command Prompt:
Run the following command in the terminal:
TODO
Compiling
Enter the following commands in the RSDKv3 decompilation repository directory:
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PREFIX_PATH=[vcpkg root]/installed/x64-windows-static/
cmake --build build --config release
Important!
Both instances of [vcpkg root]
should be replaced with the path to the vcpkg repository. For example, if the repository is located in C:/src/vcpkg
, the first command to enter would be:
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PREFIX_PATH=C:/src/vcpkg/installed/x64-windows-static/
C:/github repos/vcpkg
, the first command to enter would be:
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_PREFIX_PATH=[vcpkg root]/installed/x86-windows-static/ -A Win32
cmake --build build --config release
Important!
Both instances of [vcpkg root]
should be replaced with the path to the vcpkg repository. For example, if the repository is located in C:/src/vcpkg
, the first command to enter would be:
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_PREFIX_PATH=C:/src/vcpkg/installed/x86-windows-static/ -A Win32
C:/github repos/vcpkg
, the first command to enter would be:
The resulting build will be located somewhere in build/
depending on your system.
You can set build flags by adding -D[flag-name]=[value]
to the end of the first command. For example, to build with RETRO_DISABLE_PLUS
set to on, add -DRETRO_DISABLE_PLUS=on
to the command.
Enter the following commands in the RSDKv3 decompilation repository directory:
The resulting build will be located somewhere in build/
depending on your system.
You can set build flags by adding -D[flag-name]=[value]
to the end of the first command. For example, to build with RETRO_DISABLE_PLUS
set to on, add -DRETRO_DISABLE_PLUS=on
to the command.
TODO
Build Flags
Warning
These build flags modify certain aspects of the decomp; only use these if you know what you're doing!
Flag | Description | Value Type | Default Value |
---|---|---|---|
RETRO_DISABLE_PLUS | Disables access to content from Sonic Origins's Plus Expansion Pack. Any publicly distributed builds must have this flag enabled. | Boolean | off |
RETRO_FORCE_CASE_INSENSITIVE | Forces case insensivity when loading files. | Boolean | off |
RETRO_MOD_LOADER | Enables the ability the load mods and certain features related to them. | Boolean | on |
RETRO_USE_HW_RENDER | Enables the option to use the Hardware Renderer used for the mobile version of Sonic CD. | Boolean | on |
RETRO_SDL_VERSION | Switches between using SDL 1.2 or SDL 2. | Integer (1 or 2 ) |
2 |