# How to Package a Custom Slicer Application for Distribution

**URL:** <https://discourse.slicer.org/t/how-to-package-a-custom-slicer-application-for-distribution/44298>\
**Category:** Support\
**Created:** [September 1, 2025, 11:43am UTC](https://discourse.slicer.org/t/how-to-package-a-custom-slicer-application-for-distribution/44298 "2025-09-01T11:43:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![software](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/software/32/79627_2.png) [@software](https://discourse.slicer.org/u/software)\
**Post date:** [September 1, 2025, 11:43am UTC](https://discourse.slicer.org/t/how-to-package-a-custom-slicer-application-for-distribution/44298/1 "2025-09-01T11:43:11Z")

</div>

I have built a custom Slicer application using the [Kitware SlicerCustomAppTemplate](https://github.com/KitwareMedical/SlicerCustomAppTemplate). I have also integrated 5 custom scripted modules successfully.

Now, I would like to package the application so that it can be distributed and installed on other PCs.

What is the recommended way to package and distribute a custom Slicer application with all included modules? Are there specific steps or best practices for creating installers for Windows/Linux/Mac so others can run it without rebuilding?

Any guidance or references would be greatly appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 1, 2025, 12:29pm UTC](https://discourse.slicer.org/t/how-to-package-a-custom-slicer-application-for-distribution/44298/2 "2025-09-01T12:29:41Z")

</div>

You simply need to build the Package project in the inner `Slicer-build` directory, just like when you want to package the vanilla Slicer. All the custom modules (and open-source extensions) you have included in the main CMake will be packaged as well, along with all the resources that are included in CMake as resources.

On Windows it is starting build for the PACKAGE project only in said solution. On Linux, it is running `make package` from said directory. On Mac I’m not sure exactly but you basically need to build that project.

The installer will be generated in the same `Slicer-build` directory.

---

<div class="post-metadata">

**Author:** ![software](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/software/32/79627_2.png) [@software](https://discourse.slicer.org/u/software)\
**Post date:** [September 1, 2025, 6:38pm UTC](https://discourse.slicer.org/t/how-to-package-a-custom-slicer-application-for-distribution/44298/3 "2025-09-01T18:38:45Z")

</div>

Do we just need to open the `Slicer-build` solution (`Slicer.sln`) in Visual Studio and build the **PACKAGE** project directly, or is it necessary to make changes in the root CMake for packaging?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/f/cf5ec77a7cf7c65868ca5c8b99ca5b8ce4e35d08.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 2, 2025, 8:45am UTC](https://discourse.slicer.org/t/how-to-package-a-custom-slicer-application-for-distribution/44298/4 "2025-09-02T08:45:03Z")

</div>

No need to change anything.

> Do we just need to open the `Slicer-build` solution (`Slicer.sln`) in Visual Studio and build the **PACKAGE** project directly

Yes.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/1/31258faf3d1be3e2e58a6a63ad6e15659e0b222b.png)

---

<div class="post-metadata">

**Author:** ![software](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/software/32/79627_2.png) [@software](https://discourse.slicer.org/u/software)\
**Post date:** [September 2, 2025, 10:37am UTC](https://discourse.slicer.org/t/how-to-package-a-custom-slicer-application-for-distribution/44298/5 "2025-09-02T10:37:04Z")

</div>

I followed the same steps you mentioned, but when I click on **Build** Only Packages, I get these two errors:  
PACKAGE EXEC 1  
PACKAGE Microsoft.CppCommon.targets 166

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/c/cc7a0e1c5e38d4f1c1aedeb8e65e2d5331556e41.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 2, 2025, 11:20am UTC](https://discourse.slicer.org/t/how-to-package-a-custom-slicer-application-for-distribution/44298/6 "2025-09-02T11:20:11Z")

</div>

Well, the project in my screenshot does not seem to be the correct one (I never do this via VS, at least not in the past few years). But basically you need to build this one:

`c:\d\S5R\Slicer-build\PACKAGE.vcxproj`

---

<div class="post-metadata">

**Author:** ![software](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/software/32/79627_2.png) [@software](https://discourse.slicer.org/u/software)\
**Post date:** [September 4, 2025, 9:07am UTC](https://discourse.slicer.org/t/how-to-package-a-custom-slicer-application-for-distribution/44298/7 "2025-09-04T09:07:06Z")

</div>

Okay, but I have one confusion. All my custom scripted modules depend on several libraries that are not included in Slicer by default.

Before packaging, I integrated the modules and built them using _All Build_ without any errors. While using the modules, I installed the required libraries through the Python console.

Now my question is: before packaging, do I need to install all these libraries again, or will they be included automatically in the packaged application?
