Skip to content

Compiling

Zack Middleton edited this page Nov 29, 2021 · 39 revisions

Spearmint only contains the engine code. You'll need game data and spearmint-compatible game code to use it.

Compiling Spearmint

GNU/Linux

Install git and libSDL2 development / runtime packages for your distro.

  • Open a terminal
  • Get the source using git clone https://github.com/zturtleman/spearmint.git
  • Change to directory where the Spearmint source code is, cd spearmint
  • Run make

Binaries will be in build/release-linux-*/.

macOS

Install git.

  • Open Terminal.app
  • Get the source with git clone https://github.com/zturtleman/spearmint.git
  • Change to directory where the Spearmint source code is, cd spearmint
  • Run ./make-macosx.sh x86_64 to create a app bundle compatible with macOS 10.7 or later.
  • The App Bundle will be in build/release-darwin-x86_64/

If you're running macOS 10.6.x and have the macOS 10.5 developer SDKs for PPC, x86, x86_64 you can make a universal binary that is compatible with macOS 10.5 and newer.

  • Remove build directory to remove macOS 10.7 compatible builds.
  • Run ./make-macosx-ub.sh
  • The App Bundle will be in build/release-darwin-universal/

Windows

For a detailed guide for installing/setting up Cygwin and mingw-w64 see ioquake3 Cygwin guide.

  • Install Cygwin with packages as described in the guide.
  • Open Cygwin terminal
  • Get the source using git clone https://github.com/zturtleman/spearmint.git
  • Change to directory where the Spearmint source code is, cd spearmint
  • Run make to compile the engine for your Windows version (32 or 64 bit)

You can force 32 bit or 64 bit using make ARCH=x86 or make ARCH=x86_64.

Alternatively it should be possible to compile using MSYS2 instead of Cygwin (both using mingw-w64 compiler toolchain), though I have not tested it. Compiling would be the same as using Cygwin.

Binaries will be in build/release-mingw32-x86/ or build/release-mingw32-x86_64/.

Setup a game to run

Quake 3

You can either use the baseq3 and missionpack data from the latest Spearmint download on the website, or compile the game code and download the patch data. If you don't own Quake III Arena or (optionally) Quake III: Team Arena you can buy them on Steam (requires Windows or WINE to install).

If you want to use the data from a Spearmint release, copy the newly built engine and existing data into the same directory.

Get the game code

If you still have a terminal open from compiling Spearmint run cd .. to move to the parent directory. Otherwise open a terminal now.

  • Get the Spearmint Quake 3 source using git clone https://github.com/zturtleman/mint-arena.git
  • Change to directory where the mint-arena source code is, cd mint-arena
  • Run make to compile the game code.

Get the Spearmint patch data

  • Run cd .. to move to the parent directory
  • Get the Spearmint patch data using git clone https://github.com/zturtleman/spearmint-patch-data.git

Copy the Q3 data

Copy your Quake III Arena baseq3/pak[0-8].pk3 and (optionally) Team Arena missionpack/pak[0-3].pk3 into speamint-patch-data/baseq3 and missionpack.

Run it

Now there should be three directories (spearmint, mint-arena, and spearmint-patch-data) that are all in the same directory.

To start the game run the following command, adjust for your architecture (x86 or x86_64).

  • GNU/Linux
    • ./spearmint/build/release-linux-x86/spearmint_x86 +set fs_cdpath "./spearmint-patch-data" +set fs_basepath "./mint-arena/build/release-linux-x86"
  • macOS:
    • ./spearmint/build/release-darwin-x86/spearmint_x86 +set fs_cdpath "./spearmint-patch-data" +set fs_basepath "./mint-arena/build/release-darwin-x86"
  • Window (Cygwin shell)
    • cygstart spearmint/build/release-mingw32-x86/spearmint_x86.exe +set fs_cdpath "spearmint-patch-data" +set fs_basepath "mint-arena/build/release-mingw32-x86"
  • Windows (MSYS2 shell, Command Prompt)
    • spearmint/build/release-mingw32-x86/spearmint_x86.exe +set fs_cdpath "spearmint-patch-data" +set fs_basepath "mint-arena/build/release-mingw32-x86"

It's probably helpful to put this into a .sh (shell script) or .bat (batch) file.

How to update

Basic idea of how to update if use git to download the engine, game code, and patch data.

cd spearmint
git pull
Run the command you used to build Spearmint i.e., make
cd ../mint-arena
git pull
make
cd ../spearmint-patch-data
git pull
cd ..
Run the game

Turtle Arena

See turtle-arena-code README for how to build and run it. It's basically the same as Quake 3 but with different game code and data repos.

Clone this wiki locally