linux
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 linux-g++
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 in the $FREESTYLE_DIR\build\linux-g++\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.linux
make -f Makefile.linux install
This step builds _Freestyle.so
and Freestyle.py
, i.e. the python API for style description,
in the $FREESTYLE_DIR/build/linux-g++/release/python
directory (or debug/python
).
- 5) Run Freestyle:
set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib
cd $FREESTYLE_DIR/build/linux-g++/release/
./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/linux-g++/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).