Documentation/4.10/Developers/Build ExtensionsIndex
For the latest Slicer documentation, visit the read-the-docs. |
Contents
- 1 Overview
- 2 Manual build
- 3 Dashboard driven build
Overview
This page explain how to build an ExtensionsIndex.
Think of the ExtensionsIndex as a repository containing a list of extension description files (*.s4ext) used by the Slicer extensions build system to build, test, package and upload extensions on an extensions server.
Once uploaded on an extensions server, within Slicer, extensions can be installed using the extensions manager.
There are two possible approaches to build it:
Manual build
Locally building an extension index provides a convenient way to:
- check extension description files are valid
- upload one or more extensions at ones to check that Slicer can download and install them
Given a directory containing one or more extension description files, with the help of the extensions build system it is possible to manually
configure and build the associated extensions specifying the following CMake options:
Slicer_DIR |
Path to Slicer build tree |
Slicer_EXTENSION_DESCRIPTION_DIR |
Path to folder containing extension description files |
Optionally, it is also possible to specify:
CMAKE_BUILD_TYPE |
On unix-like platform, should match the build type of the associated Slicer build directory |
CTEST_MODEL |
By default set to Experimental .Allow to choose on which CDash track results are submitted as well as setting the submission type associated with the uploaded extension. |
Slicer_UPLOAD_EXTENSIONS |
By default set to OFF .If enabled, extension builds will be submitted to Slicer dashboard and associated packages will be uploaded to extensions server |
MIDAS_PACKAGE_URL |
MIDAS extensions server URL speciManualfying where the extension should be uploaded. For example http://slicer.kitware.com/midas3 |
MIDAS_PACKAGE_EMAIL |
Email allowing to authenticate to the extensions server. |
MIDAS_PACKAGE_API_KEY |
Token allowing to authenticate to the extensions server. |
The following examples are specific to unix-like platforms and can easily be adapted for windows.
Build your own set of extensions against Slicer trunk build tree
Prerequisites:
- Folder
SlicerExtensionsCustomIndex
contains the extension description files of your choice - Slicer trunk has been checkout into
/path/to/Slicer-master
and built into/path/to/Slicer-master-SuperBuild-Release
- To upload extension(s) on the extensions server, an API key has been obtained.
The associated extensions could be built doing:
$ ls ExtensionsIndex foo.s4ext bar.s4ext $ mkdir ExtensionsIndex-build $ cd ExtensionsIndex-build $ export SLICER=${HOME}/slicer4/latest/Slicer $ cmake -DSlicer_DIR:PATH=${SLICER}-SuperBuild-Release/Slicer-build \ -DSlicer_EXTENSION_DESCRIPTION_DIR:PATH=../ExtensionsIndex \ -DCMAKE_BUILD_TYPE:STRING=Release \ ${SLICER}/Extensions/CMake $ make
Then, to submit the configure/build/test results on CDash Extensions-Experimental
track
and upload the extension on the extensions server of your choice,
there are two options:
- Configure (or re-configure) the project passing the options `Slicer_UPLOAD_EXTENSIONS`, `CTEST_MODEL`,
`MIDAS_PACKAGE_URL`, `MIDAS_PACKAGE_EMAIL` and `MIDAS_PACKAGE_API_KEY`
Extensions build, test, package and upload using `Slicer_UPLOAD_EXTENSIONS` option
$ cd SlicerExtensionsCustomIndex-build $ cmake -DSlicer_DIR:PATH=/path/to/Slicer-master-SuperBuild-Release/Slicer-build \ -DSlicer_EXTENSION_DESCRIPTION_DIR:PATH=/path/to/SlicerExtensionsCustomIndex \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DCTEST_MODEL:STRING=Experimental \ -DSlicer_UPLOAD_EXTENSIONS:BOOL=ON \ -DMIDAS_PACKAGE_URL:STRING=http://slicer.kitware.com/midas3 \ -DMIDAS_PACKAGE_EMAIL:STRING=jchris.fillionr@kitware.com \ -DMIDAS_PACKAGE_API_KEY:STRING=a0b012c0123d012abc01234a012345a0 \ /path/to/Slicer-master/Extensions/CMake
Build your own set of extensions against Slicer 4.10 build tree
Prerequisites:
- Folder
SlicerExtensionsCustomIndex
contains the extension description files of your choice - Slicer 4.10 has been checkout into
/path/to/Slicer-411
and built into/path/to/Slicer-411-SuperBuild-Release
- To upload extension(s) on the extensions server, an API key has been obtained.
The associated extensions could be built following the instruction listed in the previous section and changing occurrences of `Slicer-master` into `Slicer-411`.
Build slicer extensions associated with Slicer trunk
Considering the following assumption:
- Slicer trunk has been checkout into `/path/to/Slicer-master` and built into `/path/to/Slicer-master-SuperBuild-Release`
The associated extensions could be built doing:
$ git clone git://github.com/Slicer/ExtensionsIndex.git SlicerExtensionsIndex-master $ mkdir SlicerExtensionsIndex-master-build $ cd SlicerExtensionsIndex-master-build $ cmake -DSlicer_DIR:PATH=/path/to/Slicer-master-SuperBuild-Release/Slicer-build \ -DSlicer_EXTENSION_DESCRIPTION_DIR:PATH=/path/to/SlicerExtensionsIndex-master \ -DCMAKE_BUILD_TYPE:STRING=Release \ /path/to/Slicer-master/Extensions/CMake $ make
Build slicer extensions associated with Slicer 4.10
Considering the following assumption:
- Slicer trunk has been checkout into `/path/to/Slicer-4.10` and built into `/path/to/Slicer-4.10-SuperBuild-Release`
The associated extensions could be built doing:
$ git clone git://github.com/Slicer/ExtensionsIndex.git -b 4.3 SlicerExtensionsIndex-4.3 $ mkdir SlicerExtensionsIndex-4.3-build $ cd SlicerExtensionsIndex-4.3-build $ cmake -DSlicer_DIR:PATH=/path/to/Slicer-4.3-SuperBuild-Release/Slicer-build \ -DSlicer_EXTENSION_DESCRIPTION_DIR:PATH=/path/to/SlicerExtensionsIndex-4.3 \ -DCMAKE_BUILD_TYPE:STRING=Release \ /path/to/Slicer-4.3/Extensions/CMake $ make
Dashboard driven build
Continuous and nightly extension dashboards are setup on the slicer factory machine maintained by Kitware folks.
Assuming you install your own extensions server, you could also distribute your own set of extensions.
Remarks:
- Setting both nightly and continuous builds of the extensions is a key component of the Slicer continuous integration process.
- By customizing the extension template dashboard script, it is possible to easily setup dashboard client submitting to CDash. See example dashboard scripts that are used on official Slicer build machines here (note that these scripts are more complex than the template to allow code reuse between different configurations, but they are tested regularly and so guaranteed to work).
- The images reported below illustrate the dashboard submissions associated with the continuous and nightly builds of Slicer extensions associated to both Slicer trunk and Slicer 4.1.1.