Skip to content

Compiling

Zack Middleton edited this page Sep 30, 2015 · 39 revisions

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

  • Get the engine source code.
  • Compile the engine.
  • Setup a game to run, Quake 3 or Turtle Arena.

Source code

You can download the code using git clone https://github.com/zturtleman/spearmint.git so that it's easy to update the source code and create code patches or just download a zip or tar file. Git is recommended, but the other options are available.

##Compiling ###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-*/.

###Mac OS X 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 to create a app bundle.

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

  • Run ./make-macosx-ub.sh

If you're running OS X 10.7 or newer you can build a x86 / x86_64 universal binary. It might not be compatible with versions of OS X older than yours. YMMV.

  • Run make ARCH=x86
  • Run make ARCH=x86_64
  • Run ./make-macosx-app.sh release

The App Bundle will be in build/release-darwin-*/

###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 may be possible to compile using MSYS instead of Cygwin, though I have not tested it for a long time. Compiling would be the same as using Cygwin.

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

##Setup a game to run ###Quake 3 Running Quake 3 using Spearmint;

You can either use the baseq3 and missionpack data from the Spearmint 0.1 download, 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 Spearmint 0.1 download data, copy the engine and data into the same directory.

Get the game code

For building the latest game code, continue following these directions. 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

Now you need to get the Spearmint patch data

  • Run cd .. to move to the parent directory
  • Get the 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"
  • Mac OS X: ./spearmint/build/release-darwin-x86/spearmint_x86 +set fs_cdpath "./spearmint-patch-data" +set fs_basepath "./mint-arena/build/release-darwin-x86"
  • Windows 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.

If you're using Spearmint 0.1 instead of the latest version (from git or the linked zip/tar files) you'll need to copy the files from spearmint-patch-data into mint-arena/build/release-*-*/ because fs_cdpath cvar did not exist.

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