Downloading and Compiling under macOS

From Arx Libertatis Wiki
Revision as of 01:40, 3 April 2012 by BobJelly (talk | contribs)
Jump to navigation Jump to search

This page documents how to compile Arx Libertatis from https://github.com/arx/ArxLibertatis under Mac OS X.

Specific instructions are given for a cleanly installed Lion 10.7.3 system, but the procedure should be similar for other versions.

Setting Up the Build Environment

To download and compile Arx Libertatis you will need the following tools:

Libraries

I installed those using MacPorts... but you can probably obtain "native" versions too.

  • zLib: sudo port install zlib
  • freetype: sudo port install freetype
  • devil: sudo port install libdevil
  • boost: sudo port install boost
  • qt: sudo port install qt4-mac
  • sdl: sudo port install libsdl
  • glew: sudo port install glew

Or as a single line:

sudo port install zlib freetype libdevil boost qt4-mac libsdl glew

Cloning the code repository

Using GitHub for Mac

Refer to http://mac.github.com/help.html :)

From the command line

First, go to where you want the ArxLibertatis directory to be located.

cd ~/Code

You are now ready to clone the repository, type:

git clone git://github.com/arx/ArxLibertatis.git

This creates a directory called ArxLibertatis and downloads the current source code from github.

cd ArxLibertatis

Compiling

Building CMake from source

The latest release of CMake (2.8.7) still has issues with Xcode 4.3, but it's been fixed in the development branch. You can build cmake from source to fix this:

git clone http://cmake.org/cmake.git
cd cmake
./configure
make
sudo make install

You're now ready to generate makefiles or an Xcode project. cd to the root of the arx repository

Makefiles

mkdir build
cd build
cmake ..
make

Xcode project

mkdir build_xcode
cd build_xcode
cmake .. -G Xcode
open ArxLibertatis.xcodeproj/