100 likes | 236 Views
Slicer Building and Deployment. Steve Pieper, PhD. 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:
E N D
Slicer Building and Deployment Steve Pieper, PhD
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
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
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) • …
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
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
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
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
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
Result • Cross-platform build and deployment solution for VTK/ITK based interactive applications • Tested across the last 3 slicer releases