Skip to content

Building via Xcode

Christian Kosman edited this page May 29, 2023 · 6 revisions

This page will teach you how to build sm64ios for iOS and tvOS. Please note that a Mac or MacOS virtual machine is required for this process. Please follow each step carefully to get this working correctly.

Prerequisites

  1. Install Xcode through the App Store or manually.
  2. Open Terminal and install homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Install GNU make: brew install make
  4. Install gcc@12: brew install gcc@12
  5. Install mingw-w64: brew install mingw-w64
  6. (Optional) If you want an app icon, install imagemagick: brew install imagemagick

Downloading the project and SDL2

  1. Create a working directory to put project files: mkdir sm64ios && cd sm64ios
  2. Clone sm64ex-ios and SDL and set up necessary directories:
git clone https://github.com/ckosmic/sm64ex-ios.git && \
git clone -b SDL2 https://github.com/libsdl-org/SDL.git SDL2 && \
mkdir include && \
cp -a SDL2/include include/ && \
mv include/include include/SDL2

Building sm64ios

  1. Place your copy of Super Mario 64 inside sm64ex-ios and rename it to baserom.<version>.z64 (available versions include us, jp, eu)
  2. (Optional) If you want an app icon, run ./appicon.sh
  3. Open sm64ios.xcworkspace in Xcode (not sm64ios.xcodeproj!): open sm64ios.xcworkspace
  4. Select sm64ios in the Project navigator and under "Signing & Capabilities", choose your team
  5. Change the bundle identifier to something unique (ex. com.<yourteam>.sm64ios)
  6. Set your build target to sm64ios > <desired iOS build target> or sm64tvos > <desired tvOS build target> if you're building for Apple TV
  7. Build and run! If everything went correctly, SDL and sm64ios will build without errors and successfully deploy to a device/simulator.

Clone this wiki locally