Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
112 lines (71 sloc) 2.92 KB

Building Fifengine on Mac

Build Environment

Firstly, we need to setup an IDE and several build tools.

Compiler

You can compile fife with clang.

CMake

Fife uses CMake as build system. The build system generates the build configuration for the project and set the project up for your specific IDE.

SWIG

Fife uses Swig as interface generator. Fife itself is written in C++, for being able to access the API from Python, we are wrapping it using Swig.

Python

To build the Python extension you need Python. Fife works with Python 2.7 and Python 3.4+

Dependencies

Fife depends on a multitude of external libraries.

Our next step is to ensure that all dependencies are installed properly. We do this by either compiling and installing them manually or by fetching and installing pre-compiled binaries.

We do not provide a pre-packaged software development kit for Mac.

Additionally, you find more detailed information in the dependencies chapter.

Building dependencies from source
Note
We are working on building the dependencies on the fly. For now we simply use pre-build packages.
Using packaged dependencies

brew update && brew install swig sdl2 sdl2_image sdl2_ttf freetype openal-soft tinyxml glew libvorbis (for python 3 support: python3)

Building Fifechan

To build Fife, you’ll of course need the Fifechan source code. You can download a Fifechan source code package or fetch the latest source using git.

git clone https://github.com/fifengine/fifechan.git && cd fifechan
mkdir _build; cd _build; cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
make && sudo make install

Building Fifengine

Finally, we can compile Fifengine.

To build Fife, you’ll of course need the Fife source code. You can download a Fife source code package or fetch the latest source using git.

git clone https://github.com/fifengine/fifengine.git && cd fifengine

To build fife with Python support only do:

With "-DPYTHON_EXECUTABLE=/PATH/TO/PYTHONEXECUTABLE" you can change the Python Version what you want to use. If it is not the System defualt Python Version.
mkdir _build; cd _build; cmake ../fifengine

To build fife with Python support and with c/c++ lib and header files do:

mkdir _build; cd _build; cmake -Dbuild-library=ON ../fifengine

after that you can build the project using make and then install it:

make && sudo make install
You can’t perform that action at this time.