# Installing extensions in binary distribution of Slicer

**URL:** <https://discourse.slicer.org/t/installing-extensions-in-binary-distribution-of-slicer/7511>\
**Category:** Support\
**Tags:** extensions-manager\
**Created:** [July 10, 2019, 10:59pm UTC](https://discourse.slicer.org/t/installing-extensions-in-binary-distribution-of-slicer/7511 "2019-07-10T22:59:39Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 11, 2019, 8:30pm UTC](https://discourse.slicer.org/t/installing-extensions-in-binary-distribution-of-slicer/7511/21 "2019-10-11T20:30:29Z")

</div>

Ah, yes, I recall there’s a bug with -h getting grabbed by the launcher, but other args should work.

Maybe you can add suggestions for your use case to this issue:

> <https://github.com/commontk/AppLauncher/issues/111>
>
> As far as I understand, it should allow to pass further arguments only to the launched binary, but:
> \`\`\`
> sliceruser@8192a65779e5:~/Slicer-4.9.0-2018-10-14-linux-amd64$ ./Slicer --launch ./bin/python-real...

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 12, 2019, 12:55am UTC](https://discourse.slicer.org/t/installing-extensions-in-binary-distribution-of-slicer/7511/22 "2019-10-12T00:55:33Z")

</div>

This post may answer your question:

> [@How should I pass arguments when running Slicer in batch mode?](https://discourse.slicer.org/t/how-should-i-pass-arguments-when-running-slicer-in-batch-mode/8217/2):
>
> Everything after --python-script until the next recognizable flag is passed into the python interpreter: Run: ./Slicer.exe --no-main-window --python-script test.py param1 param2 param3 Where test.py is: print(sys.argv) You will get this output on the console: ['test.py', 'param1', 'param2', 'param3']

Also not that if you don’t need to run the application (e.g., just run Python CLI modules) then you may be able to run Python scripts using `PythonSlicer` executable.

---

<div class="post-metadata">

**Author:** ![tbillah](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tbillah/32/4139_2.png) [@tbillah](https://discourse.slicer.org/u/tbillah)\
**Post date:** [November 30, 2020, 10:48pm UTC](https://discourse.slicer.org/t/installing-extensions-in-binary-distribution-of-slicer/7511/23 "2020-11-30T22:48:13Z")

</div>

> [@pieper](#):
>
> Ah, right - the problem here is that `--additional-module-paths` is an argument of the application, not the launcher.

Hi all,

I would like to share a solution to the above problem I figured–in @jcfr’s suggestion, if I change the last line to:

```bash
AdditionalPaths=${additional_module_paths} ${launcher} --launcher-additional-settings ${slicer_revision_user_settings}

```

it goes away. As you can see, the trick is to move the additional paths from end to front.

For what it’s worth, I am no longer in `python-real`. I needed to launch a module from SlicerDMRI:

```bash
AdditionalPaths=${additional_module_paths} ${launcher} --launcher-additional-settings ${slicer_revision_user_settings} --launch .config/NA-MIC/Extensions-28257/SlicerDMRI/lib/Slicer-4.10/cli-modules/FiberTractMeasurements --help

```

Lastly, to echo Andras’ suggestion, I think I am better off building an independent Slicer in future.

---

<div class="post-metadata">

**Author:** ![fuentesdt](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fuentesdt/32/9361_2.png) [@fuentesdt](https://discourse.slicer.org/u/fuentesdt)\
**Post date:** [March 5, 2021, 2:00pm UTC](https://discourse.slicer.org/t/installing-extensions-in-binary-distribution-of-slicer/7511/24 "2021-03-05T14:00:45Z")

</div>

Hi,

I have a similar question to this post. I want to make a minor modification to a Slicer Extension for another lab member to use. Is the best approach to build everything in a docker and package the extension modification? something like:

> **[Slicer/SlicerBuildEnvironment - Configure, build and package a Slicer extension for Linux](https://github.com/Slicer/SlicerBuildEnvironment#configure-build-and-package-a-slicer-extension-for-linux)**
>
> A repository of scripts to set up a Slicer build environment.

as long as the group all have a similar linux environment on a local machine should be ok?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 5, 2021, 2:08pm UTC](https://discourse.slicer.org/t/installing-extensions-in-binary-distribution-of-slicer/7511/25 "2021-03-05T14:08:07Z")

</div>

I would recommend to send a pull request to the extension’s repository. Then not only that lab member but all other users can benefit from the change.

In general, “similar” build environment is not sufficient for achieving binary compatibility, but you can try and it may or may not work. To ensure binary compatibility, you need to have the exact same build environment, which is the easiest to achieve if you build on the same computer (physical or virtual machine or container).

---

<div class="post-metadata">

**Author:** ![fuentesdt](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fuentesdt/32/9361_2.png) [@fuentesdt](https://discourse.slicer.org/u/fuentesdt)\
**Post date:** [March 5, 2021, 2:18pm UTC](https://discourse.slicer.org/t/installing-extensions-in-binary-distribution-of-slicer/7511/26 "2021-03-05T14:18:22Z")

</div>

thank you. i’ll try both. the modification is very much a hack that breaks other functionality a user might want. I need to give it some thought how to not break existing the calculation.

[Previous page](https://discourse.slicer.org/t/installing-extensions-in-binary-distribution-of-slicer/7511.md?page=1)
