Skip to content

Commit

Permalink
DOC: Clarify when local build is needed for extension development (#7501
Browse files Browse the repository at this point in the history
)

(cherry picked from commit 8965eab)
  • Loading branch information
jcfr committed Apr 5, 2024
1 parent d5571b4 commit 0125664
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Docs/developer_guide/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ If you have developed a script or module that you would like to share with other
- [build Slicer application](build_instructions/index.md).
- [build your extension](#build-an-extension)

(extension-build)=
## Build an extension

:::{note}
To compile extensions containing C++-implemented modules, it's essential to [build Slicer from source](build_instructions/index.md) on your local machine. These extensions cannot be compiled against a binary download. However, if your modules are solely developed in Python, there's no need to build the extension.

To build extensions that contain modules implemented in C++, you need to [build Slicer from source](build_instructions/index.md) on your machine; they cannot be built against a binary download.
If developing modules in Python only, then it is not necessary to build the extension.

Once your work is ready for sharing, refer to [](#extension-distribute) for guidelines.
:::

Similarly to the building of Slicer core, multi-configuration builds are not supported: one build tree can be only used for one build mode (Release or Debug or RelWithDebInfo or MinSizeRel). If a release and debug mode build are needed then the same source code folder can be used (e.g., `C:\D\SlicerHeart`) but a separate binary folder must be created for each build mode (e.g., `C:\D\SlicerHeart-R` and `C:\D\SlicerHeart-D` for release and debug modes).
Expand Down Expand Up @@ -142,6 +142,7 @@ Replace `Release` with the build mode of your extension build (`Debug`, `Release
- Set the project as the StartUp Project (right-click -> Set As StartUp Project).
- Start debugging (F5).

(extension-continuous-integration)=
### Continuous integration

If you shared your extension by using the ExtensionWizard, make sure you know about the Slicer testing dashboard:
Expand Down Expand Up @@ -194,6 +195,7 @@ Extension documentation examples:
Thumbnails to YouTube videos can be generated by using an URL of the form `https://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg` and
adding a playback button using [this free service](https://addplaybuttontoimage.way4info.net/) (the second red arrow is recommended).

(extension-distribute)=
## Distribute an extension

- Upload source code of your extension to a publicly available repository. It is recommended to start the repository name with "Slicer" (to make Slicer extensions easier to identify) followed by your extension name (for example, "Sequences" extension is stored in "SlicerSequences" repository). However, this is not a mandatory requirement. If you have a compelling reason not to use Slicer prefix, please make a note while making the pull request. See more requirements in the [new extension submission checklist](https://github.com/Slicer/ExtensionsIndex/blob/main/.github/PULL_REQUEST_TEMPLATE.md#todo-list-for-submitting-a-new-extension).
Expand All @@ -213,6 +215,12 @@ adding a playback button using [this free service](https://addplaybuttontoimage.
- Create a pull request: by clicking ''Create pull request'' button
- Follow the instructions in the pull request template

:::{tip}
Once your extension is successfully integrated into the Extensions Index, you gain access to daily build and test reports for verification. For additional information, refer to [](#extension-continuous-integration).

While it is possible to develop Python-based extensions without a [local extension build](#extension-build), creating one can significantly expedite the development cycle. This allows you to promptly confirm that the extension can be properly packaged and distributed, providing a quicker feedback loop compared to waiting for the daily build and test reports.
:::

## Application settings

After installing an extension, the directories are added to revision-specific settings:
Expand Down

0 comments on commit 0125664

Please sign in to comment.