# Package executables with extension

**URL:** <https://discourse.slicer.org/t/package-executables-with-extension/21415>\
**Category:** Development\
**Tags:** build, package, extensions\
**Created:** [January 11, 2022, 7:25pm UTC](https://discourse.slicer.org/t/package-executables-with-extension/21415 "2022-01-11T19:25:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandus1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/brandus1/32/13776_2.png) [@brandus1](https://discourse.slicer.org/u/brandus1)\
**Post date:** [January 11, 2022, 7:25pm UTC](https://discourse.slicer.org/t/package-executables-with-extension/21415/1 "2022-01-11T19:25:00Z")

</div>

Hello,

I am building an extension and I need to package with it a couple of executables which I want to call as subprocesses from a scripted python module.

This seems the quickest solution for me, avoiding complex building issues.

I have been researching for the last weeks on how to do this but I haven’t found a solution yet.

I already have a slicer superbuild to build the extension.

Any help would be super appreciated, thanks.

---

<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:** [January 11, 2022, 11:57pm UTC](https://discourse.slicer.org/t/package-executables-with-extension/21415/2 "2022-01-11T23:57:04Z")

</div>

If you are building these executables from source then it’s good to build them as part of the extension build. If they are just binaries you got from somewhere you can put them in the Resources folder and install them like you would jpg or something. Be sure to check the platform and warn the user if you don’t have binaries for their machine.

---

<div class="post-metadata">

**Author:** ![brandus1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/brandus1/32/13776_2.png) [@brandus1](https://discourse.slicer.org/u/brandus1)\
**Post date:** [January 17, 2022, 11:44am UTC](https://discourse.slicer.org/t/package-executables-with-extension/21415/3 "2022-01-17T11:44:37Z")

</div>

Works, thank you very much!  
A little bit trickier to copy directories though, but feasible
