oliskir created page: usage authored by Oliver Kirsebom's avatar Oliver Kirsebom
b
\ No newline at end of file
# Installation
These instructions assume that your operating system is [Ubuntu](http://www.ubuntu.com/).
## 1. Install ROOT
This is most easily accomplished with the command: `sudo apt-get install root-system`
## 2. Install GEANT4
Follow the [official installation instructions](http://geant4.web.cern.ch/geant4/support/gettingstarted.shtml).
## 3. Install VeikonKone
1. Install ``git``
It is most likely already installed. Run `git --version` to check. If it is not installed, run `sudo apt-get install git cmake`
2. Get CMake: `sudo apt-get install cmake`
3. Add your ssh key to you gitlab profile
1. (if you already have a ssh key skip this)
`ssh-keygen -t rsa -C "<your_email>"`
2. Copy the output from
`cat ~/.ssh/id_rsa.pub`
3. Insert it here
https://git.kern.phys.au.dk/profile/keys
4. In the parent directory to where you want AUSAlib
`git clone git@git.kern.phys.au.dk:ausa/ausalib.git`
5. cd into ausalib
`cd ausalib`
6. switch to latest stable edition
`git checkout stable`
7. Build a makefile for AUSAlib
`cmake ./`
8. Build AUSAlib.
`make -j 4`
You will now have a libAUSA.a
9. You install AUSAlib two ways
* __System wide install:__ If you want the headers copied to `/usr/local/include` and the library to `/usr/local/lib` i.e. where to compiler normally looks for this `sudo make install`
* __Local install:__ Here you must define the two environment variables `AUSALIB_INC_DIR` the AUSAlib include directory and `AUSALIB_LIB_DIR` to the location of `libAUSA.a`. A convenient way to do this is to add the following lines to you `~/.bashrc` or `~/.profile`
```
export AUSALIB_INC_DIR=<path to ausalib>/ausalib/include
export AUSALIB_LIB_DIR=<path to ausalib>/ausalib/build
```
__OSX__: OSX users should add it to `~/.profile` and NOT to `~/.bashrc`
10. Export the resource directory environment variable, `AUSALIB_RES_DIR`. This can also conveniently be added to `~/.bashrc` or `~/.profile`:
```export AUSALIB_RES_DIR=<path to ausalib>/ausalib/res```
**OBS: When you pull AUSAlib remember to cmake ./**
\ No newline at end of file