<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.5%2FDevelopers%2FTutorials%2FBuildTestPackageDistributeExtensions</id>
	<title>Documentation/4.5/Developers/Tutorials/BuildTestPackageDistributeExtensions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.5%2FDevelopers%2FTutorials%2FBuildTestPackageDistributeExtensions"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.5/Developers/Tutorials/BuildTestPackageDistributeExtensions&amp;action=history"/>
	<updated>2026-05-04T04:48:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.5/Developers/Tutorials/BuildTestPackageDistributeExtensions&amp;diff=43814&amp;oldid=prev</id>
		<title>UpdateBot: Nightly -&gt; 4.5</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.5/Developers/Tutorials/BuildTestPackageDistributeExtensions&amp;diff=43814&amp;oldid=prev"/>
		<updated>2015-11-12T22:11:25Z</updated>

		<summary type="html">&lt;p&gt;Nightly -&amp;gt; 4.5&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To learn what is an extension, see [[Documentation/Nightly/Developers/FAQ#What_is_an_extension_.3F|here]]&lt;br /&gt;
&lt;br /&gt;
== Conventions ==&lt;br /&gt;
&lt;br /&gt;
* Terminal command - Block like the one below indicates that the command should be executed in a terminal. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type:none; border-left:thick solid darkgreen; padding-left:1em;&amp;quot;&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;On '''Windows''', Git Bash is expected (not the Windows command line). [https://help.github.com/articles/set-up-git#platform-windows Need help ?]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pre2|&amp;lt;nowiki&amp;gt;$ echo &amp;quot;This is a command&amp;quot;&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Step-by-step: How to create, publish and distribute an extension ? ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Scan through the [[Documentation/{{documentation/version}}/FAQ/Extensions|user]] and [[Documentation/{{documentation/version}}/Developers/FAQ/Extensions|developer]] extension FAQs&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;(Optionally) Present your extension(s) on the [http://massmail.bwh.harvard.edu/mailman/listinfo/slicer-devel 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.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;[[Documentation/{{documentation/version}}/Developers/Build_Instructions|Build Slicer application]] in &amp;lt;code&amp;gt;Release&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Use the Wizard to create an extension bundling one Command line module:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pre2|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ cd Slicer-SuperBuild/Slicer-build&lt;br /&gt;
&lt;br /&gt;
$ bin/slicerExtensionWizard --create Slicer-MyExtension --addModule cli:MyCLI ~&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type:none; border-left:thick solid darkgreen; padding-left:1em;&amp;quot;&amp;gt;  &lt;br /&gt;
  &amp;lt;li&amp;gt;By specifying &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; as destination, the extension will be created into your home directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;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 extension naming convention.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To learn more about:&lt;br /&gt;
: the ExtensionWizard capabilities, click [[Documentation/{{documentation/version}}/Developers/ExtensionWizard|here]].&lt;br /&gt;
: the different type of modules, click [[Documentation/{{documentation/version}}/Developers/Modules|here]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;If not already done, join [https://github.com/join Github] and [https://help.github.com/articles/set-up-git#set-up-git setup Git]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Save the source code of your extension by publishing it on Github&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{pre2|&amp;lt;nowiki&amp;gt;$ bin/slicerExtensionWizard --publish ~/Slicer-MyExtension/&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Implement your extension. &amp;lt;code&amp;gt;Hack, hack, hack :)&amp;lt;/code&amp;gt;. Make sure to commit often using meaningful commit message.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;[[Documentation/{{documentation/version}}/Developers/Tutorials/DocumentExtension#Extension_page|Create a documentation page for your extension]].&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;[[Documentation/{{documentation/version}}/Developers/Tutorials/ObtainExtensionServerApiKey|Create an account on the extension server and obtain an API Key]]. You will then use your midas login and api key to substitute &amp;lt;code&amp;gt;&amp;lt;YOUR-MIDAS-LOGIN&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;YOUR-MIDAS-APIKEY&amp;gt;&amp;lt;/code&amp;gt; in the examples.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;If not already done, go to [http://slicer.kitware.com/midas3/community/23 NA-MIC community] and click on &amp;lt;code&amp;gt;Join community&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;{{:Documentation/{{documentation/version}}/Developers/Tutorials/BuildTestPackageDistributeExtensions/ExperimentalFolderAccess}}&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Assuming the source code of your extension is located in folder &amp;lt;code&amp;gt;MyExtension&amp;lt;/code&amp;gt;, you could upload your extension doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type:none; border-left:thick solid darkgreen; padding-left:1em;&amp;quot;&amp;gt; &lt;br /&gt;
  &amp;lt;li&amp;gt;To avoid typing the API email and key, you can set the environment variables &amp;lt;code&amp;gt;MIDAS_PACKAGE_EMAIL&amp;lt;/code&amp;gt; and  &amp;lt;code&amp;gt;MIDAS_PACKAGE_API_KEY&amp;lt;/code&amp;gt;. More details [[Documentation/{{documentation/version}}/Developers/FAQ#How_to_cache_API_credentials_.3F|here]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|width = &amp;quot;100%&amp;quot;&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; style=&amp;quot;border-bottom: 1px solid darkgrey;font-size: 75%;&amp;quot;| Linux or MacOSX (Makefile)&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; style=&amp;quot;border-bottom: 1px solid darkgrey;font-size: 75%;&amp;quot;| Windows (Visual Studio)&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
{{pre2|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ mkdir MyExtension-build&lt;br /&gt;
&lt;br /&gt;
$ cd MyExtension-build&lt;br /&gt;
&lt;br /&gt;
$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DMIDAS_PACKAGE_EMAIL:STRING=&amp;lt;YOUR-MIDAS-LOGIN&amp;gt; -DMIDAS_PACKAGE_API_KEY:STRING=&amp;lt;YOUR-MIDAS-APIKEY&amp;gt; -DSlicer_DIR:PATH=/path/to/Slicer-Superbuild/Slicer-build ../MyExtension&lt;br /&gt;
&lt;br /&gt;
$ make ExperimentalUpload&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start CMake, select source and build directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add &amp;lt;code&amp;gt;Slicer_DIR&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MIDAS_PACKAGE_EMAIL&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;MIDAS_PACKAGE_API_KEY&amp;lt;/code&amp;gt; entries to the cache&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Slicer Extensions Configure Windows.png|600px]]&lt;br /&gt;
&amp;lt;li&amp;gt;Click on &amp;lt;code&amp;gt;Configure&amp;lt;/code&amp;gt;, select Generator, then click on &amp;lt;code&amp;gt;Generate&amp;lt;/code&amp;gt; button.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open &amp;lt;code&amp;gt;MyExtension.sln&amp;lt;/code&amp;gt; (1), select &amp;lt;code&amp;gt;Release&amp;lt;/code&amp;gt; configuration (2), select &amp;lt;code&amp;gt;ExperimentalUpload&amp;lt;/code&amp;gt; (3) and &amp;lt;code&amp;gt;Build&amp;lt;/code&amp;gt; (4).&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Slicer_Extension_ExperimentalUpload_Windows_VS2008.png|400px]]&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Check submission results on the dashboard: http://slicer.cdash.org/index.php?project=Slicer4#Extensions-Experimental&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;ol style=&amp;quot;list-style-type:none; border-left:thick solid red; padding-left:1em;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;You should expect the test &amp;lt;code&amp;gt;MyCLITest&amp;lt;/code&amp;gt; to fail with error of the form:&lt;br /&gt;
  {{pre2|scroll|[nrrd] nrrdIoStateDataFileIterNext: couldn't open &amp;quot;~/MyExtension-build/MyCLI/Data/Baseline/CLIModuleTemplateTest.raw&amp;quot;}}&lt;br /&gt;
  This is explained by the fact the &amp;lt;code&amp;gt;*.nhdr&amp;lt;/code&amp;gt; file available on midas and downloaded locally still reference &amp;lt;code&amp;gt;CLIModuleTemplateTest.raw&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Check that the extension can be installed by starting the Slicer executable from &amp;lt;code&amp;gt;/path/to/Slicer-Superbuild/Slicer-build&amp;lt;/code&amp;gt; and installing your extension as explained [[Documentation/{{documentation/version}}/SlicerApplication/ExtensionsManager|here]].&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;If you consider your extension is ready for distribution, contribute it to the ExtensionsIndex:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  {{pre2|&amp;lt;nowiki&amp;gt;$ bin/slicerExtensionWizard --contribute ~/Slicer-MyExtension/&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;ol style=&amp;quot;list-style-type:none; border-left:thick solid darkgreen; padding-left:1em;&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;li&amp;gt;To contribute an extensions build against Slicer {{Documentation/currentversion}}. See [[Documentation/{{documentation/version}}/Developers/Tutorials/Contribute_Extension_Description_File_using_Extension_Wizard|here]].&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;To learn about extension description file format. See [[Documentation/{{documentation/version}}/Developers/Extensions/DescriptionFile|here]]&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>UpdateBot</name></author>
		
	</entry>
</feed>