This document summarizes how to build and package SlicerSALT on Linux, macOS and Windows.
SlicerSALT is a custom Slicer application. Reading the 3D Slicer Developer Documentation may help answer additional questions.
The initial source files were created using KitwareMedical/SlicerCustomAppTemplate.
-
Review and install the
3D Slicer
prerequisites -
Setup your git account:
-
Create a Github account.
-
Setup your SSH keys following these instructions at the exception of
step 2
where you should NOT enter a passphrase. -
Setup your git username and your git email.
-
mkdir ~/Projects
cd ~/Projects
git clone https://github.com/Kitware/SlicerSALT.git SS
- Start Git Bash
- Checkout the source code into a directory
C:\W\
by typing the following commands:
cd /c
mkdir W
cd /c/W
git clone https://github.com/Kitware/SlicerSALT.git SS
cd ~/Projects/SSR
cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DQt5_DIR:PATH=/path/to/Qt/lib/cmake/Qt5 \
../SS
mkdir ~/Projects
cd ~/Projects
cmake \
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.13 \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DQt5_DIR:PATH=/path/to/Qt/lib/cmake/Qt5 \
../SS
Option 1: CMake GUI and Visual Studio (Recommended)
- Start CMake GUI, select source directory
C:\W\SS
and set build directory toC:\W\SSR
. - Add an entry
Qt5_DIR
pointing toC:/Qt/${QT_VERSION}/${COMPILER}/lib/cmake/Qt5
. - Generate the project.
- Open
C:\W\SSR\{{cookiecutter.project_name}}.sln
, selectRelease
and build the project.
Option 2: Command Line
- Start the Command Line Prompt
- Configure and build the project in
C:\W\SSR
by typing the following commands:
cd C:\W\
mkdir SSR
cd SSR
cmake -G "Visual Studio 16 2019" -A x64 -DQt5_DIR:PATH=`C:/Qt/${QT_VERSION}/${COMPILER}/lib/cmake/Qt5 ..\SS
cmake --build . --config Release -- /maxcpucount:4
Release
builds.
cd ~/Projects/SSR/Slicer-build
make package
cd ~/Projects/SSR/Slicer-build
make package
Install NSIS 2
Option 1: CMake and Visual Studio
- In the
C:\W\SSR\Slicer-build
directory, openSlicer.sln
and build thePACKAGE
target
Option 2: Command Line
- Start the Command Line Prompt
- Build the
PACKAGE
target by typing the following commands:
cd C:\W\SSR\Slicer-build
cmake --build . --config Release --target PACKAGE