The classic installation details are specified in the INSTALL.[linux,mac,win] files available in the tulip source code root directory. However, if you are reading this tutorial/documentation, you may be interested in using Tulip in a more advanced fashion whether by creating new perspectives, plug-ins or algorithms. The following instructions will help you to prepare your system by installing the Tulip program ready to be compiled and modified to your convenience.

The installation process is not complicated, it can however take some time depending on your computer. Before starting the Tulip set-up, as a developer, you must be aware of some of the Tulip intern behaviours.

Tulip can be compiled and thus executed in two different modes. The first one, called Release, is the classic Tulip execution mode. The application should be executed this way when you are only using the originaly integrated tool of Tulip or the add-ons included with the plug-in library. Most users will only be interested in this mode.

Nevertheless, because Tulip is a research tool, the users testing their algorithms or plug-ins may not be sure of their code source reliability. These people should be more concerned with the second mode available, the Debug mode. With it, the whole program will be slightly slower as the execution is monitored with sanity assertions. If an unexpected behaviour happens and one of the assertion detect it, Tulip will pop an error message expliciting the problem encounter.

These modes must be separated as their behaviour are entirely different. A program instance compiled in Debug mod can not be used to launch a Release version of Tulip and vice versa. For instance, a few functionalities will need assertions only checked in debug mode to run correctly, some of these cases are presented in the Tulip library tutorial section.

If you want to be able to recompile Tulip, you have to organize the different directories which will contain the source code, the libraries and the executables. The disposition we propose here and use in the following steps is just a suggestion. It allows a clear distinction between each directory and their use and gives you the ability to have several working versions of Tulip at the same time on your computer.

First, select the directory in which you want to set the application (you must have the appropriate permissions from the OS) and create here the directory Tulip-4.X (where X is adapted to the current version number).
Into that folder, create five subdirectories:

tulip-src : the source files will be kept here

build-debug : where we stock the generated build file (with the mode Debug)

build-release : where we stock the generated build file (with the mode Release)

install-debug : the program will be installed here (with the mode Debug)

install-release : the program will be installed here (with the mode Release)

To compile and run Tulip, you will need the following tools/libraries:

libqt4-dev

libfreetype6-dev

zlib1g-dev

libglew-dev

libjpeg-dev

libpng12-dev

build-essential

cmake

doxygen

libxml2-dev

qt4-dev-tools

Plus, one of the following version of the python library:

python2.5-dev

python2.6-dev

python2.7-dev

You will have to use system dedicated package installer (apt-get, yum ...)
to install or update directly all the previously listed packages. This action will modify your current system so you may need administrator or super-user access and rights on the OS.

You can obtain the Tulip source code in several ways. The easiest is to pick them directly from the Sourceforge website (by following this link). This method, nevertheless, is not always the best choice. If you want to work actively with Tulip, you will need to keep your project up to date.

The other, slightly more complicated, solution is to use the subversion development repository. This allows you to easily keep your Tulip version up to date. The Unix/Linux based systems should be able to run the svn tool with the following commands

You can choose the access path and the target dir tulip-src according to your preference. Do not forget where the source code is located, you will need the path for completing the compilation and for specifying it to your API.

Once you have import the source code using svn, you can easily update it with the commands

Tulip uses cmake to generate the build instructions. In the following instructions we will use cmake-gui, offering a compliant graphic interface, to create the appropriate package files.

You must start by indicating the source code path and the file in which the binaries will be build:

In the example, we are showing the steps for a Release type build. The given paths must be modified according to your own preferences.

Then press on the Configure button, select the project generator (Unix Makefiles by default), use the default compilers or specify new ones and validate. cmake-gui will create empty folders in the build directory. We can now specify the installation informations.

The two important fields to fill are the CMAKE_BUILD_TYPE and the CMAKE_INSTALL_PREFIX. The build type value must be set to Release or Debug (with capitals) and the install prefix indicates where the program will be installed. We do not want to use the default /user/local/ path as we may wish to exploit different versions of the application. In our case, the install directory will be in [...]/Tulip-4.X/install-release.

Click again on the Configure button to turn the red colour of the fields off. If this operation failed, ensure you have installed all the needed dependencies, filled appropriatly the fields, then try again.

