Difference between revisions of "Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions"
Line 54: | Line 54: | ||
<ol style="list-style-type:none; border-left:thick solid darkgreen; padding-left:1em;"> | <ol style="list-style-type:none; border-left:thick solid darkgreen; padding-left:1em;"> | ||
<li>We recommend [https://github.com/ GitHub]. [https://help.github.com/articles/create-a-repo Need help ?]</li> | <li>We recommend [https://github.com/ GitHub]. [https://help.github.com/articles/create-a-repo Need help ?]</li> | ||
− | <li>Read our [[Documentation/{{documentation/version}} | + | <li>Read our [[Documentation/{{documentation/version}}/Developers/FAQ/Extensions#Should_the_name_of_the_source_repository_match_the_name_of_the_extension_.3F|FAQ]] to learn about repository naming convention. |
</ol> | </ol> | ||
</li> | </li> |
Revision as of 15:39, 11 March 2014
Home < Documentation < Nightly < Developers < Tutorials < BuildTestPackageDistributeExtensions
For the latest Slicer documentation, visit the read-the-docs. |
Step-by-step: How to create, publish and distribute an extension ?
(Optionally) Present your extension(s) on the slicer developers list to check if other developer are working on a similar project, to seek for advice or to reach out for potential collaborator.
Build Slicer application in
Release
Use the Wizard to create an extension bundling one Command line module:
Linux or MacOSX Windows Start a terminal.
$ cd Slicer $ ../Slicer-SuperBuild/python-build/bin/python ./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/CLIExtensionTemplate/ --target ~/MyExtension MyExtension $ rm -rf ~/MyExtension/CLIModuleTemplate/ $ ../Slicer-SuperBuild/python-build/bin/python ./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/CLIExtensionTemplate/CLIModuleTemplate/ --target ~/MyExtension/MyCLI MyCLI $ sed -i.bak 's/add_subdirectory(CLIModuleTemplate)/add_subdirectory(MyCLI)/g' ~/MyExtension/CMakeLists.txt && rm ~/MyExtension/CMakeLists.txt.bak
To learn more about:
Start Git Bash (not the Windows command line). Need help ?
$ cd Slicer $ ../Slicer-SuperBuild/python-build/bin/Release/python.exe ./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/CLIExtensionTemplate/ --target ~/MyExtension MyExtension $ rm -rf ~/MyExtension/CLIModuleTemplate/ $ ../Slicer-SuperBuild/python-build/bin/Release/python.exe ./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/CLIExtensionTemplate/CLIModuleTemplate/ --target ~/MyExtension/MyCLI MyCLI $ sed.exe -i.bak 's/add_subdirectory(CLIModuleTemplate)/add_subdirectory(MyCLI)/g' ~/MyExtension/CMakeLists.txt && rm ~/MyExtension/CMakeLists.txt.bak
Create a repository named
Slicer-MyExtension
to save your extension located in~/MyExtension
directory.- We recommend GitHub. Need help ?
- Read our FAQ to learn about repository naming convention.
Implement your extension.
Hack, hack, hack :)
. Make sure to commit often using meaningful commit message.Create an account on the extension server and obtain an API Key. You will then use your midas login and api key to substitute
<YOUR-MIDAS-LOGIN>
and<YOUR-MIDAS-APIKEY>
in the examples.If not already done, go to NA-MIC community and click on
Join community
If not already done, send an email on the slicer developers list asking to be granted write permission on the experimental folder.
To: slicer-devel@bwh.harvard.edu Subject: Extension NAME-OF-YOUR-EXTENSION - Asking permission to write to the Experimental folder Hi, This extension will allow to [...] Could you grant user YourUserName write access to the Experimental folder ?
Assuming the source code of your extension is located in folder
MyExtension
, you could upload your extension doing:Check submission results on the dashboard: http://slicer.cdash.org/index.php?project=Slicer4#Extensions-Experimental
- You should expect the test
MyCLITest
to fail with error of the form:[nrrd] nrrdIoStateDataFileIterNext: couldn't open "~/MyExtension-build/MyCLI/Data/Baseline/CLIModuleTemplateTest.raw"
This is explained by the fact the*.nhdr
file available on midas and downloaded locally still referenceCLIModuleTemplateTest.raw
- You should expect the test
Check that the extension can be installed by starting the Slicer executable from
/path/to/Slicer-Superbuild/Slicer-build
and installing your extension as explained here.-
If you consider your extension ready for distribution, follow these instructions. to contribute the already generated description file.
- The generated extension description file file is named
<MyExtension>.s4ext
and is located in the extension build directory~/MyExtension-build
- Details about the extension description file formet are available here
- The generated extension description file file is named