Skip to content

Building the Modules

nithins edited this page Dec 17, 2014 · 1 revision

Building the main tool

Fetch the code

The code is hosted here. The following are the sequence of instructions for properly cloning the project in bash

$ git clone https://github.com/nithins/mscomplex-tri.git

Build the code

The main tool needs Boost 1.48 , cmake and Eigen3 . To build the code carry out the following in a bash shell

$ mkdir build install
$ cd build
$ cmake ../mscomplex-tri/ -DMSCOMPLEX_INSTALL_DIR=./install
$ make install

If all goes well, you should find a binary named mscomplex-tri-cl-tool in the install directory.

Building the Python Module

The python module only requires the dev libraries of Python to be installed.

The module needs to be enabled in the build directory using cmake and the rebuilt (and installed).

$ cmake -DBUILD_PYMSTRI=1 ../mscomplex-tri
$ make install

If all goes well, you should find a binary named pymstri in the install directory.

The source code also contains example scripts that may be optionally installed. Again enable it in the build directory and install as follows.

$ cmake -DINSTALL_PYMSTRI_SCRIPTS=1 ../mscomplex-tri
$ make install

Building the viewer

Fetch additional code

The viewer code depends on a sub-project called utls. Obtaining the code via git is recommended as the project often depends on a specific version of utls which may/may not be up-to date.

You'll have to edit the file .gitmodules so that the line url = [email protected]:nithins/utls.git reads url = https://github.com/nithins/utls.git and then run

$ git submodule update --init

Note 1 The .gitmodules file edit is required since the original url that present refers to an ssh authenticated copy so that developers can check back via this copy, so long as they have authorized keys. The modified link points to a read-only copy.

Build the code

For the viewer you'll also need to install Qt4, QGLviewer, PythonQt, glew and glut.

These packages are available in most linux package managers.

The module needs to be enabled in the build directory using cmake and the rebuilt (and installed).

$ cmake -DBUILD_VIEWER=1 ../mscomplex-tri
$ make install

If all goes well, you should find a binary named mscomplex-tri-viewer in the install directory.

The viewer has an Awesome render mode that enables high quality visualizations using OpenGL shaders. This can be enabled in the build directory as follows as follows.

$ cmake -DVIEWER_RENDER_AWESOME=1 ../mscomplex-tri
$ make install

Note 1 The cmake script to find QGLViewer does not seem to locate the QGLViewer library in ubuntu linux 12.04. In that case, you may have to explicitly set the the QGLVIEWER_LIBRARY variable (with full path) with cmake-gui.

Note 2 There is also a build option to enable VIEWER_RENDER_AWESOME where critical cells are drawn using spheres and one manifolds are drawn using cylinders. This requires OpenGL Shader support.