macosx
compilation instructions
Requirements
- gcc 4.0 or 4.1
- OpenGL and GLUT
- QT 4.2.3
Qt is a multi-platform GUI toolkit.
Trolltech Qt is free and open source for Linux.
- libQGLViewer 2.2.5-1
QGLViewer is a trackball-based 3D viewer including many useful features. It is packed as a QT widget and
distributed as a free open source library.
- lib3ds 1.2
The free open source library allowing to load and save 3DS files.
- swig 1.3.31
SWIG is an interface compiler that connects programs written in C and C++ with scripting languages
such as Perl, Python, Ruby, and Tcl. Freestyle uses it to generate the binding between
its C++ API and the style scripting language Python.
- Python 2.5
Python is an interpreted, interactive, object-oriented programming language. We chose
it as our style scripting language.
Compilation
- 1) You must set a
FREESTYLE_DIR
environment variable
containing the freestyle directory location.
- 2) In
$FREESTYLE_DIR/src
edit the libconfig.pri
.
This file contains the locations of the various libraries headers and files.
Modify the initial values facing the mac
tags to match your own configuration.
- 3) Build Freestyle:
cd $FREESTYLE_DIR/src
qmake
make
This will build Freestyle.exe as well as all its libraries (as frameworks) in the $FREESTYLE_DIR/build/macosx/release
or debug
directory depending on your configuration.
Only the swig library remains to build as it
is currently not integrated in the QT process.
- 4) Build the Python API:
cd $FREESTYLE_DIR/src/swig
make -f Makefile.macosx
make -f Makefile.macosx install
This step builds _Freestyle.so
and Freestyle.py
, i.e. the python API for style description,
in the $FREESTYLE_DIR/build/macosx/release/python
directory (or debug/python
).
- 5) Run Freestyle: That's the hardest part. Because the links to the frameworks are not properly handled by Qt,
the paths to these frameworks have to be fixed in all binaries. This can be done following an approach similar
to the one described by Trolltech for
deployment on mac.
The script
build_bundle.macosx.py
is a python script to build the MacOSX package. In addition to gathering
necessary dependencies it also handles the links correction. It can therefore be used for building a running version
of freestyle.
This script relies on the definition of the environment variable FREESTYLE_DIR
so make sure that it is defined. The script will build a bundle Freestyl.app
in $FREESTYLE_DIR/freestyle.version-macosx-x86
Once you managed to run Freestyle,
open the 'Windows' > 'Options Window', select the 'Directories tab'
and add to the 'Python path' the location of the directory where the library of the previous
was built (e.g. $FREESTYLE_DIR/build/macosx/release/python
).
Save and close the dialog window
(you might need to reset the Python Interpreter through 'Tools' > 'Reset Interpreter').
- 7) Write great style modules and generate beautiful images. (Start perhaps by the
tutorial).