Skip to content

Compiling on Windows

Llennpie edited this page Oct 5, 2022 · 14 revisions

Currently, the easiest way to install Saturn is with sm64pcBuilder2. It will automatically download, update, and manage Saturn with minimal setup.

You can find a YouTube guide for this below:

YouTube Guide

In case you still want to compile the repo manually, follow the steps below.


Compiling with MINGW64 (advanced)

Set up MSYS2

Compiling on Windows requires MSYS2. Download it and launch the MINGW64 executable (MINGW32/32-bit is untested).

Do not launch standard MSYS2. Search "MINGW" in the start menu and choose 64-bit. It has a blue icon.

Enter pacman -Syuu in the prompt and hit Enter. Press Y when it asks if you want to update packages. This updates the packages to their latest versions.

Install Dependencies

Copy/paste this command into the terminal to install necessary packages:

pacman -S unzip make git mingw-w64-i686-gcc mingw-w64-x86_64-gcc mingw-w64-i686-glew mingw-w64-x86_64-glew mingw-w64-i686-SDL2 mingw-w64-i686-SDL mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL python3 mingw-w64-x86_64-curl mingw-w64-x86_64-jsoncpp

Building

Enter these two commands separately:

git clone https://github.com/Llennpie/Saturn
cd Saturn

Copy an unmodified, vanilla ROM into the repo's directory and rename it to baserom.us.z64.

Note that MSYS2's folders are different than Windows. You can run explorer . to open Saturn's directory on your computer.

make

You can optionally append -j4 where 4 is the number of cores your computer has. This may speed up the compiling process.

When finished, an executable will be created in /build/us_pc/.

Updating Saturn

If you've already built Saturn before, but want to update to a newer version, you can do so without repeating the above steps.

First, re-enter your Saturn directory:

cd Saturn

Pull the latest commit, and then run make once more.

git pull
make