Building and Installing Rappture from Source Code
If possible, you should try to install Rappture the easy way, by downloading one of our prebuilt binary packages. But if that doesn't work for some reason, you can still install Rappture the hard way, by following the instructions on this page.
1. Prequisites
You will need the rappture sources and the runtime packages it uses. You can obtain the rappture and rappture-runtime sources either by downloading these tar files or through Subversion.
1.1 Tar files
Download both tar files:
- Rappture sources rappture-src-20130903.tar.gz (9MB)
- Rappture-runtime sources rappture-runtime-src-20130903.tar.gz (144MB)
1.2 Subversion
Checkout both rappture and the runtime sources.
svn co https://nanohub.org/infrastructure/rappture/svn/trunk rappture svn co https://nanohub.org/infrastructure/rappture-runtime/svn/trunk runtime
1.3 System Requirements
You will need a C and C++ compiler. The following is a list of packages for debian distributions that should be installed.
- gcc
- g++
- libssl-dev
- make
- patch
- subversion
- libx11-dev
- libxt-dev
- libxext-dev
- libfreetype6-dev
- libxft-dev
- libgl1-mesa-dev
- libxrandr-dev
- libpng12-dev
- libjpeg62-dev
- libtiff4-dev
- libxpm-dev
- libncurses5-dev
- libavcodec-dev
- libavformat-dev
Other distribution's package names may differ slightly. The version numbers don't matter. For example, libpng12-dev or libpng14-dev can be used.
1.3.1 Optional System Packages
Bindings will be built for whatever languages are found installed on your system. What this means is that if you want to use Rappture with let's say python, you need to have python development package installed before building Rappture.
Here is a list of optional debian packages
- gfortran
- perl
- python
- python-dev
- ruby
- ruby-dev
- libperl-dev
- sun-java6-jdk
- sun-java6-jre
The following optional debian packages are useful too.
- gdb
- libavcodec-dev
- libavformat-dev
- libavutil-dev
2. Building Rappture
If you've down loaded the rappture and rappture-runtime tar files, unpack both files.
tar xpvf rappture-src-*.tar.gz tar xpvf rappture-runtime-src-*.tar.gz
Run the build script.
sh runtime/build_pkg.sh
This will build the rappture runtime (things that rappture is dependent upon) and rappture itself. The results will be put into a directory "builds/<date>". <date> will be the current date (for example 20081014).
3. Test the build
Setup your path and try to run rappture.
For bash:
export PATH=$PWD/builds/20081014/bin:$PATH
For csh:
set path = ( $PWD/builds/20081014/bin $path )
Try to run one of the examples.
cd builds/20081014/examples/app-fermi/tcl rappture
4. Move the build to its destination
Create the destination directory you would like to install Rappture (for example /usr/local/rappture) and move the build into it.
mkdir /usr/local/rappture mv builds/20081014/* /usr/local/rappture
Edit the "rappture.env" file to indicate where you installed Rappture
vi /usr/local/rappture/bin/rappture.env
Change the INSTALL_RAPPTURE_DIR variable to the location of the destination directory.
RAPPTURE_INSTALL_DIR=/usr/local/rappture
Try running rappture again. First put the Rappture bin directory in your command path:
For bash:
export PATH=/usr/local/rappture/bin:$PATH
For csh:
set path = ( /usr/local/rappture/bin $path )
Go to the examples directory and run one of the examples:
cd /usr/local/rappture/examples/app-fermi/tcl rappture
This should bring up a simple Fermi function simulator, built with Rappture and Tcl!
Try another example:
cd ../../graph rappture
This should bring up a simple graphing calculator, built with Rappture and Python!