Skip to content

Compiling

Zack Middleton edited this page Mar 1, 2015 · 39 revisions

Spearmint can be built on GNU/Linux, Mac OS X, and Windows.

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

###Spearmint

###Quake 3 Running Quake 3 using Spearmint;

  • Code: mint-arena (direct download: zip or tar).
  • Patch-Data: Spearmint patch data (direct download: zip or tar).
  • Data: If you don't own Quake III Arena or Quake III: Team Arena you can buy them on Steam (requires Windows or WINE to install).

Build spearmint. Build mint-arena. Get the patch data. Get the Q3 pk3s. Then setup the following file structure, Team Arena (missionpack) is optional.

spearmint_x86.exe (built from spearmint repo)
spearmint-server_x86.exe (built from spearmint repo)
mint-renderer-opengl1_x86.dll (built from spearmint repo)
mint-renderer-opengl2_x86.dll (built from spearmint repo)
baseq3
baseq3/pak[0-8].pk3 (copy from your Q3A install)
baseq3/mint-game_x86.dll (built from mint-arena)
baseq3/mint-cgame_x86.dll (built from mint-arena)
missionpack/
missionpack/pak[0-3].pk3 (copy from your Q3: Team Arena install)
missionpack/mint-game_x86.dll (built from mint-arena)
missionpack/mint-cgame_x86.dll (built from mint-arena)

###Turtle Arena

See turtle-arena-code README for how to build and run it.

##GNU/Linux Install the libSDL2 development and runtime packages for your distro.

###Terminal Run make.

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

##Mac OS X ###App Bundle Build Universal Bundle:

  • Run ./make-macosx-ub.sh

For maximum compatibility (with older OS X versions), it is recommend to build on Mac OS X 10.6 with 10.5 SDK installed.

App will be in build/release-darwin-ub/

Build single platform .app bundle:

  • Run ./make-macosx.sh x86_64
  • Run ./make-macosx.sh ppc
  • Run ./make-macosx.sh x86

App will be in build/release-darwin-ARCHNAME/

###Unpackaged

  • Run make

Binaries will be in build/release-darwin-x86/ (x86 or x86_64 Mac) or build/release-darwin-ppc/ (PowerPC Mac).

You'll need to copy the SDL runtime DYLIB from code/libs/macosx/ into the directory containing the client (i.e., build/release-darwin-*/) to be able to run it.

##Windows Building on Windows is a bit rough. It's possible, but not really a great experience.

###mingw-w64 The mingw-w64 compiler(s) can be used to compile the engine. A side-note; somewhat contrary to it's name, it supports 32 and 64 bit. As far as I know there is not a main way to install mingw-w64 (and there are multiple versions). There are distribution (MSYS, Cygwin) that contain the compiler, a shell (terminal/command-prompt), and other needed tools (e.g. make, ld). There are also standalone mingw-w64 downloads, which I haven't figured out how to use.

Compiling is known to work using Cygwin. Which is a GNU/Linux-like environment. I do not find it ideal for recommending to non-GNU/Linux users but it's the only working way I know of at this time. For a detailed guide for installing/setting up Cygwin see ioquake3 Cygwin guide (which also applies to Spearmint).

  • Install Cygwin with packages as described in the guide.
  • Open Cygwin terminal
  • Run git clone https://github.com/zturtleman/spearmint.git
  • Change to the top-directory of the source code (run cd spearmint), then run make ARCH=x86 (32 bit) or make ARCH=x86_64 (64 bit).

Alternatively it may be possible to compile using MSYS, though I have not tested it for a long time. Compiling is the same as using Cygwin, you run make ARCH=x86 (32 bit) or make ARCH=x86_64 (64 bit).

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

You'll need to copy the SDL runtime DLL from code/libs/win32/ or code/libs/win64/ into the directory containing the client (i.e., build/release-mingw-*/) to be able to run it.

Clone this wiki locally