Commit 56d3c5b3 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

DOC: Overview on local development

parent ca69c77f
# Setting up a local FSL development environment
*This document is written under the assumption that you have FSL 6.1.0 or newer, installed via the fslinstaller script. These instructions will not work for manually managed FSL installations.*
This document describes how to set up a local development environment for compiling FSL C/C++ projects. It does **not** describe how to build conda packages for FSL projects - this is described in [building_fsl_conda_packages.md](building_fsl_conda_packages.md).
A standard FSL installation comes with the `Makefile` machinery required to compile FSL C/C++ projects. All that you need to add is a C/C++ compiler. You can use your operating system compiler if you wish, but be warned that doing so will potentially compile your code in a different way to how the official FSL conda packages have been compiled.
A better option is to use the [conda-forge](https://conda-forge.org/) compiler toolchain. You can install the conda-forge compilers directly into `$FSLDIR` like so:
```
# Set up your environment for FSL development. The
# fsl-devel.sh script activates the $FSLDIR conda
# environment, effectively adding $FSLDIR/bin to
# your $PATH.
source $FSLDIR/etc/fslconf/fsl-devel.sh
# Install the conda-forge C/C++ compiler toolchain
conda install -c conda-forge c-compiler cxx-compiler
```
Now, when you want to work on a FSL project, you can follow these steps:
```
# Configure your environment for FSL development
source $FSLDIR/etc/fslconf/fsl-devel.sh
# Get a copy of the source
git clone https://git.fmrib.ox.ac.uk/fsl/randomise.git
cd randomise
# Or work with the version you have installed
cd $FSLDIR/src/randomise/
# compile
make
# Re-install into your existing $FSLDIR
make install
# Or install into a different prefix
export FSLDEVDIR=/my/local/dev/prefix
make install
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment