Difference between revisions of "Documentation/Nightly/Developers/FAQ/Extensions"
m |
m |
||
| Line 4: | Line 4: | ||
</includeonly> | </includeonly> | ||
| + | == What is the Extensions Index ? == | ||
| + | |||
| + | {{:Documentation/{{documentation/version}}/Developers/Extensions/Index}} | ||
== What is an API Key ? == | == What is an API Key ? == | ||
Revision as of 10:18, 26 February 2013
Home < Documentation < Nightly < Developers < FAQ < ExtensionsContents
- 1 Extensions
- 1.1 What is the Extensions Index ?
- 1.2 What is an API Key ?
- 1.3 How to obtain an API key to submit on the extension server ?
- 1.4 Is --launch flag available for a MacOSX installed Slicer.app ?
- 1.5 What is the difference between Documentation/Nightly/Modules and Documentation/Nightly/Extensions ?
- 1.6 Which URL should be associated with EXTENSION_HOMEPAGE metadata ?
Extensions
What is the Extensions Index ?
What is an API Key ?
See http://en.wikipedia.org/wiki/Application_programming_interface_key
How to obtain an API key to submit on the extension server ?
In order to upload extensions on the slicer extensions server, it is required to:
Create an account on the extension server: http://slicer.kitware.com by clicking on the
Registerlink in the top right cornerGo to NA-MIC community and click on
Join communityRetrieve your API key looking at your account details:
- Go to http://slicer.kitware.com. If needed, signin by clicking on
Loginin the top right corner. - Click on your name in the top right corner.
- Click on
My account. - Click on
APItab. Copy the
API Keyassociated withDefaultapplication.There is currently a bug preventing api key containing non alpanumeric characters from being used.
If your Default api key contain for example a/, try to delete the api key and regenerate one that is not containing "/" and is namedDefault.
We are working on the issue to update the build system so that it properly escape "/" and also get in touch with Midas team so that api key containing just number and letter are generated.
- Go to http://slicer.kitware.com. If needed, signin by clicking on
This image shows the top portion of http://slicer.kitware.com after it has been expanded by clicking the Register button.
Is --launch flag available for a MacOSX installed Slicer.app ?
On MacOSx, running Slicer with the --help argument does NOT list the usual launcher related options.
$ ./Slicer.app/Contents/MacOS/Slicer --help Usage Slicer [options] Options --, --ignore-rest Ignores the rest of the labeled arguments following this flag. (default: false) -h, --help Display available command line arguments. [...] --version Displays version information and exits.
To provide some background information, when generating the package that will be distributed, an application bundle Slicer.app is created. As explained here, a bundle is a directory with a standardized hierarchical structure that holds executable code and the resources used by that code. It means that since all libraries contained within a bundle are referenced relatively to the location of either the CLI or the Slicer executable, the use of launcher does NOT make sens.
To help fixing-up the libraries, executables and plugins so that they reference each other in a relative way, CMake provides us with the BundleUtilities module.
This module is used in two situations:
- Fixup of Slicer application itself. See SlicerCPack.cmake#L36-68 and SlicerCPackBundleFixup.cmake.in
- Fixup of an extension package. See SlicerExtensionCPack.cmake#L126-143 and SlicerExtensionCPackBundleFixup.cmake.in
What is the difference between Documentation/Nightly/Modules and Documentation/Nightly/Extensions ?
As suggested by the namespace names:
- All module documentation pages should be located under
Documentation/Nightly/Modules - All extension documentation pages should be located under
Documentation/Nightly/Extensions
For example, if an an extension named DoSomethingGreat bundles three modules ModuleA, ModuleB and ModuleC. The following pages should be created:
Documentation/Nightly/Extensions/DoSomethingGreatDocumentation/Nightly/Modules/ModuleADocumentation/Nightly/Modules/ModuleBDocumentation/Nightly/Modules/ModuleC
In case your extension bundles only one module, the extension name is expected to match the module name. For example, if your extension is named DoSomethingAwesome, the associated module is expected to be named DoSomethingAwesome. The following pages will then be created:
Documentation/Nightly/Extensions/DoSomethingAwesomeDocumentation/Nightly/Modules/DoSomethingAwesome
where page Extensions/DoSomethingAwesome redirect to page Modules/DoSomethingAwesome.
To setup a redirection, simply add the following text to page Extensions/DoSomethingAwesome:
#REDIRECT [[Documentation/Nightly/Modules/DoSomethingAwesome]]
For an example, see here
More details about redirection are available here: http://www.mediawiki.org/wiki/Help:Redirects
Which URL should be associated with EXTENSION_HOMEPAGE metadata ?
Extensions available through the Slicer Extensions Catalog are expected to have a page created under the Nightly documentation namespace. The corresponding URL should be associated with the EXTENSION_HOMEPAGE metadata.
For example:
set(EXTENSION_HOMEPAGE "http://slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/DoSomethingGreat")set(EXTENSION_HOMEPAGE "http://slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/DoSomethingAwesome")
Note that this also apply for extension bundling only one module. Indeed, in this case the page will redirect to the appropriate module page. For example: http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/SkullStripper