Press the Generate button. If you have correctly set all the values, the two last lines of the prompt should be

Once the make instruction is finished, you can install Tulip by using the command

$ make install

This operation can take a little time too. At the end, your installation path specified to cmake-gui will contained the binaries and the libraries of the application. You can now launch Tulip in its Release version by using the commands

$ cd[...]/Tulip-4.X
$ ./install-release/bin/tulip

You now just have to repeat the previously detailed steps while specifying to the appropriate fields the value debug instead of release to achieve the second build configuration.

The installation described on this page can be run on both 32 and 64-bits systems. In order to simplify the documentation, the steps will be explained using an x64 architecture by default. If you are completing this installation on a 32-bits operating system, please change the 64 value in the proposed paths with 32.

First install Python, CMake and NSIS (use default options). For the last one, you will need to add its root directory to the PATH environment variable. This can be achieved in the System Properties, tab Advanced System Parameters. You will need to click on the Environment Variables button and create or modify the user variable named PATH by adding the value

If you have followed the recommandations given at the top of this page, you should have created somewhere a directory called Tulip-4.X in which you can find the folder tulip-src.

To import the Tulip source into it, you can either get a release tarball or checkout the subversion repository with svn. The Msys shell can provide such tool or you may try a solution with a graphic interface, like Tortoise SVN.

With the MSYS shell, use the command

$ cd /c/[...]/Tulip-4.X

to navigate to the designated folder and get the Tulip files with the instruction

$ svn checkout svn://svn.code.sf.net/p/auber/code/tulip tulip-src

With Tortoise SVN, after a right click on tulip-src, select the action SVN Checkout a specify the checkout repository with the address

As explained previously, Tulip can be build using two different modes: Release and Debug. In the current demonstration, we will use the Release profile. If you want to use the other one, just adapt the appropriate fields by remplacing the term Release with Debug.

With the Msys shell, enter the build-release folder

$ cd /c/[...]/Tulip-4.X/build-release

and launch the following command

$ cmake-gui ../tulip-src

You can also run CMake-gui with its executable (in C:\Program Files (x86)\CMake 2.8). You will, however, need to specify the source and build directories.

Once the CMake GUI appear click on Configure and then select “MinGW Makefiles” generator.

CMake will then display an error message. If you have run CMake through the Msys shell, just reclick on Configure, otherwise, if you have run the executable directly, you will need to specify the filepath to the make tool

CMAKE_MAKE_PROGRAM= C:/mingw64/bin/mingw32-make.exe

then click again on Configure.

CMake will once more display an error message. This time, it did not find Qt4. Just fill the CMake variable QT_QMAKE_EXECUTABLE with the path to qmake.exe

QT_QMAKE_EXECUTABLE= C:/Qt/Qt64-4.8.5/bin/qmake.exe

Relaunch CMake configuration. You will then have to specify the following CMake variables (check “Grouped” and “Advanced” if you don’t see them)

You can use the Add entry button to add them, CMake will automatically merge variables using the same name (the * _LIBRARY are of type FILEPATH and the others are of type PATH).

Python should be automatically found, nevertheless, if you are using a 64-bits OS, you will have to replace the content of the variable PYTHON_LIBRARY by the path of the dll corresponding to the Python version used. If you have installed the 2.7, set it to

PYTHON_LIBRARY= C:/Windows/System32/python27.dll

and if you are using the 3.3, change it to

PYTHON_LIBRARY= C:/Windows/System32/python33.dll

Finish the CMake configuration by setting

CMAKE_BUILD_TYPE= Release

and by changing the variable CMAKE_INSTALL_PREFIX to your installation directory of choice, for instance

CMAKE_INSTALL_PREFIX= C:/[...]/Tulip-4.X/install-release

The default value is incorrect as you can not write in C:\Program Files (x86)\tulip without admin privileges. Finally, add a new CMake variable (click on Add Entry for that) of type PATH

CMAKE_LIBRARY_PATH= C:/mingw64/bin;C:/mingw64/lib

Relaunch one last time the CMake configuration, everything should be alright now (except the Python documentation generation but it is not critical, you will need to install the Sphinx Python module in order to generate it).