Difference between revisions of "Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions"

From Slicer Wiki
Jump to: navigation, search
m
m
Line 57: Line 57:
 
<li><p>[[Documentation/{{documentation/version}}/Developers/Tutorials/DocumentExtension#Extension_page|Create a documentation page for your extension]].</p></li>
 
<li><p>[[Documentation/{{documentation/version}}/Developers/Tutorials/DocumentExtension#Extension_page|Create a documentation page for your extension]].</p></li>
  
<li><p>If not already done, send an email on the [http://massmail.bwh.harvard.edu/mailman/listinfo/slicer-devel slicer developers list] asking to be granted write permission on the [http://slicer.kitware.com/midas3/folder/253 experimental folder].</p></li>
+
<li><p>[[Documentation/{{documentation/version}}/Developers/Tutorials/ObtainExtensionServerApiKey|Create an account on the extension server and obtain an API Key]]. You can then used your midas login and api key to substitute <code><YOUR-MIDAS-LOGIN></code> and <code><YOUR-MIDAS-APIKEY></code> in the examples.</p></li>
  
<li><p>[[Documentation/{{documentation/version}}/Developers/Tutorials/ObtainExtensionServerApiKey|Create an account on the extension server and obtain an API Key]]. You can then used your midas login and api key to substitute <code><YOUR-MIDAS-LOGIN></code> and <code><YOUR-MIDAS-APIKEY></code> in the examples.</p></li>
+
<li><p>If not already done, send an email on the [http://massmail.bwh.harvard.edu/mailman/listinfo/slicer-devel slicer developers list] asking to be granted write permission on the [http://slicer.kitware.com/midas3/folder/253 experimental folder].</p>
 +
<pre>
 +
To: slicer-devel@bwh.harvard.edu
 +
Subject: Extension NAME-OF-YOUR-EXTENSION - Asking permission to write to the Experimental folder
 +
Hi,
 +
 
 +
Working on extension NAME-OF-YOUR-EXTENSION, that will allows to [...]
 +
 
 +
Could you grant me write access to the Experimental folder ?
 +
 
 +
</pre></li>
  
 
<li><p>Assuming the source code of your extension is located in folder <code>MyExtension</code>, you could upload your extension doing:
 
<li><p>Assuming the source code of your extension is located in folder <code>MyExtension</code>, you could upload your extension doing:

Revision as of 19:26, 14 June 2013

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 ?

  1. Scan through the user and developer extension FAQs

  2. (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.

  3. Build Slicer application in Release

  4. 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:

    the Wizard, click here.
    the different type of modules, click here.

    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
    
  5. Create a repository to save your extension located in ~/MyExtension directory. We recommend GitHub. Need help ?

  6. Implement your extension. Hack, hack, hack :). Make sure to commit often using meaningful commit message.

  7. Create a documentation page for your extension.

  8. Create an account on the extension server and obtain an API Key. You can then used your midas login and api key to substitute <YOUR-MIDAS-LOGIN> and <YOUR-MIDAS-APIKEY> in the examples.

  9. 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, 
    
    Working on extension NAME-OF-YOUR-EXTENSION, that will allows to [...]
    
    Could you grant me write access to the Experimental folder ?
    
    
  10. Assuming the source code of your extension is located in folder MyExtension, you could upload your extension doing:

    Linux or MacOSX (Makefile) Windows (Visual Studio)
    $ mkdir MyExtension-build
    
    $ cd MyExtension-build
    
    $ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DMIDAS_PACKAGE_EMAIL:STRING=<YOUR-MIDAS-LOGIN> -DMIDAS_PACKAGE_API_KEY:STRING=<YOUR-MIDAS-APIKEY> -DSlicer_DIR:PATH=/path/to/Slicer-Superbuild/Slicer-build ../MyExtension
    
    $ make ExperimentalUpload
    
    1. Start CMake, select source and build directory
    2. Add Slicer_DIR, MIDAS_PACKAGE_EMAIL and MIDAS_PACKAGE_API_KEY entries to the cache
    3. Slicer Extensions Configure Windows.png
    4. Click on Configure, select Generator, then click on Generate button.
    5. Open MyExtension.sln (1), select Release configuration (2), select ExperimentalUpload (3) and Build (4).
    6. Slicer Extension ExperimentalUpload Windows VS2008.png

  11. Check submission results on the dashboard: http://slicer.cdash.org/index.php?project=Slicer4#Extensions-Experimental

  12. 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.

  13. If you consider your extension ready for distribution, follow these instructions. to contribute the already generated description file.