Skip to content

Manual Building Guide

Mors edited this page Mar 21, 2023 · 4 revisions

Here's the guide for building the game manually.

Windows

  1. Install MSYS2, following the directions listed on https://www.msys2.org/.
  2. Launch MinGW and install required packages depending on your machine:
    • For 64-bit systems: Launch "MSYS2 MinGW x64" and install the prerequisites by running the pacman -S git make python3 mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2 mingw-w64-x86_64-glew command.
    • For 32-bit systems: Launch "MSYS2 MinGW x86" and install the prerequisites by running the pacman -S git make python3 mingw-w64-i686-gcc mingw-w64-i686-SDL2 mingw-w64-i686-glew command.
  3. Run the cd command, followed by the path of the folder where you want to install the game, in quotation marks. For example: cd "C:\Super Mario 64 Plus".
    • If you want to use the launcher, head to the same folder the launcher is in.
  4. Clone the repository with git clone https://github.com/MorsGames/sm64plus.git, then enter it with cd sm64plus.
  5. Place an SM64 ROM with the filename baserom.us.z64 into the newly created sm64plus folder, so the assets can get extracted.
  6. Run make inside that sm64plus folder to build the game itself. You can add -j$(nproc) to the end of it to improve the build speed (hardware dependent based on the number of CPU cores available).
    • If you're building the game for 32-bit, you should also include TARGET_32BIT=1 after make.
  7. The executable binary will be located at build/us_pc/sm64.us.f3dex2e.exe or build/us_pc/sm64.us.exe.

You can skip the first 2 steps on subsequent builds.

Linux

  1. Open the terminal and install the required packages depending on your Linux distro and package manager:
    • On Debian/Ubuntu based distros: Run the sudo apt install -y git build-essential pkg-config libusb-1.0-0-dev libsdl2-dev command.
    • On Arch based distros like Manjaro: Run the sudo pacman -S base-devel python sdl2 glew command.
    • On Fedora based distros: Run the sudo dnf install make gcc python3 glew-devel SDL2-devel command.
  2. Run the cd command, followed by the path of the folder where you want to install the game, in quotation marks. For example: cd "~/Super Mario 64 Plus".
    • If you want to use the launcher, use the same folder the launcher is in.
  3. Clone the repository with git clone https://github.com/MorsGames/sm64plus.git, then enter it with cd sm64plus.
  4. Place an SM64 ROM with the filename baserom.us.z64 into the newly created sm64plus folder, so the assets can get extracted.
  5. Run make inside that sm64plus folder to build the game itself. You can add -j$(nproc) to the end of it to improve the build speed (hardware dependent based on the number of CPU cores available).
    • If you're building the game for 32-bit, you should also include TARGET_32BIT=1 after make. Please note that 32-bit Linux builds are not tested.
  6. The executable binary will be located at build/us_pc/sm64.us.f3dex2e or build/us_pc/sm64.us. You do not need to worry about this if you're using the launcher, just run the launcher and have fun!

You can skip the first step on subsequent builds.

Steam Deck

Please note that this guide isn't 100% tested and may or may not work for you. If you experience issues try building the game on another Linux system and copying the files over instead.

  1. Open the terminal and disable the read-only mode by running sudo steamos-readonly disable.
  2. Run the following commands:
sudo pacman-key --init
sudo pacman-key --populate
sudo sed -i 's/\(^\[.*\]\)/\1\nSigLevel = Never/g' /etc/pacman.conf
sudo pacman -Syyu --noconfirm
sudo pacman -S $(pacman -Ql | grep include | cut -d' ' -f1 | awk '!a[$0]++') --noconfirm
sudo pacman --overwrite=/etc/ld.so.conf.d/fakeroot.conf -S base-devel python sdl2 glew --noconfirm
  1. Run the cd command, followed by the path of the folder where you want to install the game, in quotation marks. For example: cd "~/Super Mario 64 Plus".
    • If you want to use the launcher, use the same folder the launcher is in.
  2. Clone the repository with git clone https://github.com/MorsGames/sm64plus.git, then enter it with cd sm64plus.
  3. Place an SM64 ROM with the filename baserom.us.z64 into the newly created sm64plus folder, so the assets can get extracted.
  4. Run make inside that sm64plus folder to build the game itself. You can add -j$(nproc) to the end of it to improve the build speed.
  5. The executable binary will be located at build/us_pc/sm64.us.f3dex2e or build/us_pc/sm64.us. You do not need to worry about this if you're using the launcher, just run the launcher and have fun!
  6. Once you're done with everything you can re-enable the read-only mode by running sudo steamos-readonly enable.

You might need to repeat all the steps on subsequent builds.

macOS

There's currently no guide for building the game on macOS.

Clone this wiki locally