Clone MarathonRecomp with submodules using Git.
git clone --recurse-submodules https://github.com/sonicnext-dev/MarathonRecomp.git
If you skipped the --recurse-submodules argument during cloning, you can run update_submodules.bat to ensure the submodules are pulled.
Copy the following files from the game and place them inside ./MarathonRecompLib/private/:
default.xexshader.arcshader_lt.arc
default.xex is located in the game's root directory, while the others are located in /xenon/archives.
You will need to install Visual Studio 2022.
In the installer, you must select the following Workloads and Individual components for installation:
- Desktop development with C++
- C++ Clang Compiler for Windows
- C++ CMake tools for Windows
The following command will install the required dependencies on a distro that uses apt (such as Debian-based distros).
sudo apt install autoconf automake libtool pkg-config curl cmake ninja-build clang clang-tools libgtk-3-devThe following command will install the required dependencies on a distro that uses pacman (such as Arch-based distros).
sudo pacman -S base-devel ninja lld clang gtk3You can also find the equivalent packages for your preferred distro.
Note
This list may not be comprehensive for your particular distro and you may be required to install additional packages, should an error occur during configuration.
You will need to install the latest Xcode from Apple.
The following commands will install additional required dependencies, depending on which package manager you use.
If you use Homebrew:
brew install cmake ninja pkg-configIf you use MacPorts:
sudo port install cmake ninja pkg-config- Open the repository directory in Visual Studio and wait for CMake generation to complete. If you don't plan to debug, switch to the
Releaseconfiguration.
Tip
If you need a Release-performant build and want to iterate on development without debugging, it is highly recommended that you use the RelWithDebInfo configuration for faster compile times.
- Under Solution Explorer, right-click and choose Switch to CMake Targets View.
- Right-click the MarathonRecomp project and choose Set as Startup Item, then choose Add Debug Configuration.
- Add a
currentDirproperty to the first element underconfigurationsin the generated JSON and set its value to the path to your game directory (where root is the directory containingdlc,game, etc). - Start MarathonRecomp. The initial compilation may take a while to complete due to code and shader recompilation.
- Configure the project using CMake by navigating to the repository and running the following command.
cmake . --preset linux-releaseNote
The available presets are linux-debug, linux-relwithdebinfo and linux-release.
- Build the project using the selected configuration.
cmake --build ./out/build/linux-release --target MarathonRecomp- Navigate to the directory that was specified as the output in the previous step and run the game.
./MarathonRecomp- Configure the project using CMake by navigating to the repository and running the following command.
cmake . --preset macos-releaseNote
The available presets are macos-debug, macos-relwithdebinfo and macos-release.
- Build the project using the selected configuration.
cmake --build ./out/build/macos-release --target MarathonRecomp- Navigate to the directory that was specified as the output in the previous step and run the game.
open -a MarathonRecomp.app