NA-MIC National Alliance for Medical Image Computing Slicer Building and Deployment Steve Pieper, PhD
National Alliance for Medical Image Computing Overall Goals Building: –Support cross platform building of Slicer Base plus run-time loadable modules –Use VTK/ITK CMake infrastructure, but avoid writing a lot of code in CMake script Deployment: –Capture all dynamic libraries into redistributable platform specific archive –Run off a CD-ROM or download with no installation and minimal system dependencies
National Alliance for Medical Image Computing Slicer Solution slicer_variables.tcl –A few high-level configurations genlib.tcl –Does cvs checkout of tagged CMake, VTK, ITK, Tcl/Tk to generate compatible libraries cmaker.tcl –Detects modules, configures for libraries, and builds launch.tcl –Sets platform-specific environment variables so loadable libraries are correctly detected tarup.tcl –Makes a platform-specific archive including all shared libraries and tcl scripts
National Alliance for Medical Image Computing Slicer_variables.tcl Set high-level configuration –Custom locations of lib directories –Compiler choice –CMake Generator Type E.g. Makefiles or Visual Studio –Build type (debug or release) –… Generally the default values are fine –Windows requires download of pre-compiled tcl and gsl libs
National Alliance for Medical Image Computing Genlib.tcl Create the needed libraries so you don’t have to! –Cmake, tcl, tk, itcl, iwidgets, BLT, VTK, ITK Process –Check out tagged cvs versions –Configure / cmake –Make install to local directory
National Alliance for Medical Image Computing Cmaker.tcl Script to build slicer and it’s modules –Automatically detect build targets from the Modules directory –Specify Extra Modules from the SLICER_MODULES environment variable
National Alliance for Medical Image Computing Launch.tcl Uses slicer_variables.tcl to identify libraries Sets up the execution environment to find all shared libraries and support tcl files –PATH and LD_LIBRARY_PATH (linux, solaris) –Path (windows) –DYLD_LIBRARY_PATH (mac) –TCLLIBPATH, TCL_LIBRARY, TK_LIBRARY (all) Starts slicer in subshell
National Alliance for Medical Image Computing Launchers Rely on “Starkits” –Stand Alone Runtime Kits –Use tcl virtual file system technology to make single executable tcl/tk distribution that also includes custom scripts –Allows detection of SLICER_HOME automatically so that all other paths can be relative to the launcher executable Why? –Cross-Platform –Launch logic localized to single script for easier maintenance (not a.bat and a.sh file) See Scripts/launcher for more detail
National Alliance for Medical Image Computing Tarup.tcl Run from within Slicer Builds Archive distribution for deployment –Platform specific launcher –Shared libraries, tcl code, data for Lib Base Modules –Extra platform-specific support libs
National Alliance for Medical Image Computing Result Cross-platform build and deployment solution for VTK/ITK based interactive applications Tested across the last 3 slicer releases
National Alliance for Medical Image Computing Resources