Crusta Installation Instructions From Source Code
Pre-requisites
To checkout code:
-
GIT (Mac OS X:
brew install git
; Ubuntu:sudo apt-get install git
)
To build:
-
CMAKE version 2.8 or better (Mac OS X:
brew install cmake
; Ubuntu:sudo apt-get install cmake
) -
Vrui version 3.1 w/ development files (KeckCAVES Vrui page)
-
GLU w/ development files (Mac OS X: Included with XQuartz; Ubuntu:
sudo apt-get install libglu-dev
) -
GDAL version 1.8 or better w/ development files (Mac OS X:
brew install gdal
; Ubuntu:sudo apt-get install libgdal-dev
)
For Mac OS X you will also need to install the XQuartz X server:
-
XQuartz – here
Quick Build and Install
Assuming you’ve also installed Vrui from source in some non-standard place:
git clone git://github.com/KeckCAVES/crusta.git cd crusta PKG_CONFIG_PATH=/path/to/Vrui/pkgconfig cmake . -DCMAKE_INSTALL_PREFIX=/path/for/crusta make install
(Vrui’s pkgconfig
directory should be somewhere beneath its lib
directory.)
crusta
commands will end up in /path/for/crusta/bin
Developer Build and Install
Follow these directions if you want to possibly mess around with the source code.
Checkout the source
The Crusta source code is available as a git repository on Github.
Please use the following to obtain a copy of the repository:
git clone git://github.com/KeckCAVES/crusta.git
If you have write access on GitHub, you may clone this way:
git clone [email protected]:KeckCAVES/crusta.git
Configure and build
Crusta uses cmake as the build management system. Please see the cmake webpage for detailed information about cmake. The build files are located in the ‘build’ subfolder of the source folder.
Assuming the source folder is ~/src/crusta, a typical release build would be setup as follows:
Step 1: Create a new folder for the specific build
cd ~/src/crusta mkdir build cd build
Step 2: Create a make file. Please note the trailing two dots as they are part of the command line.
cmake .. -DCMAKE_BUILD_TYPE=<Debug|Release> -DCMAKE_INSTALL_PREFIX=<crusta install path>
If you have installed Vrui in the default path and would like to install a release version of Crusta in your home folder (/home/username under linux and /Users/username under Mac OS; in the example these will be denoted with $HOME) the example cmake command is:
PKG_CONFIG_PATH=$HOME/Vrui-3.1/lib/x86_64-linux-gnu/pkgconfig cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/crusta
(Vrui’s pkgconfig directory may be somewhere else, depending on how your system is configured.)
(The Release build type is default, so you don’t need to specify it if that is what you want.)
Step 3: Build and install
make install
Or for faster compilation on e.g. a dual-cored computer:
make -j2 install
The Crusta files should now be available at $HOME/crusta
Updating to the Latest Version
Once you have the git clone of the sources, fetching the latest updates is very quick and easy:
Step 1: Use the terminal to navigate to the Crusta folder. In our example:
cd ~/src/crusta
Step 2: Use git to fetch the latest source updates:
git pull
Step 3: Navigate to the release build folder and rebuild the executable:
cd build make install
You now have bleeding-edge Crusta.