# Convert an extension into standalone application

**URL:** <https://discourse.slicer.org/t/convert-an-extension-into-standalone-application/23371>\
**Category:** Development\
**Tags:** build, extensions-manager\
**Created:** [May 11, 2022, 10:26am UTC](https://discourse.slicer.org/t/convert-an-extension-into-standalone-application/23371 "2022-05-11T10:26:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mrwa\_Awoda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mrwa_awoda/32/10236_2.png) [@Mrwa\_Awoda](https://discourse.slicer.org/u/Mrwa_Awoda)\
**Post date:** [May 11, 2022, 10:26am UTC](https://discourse.slicer.org/t/convert-an-extension-into-standalone-application/23371/1 "2022-05-11T10:26:21Z")

</div>

Operating system: windows 10  
Slicer version: 4.13  
Actual behavior:

Is it possible to convert an extension into standalone application and works with no need to install the 3D Slicer in my computer?

I tried to build the extension and then I get this error `Slicer_DIR-NOTFOUND`. I followed the instructions by replacing `Slicer_DIR-NOTFOUND` by `c:/D/S4D/Slicer-build`, but still didn’t work.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/b/3b06a7b23f3da5a57ce875c590455b874e5e48a5.jpeg)

Does that mean the extension is connected to the 3D Slicer either way?

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [May 11, 2022, 11:15am UTC](https://discourse.slicer.org/t/convert-an-extension-into-standalone-application/23371/2 "2022-05-11T11:15:38Z")

</div>

Regarding the instructions on how to build an extension ([Extensions — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/extensions.html)) setting `Slicer_DIR` to the path `c:/D/S4D/Slicer-build` is an example path. Based on reading your other posts it appears you have built Slicer in a `c:D/S4R` directory so your `Slicer_DIR` is at `c:/D/S4R/Slicer-build`.

---

<div class="post-metadata">

**Author:** ![Mrwa\_Awoda](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mrwa_awoda/32/10236_2.png) [@Mrwa\_Awoda](https://discourse.slicer.org/u/Mrwa_Awoda)\
**Post date:** [May 11, 2022, 7:16pm UTC](https://discourse.slicer.org/t/convert-an-extension-into-standalone-application/23371/3 "2022-05-11T19:16:25Z")

</div>

> Based on reading your other posts it appears you have built Slicer in a `c:D/S4R` directory so your `Slicer_DIR` is at `c:/D/S4R/Slicer-build` .

Right… CMake problem solved, but I get the same build error with VS, although it was previously resolved by

> rename the `C:/Users/toshiba/AppData/Local/Programs/Python` to something else (e.g., `C:/Users/toshiba/AppData/Local/Programs/PythonTemp` )

\*Python folder’s name still PythonTemp…  
here:

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

Here is the output of the build:

> [SlicerRT-Build Output.docx - Google Docs](https://docs.google.com/document/d/1EgmAdmFUo3p8Uc5CSP609zhDYsKE-C9a/edit?usp=sharing&ouid=109318822956054168149&rtpof=true&sd=true)

---

<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:** [May 12, 2022, 2:03am UTC](https://discourse.slicer.org/t/convert-an-extension-into-standalone-application/23371/4 "2022-05-12T02:03:05Z")

</div>

The ` CMake variable EXTENSION_WC_REVISION is empty !` error is due to building an extension that is not under revision control. You can choose to either build the extension from a git version-controlled folder or specify the extension revision manually as described [here](https://discourse.slicer.org/t/3d-slicer-release-build-error-variable-slicer-wc-last-changed-date-is-expected-to-be-defined-in-slicerpackageanduploadtarget/20984/23).

While obviously developers must always use revision control, Slicer project should probably not enforce this as a mandatory rule. Therefore, I’ve submitted a pull request that changes the build error to just a warning:

> <https://github.com/Slicer/Slicer/pull/6365>
>
> Developers often complained that their extension build failed for some unknown r…eason and frequently the issue was that they did not store the source code in a git repository.
> 
> It is good to encourage developers to use best practices, such as version control, but making the build fail if they build from a non-version-controlled repository was unnecessarily strong measure.
> 
> This commit changes the behavior so that if an extension is built from a non-git folder then the build succeeds, just a warning is displayed during project configuration step and \`NA\` is used as the extension's WC revision.
