# Plugin and standalone app in the same project?

**URL:** <https://forum.juce.com/t/plugin-and-standalone-app-in-the-same-project/31075>\
**Category:** The Projucer\
**Created:** [January 1, 2019, 6:57pm UTC](https://forum.juce.com/t/plugin-and-standalone-app-in-the-same-project/31075 "2019-01-01T18:57:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eyalamir](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/eyalamir/32/2978_2.png) [@eyalamir](https://forum.juce.com/u/eyalamir)\
**Post date:** [January 1, 2019, 6:57pm UTC](https://forum.juce.com/t/plugin-and-standalone-app-in-the-same-project/31075/1 "2019-01-01T18:57:26Z")

</div>

I would like to have a project that shares code between the standalone (Desktop/iOS) version, and the plugin version.

Eventually I’d like all the different targets to call the same components and processing functions, but each of the targets might also add a few behaviors that are unique to it (for example, the standalone version might generate it’s own playhead, or have a different menu).

Is there a way to do it in the Projucer without maintaining two different projects?  
Ideally I’d like to be able to control the ‘shared’ resources from a central location.

Thanks!  
Eyal

---

<div class="post-metadata">

**Author:** ![holy-city](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@holy-city](https://forum.juce.com/u/holy-city)\
**Post date:** [January 1, 2019, 9:28pm UTC](https://forum.juce.com/t/plugin-and-standalone-app-in-the-same-project/31075/2 "2019-01-01T21:28:44Z")

</div>

The default plugin project will build a standalone + plugin versions with shared code.

---

<div class="post-metadata">

**Author:** ![eyalamir](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/eyalamir/32/2978_2.png) [@eyalamir](https://forum.juce.com/u/eyalamir)\
**Post date:** [January 1, 2019, 9:58pm UTC](https://forum.juce.com/t/plugin-and-standalone-app-in-the-same-project/31075/3 "2019-01-01T21:58:23Z")

</div>

Can you add source files that will only compile/run on the stand alone app?

Also, can you deploy the standalone app as an iOS app (not as an AUv3 plugin)?

---

<div class="post-metadata">

**Author:** ![holy-city](https://avatars.discourse-cdn.com/v4/letter/h/8491ac/32.png) [@holy-city](https://forum.juce.com/u/holy-city)\
**Post date:** [January 1, 2019, 10:11pm UTC](https://forum.juce.com/t/plugin-and-standalone-app-in-the-same-project/31075/4 "2019-01-01T22:11:44Z")

</div>

> Can you add source files that will only compile/run on the stand alone app?

I don’t think there’s a #define for standalones but you can check it [programmatically](https://forum.juce.com/t/standalone-mode-flag/24251).

> Also, can you deploy the standalone app as an iOS app (not as an AUv3 plugin)?

Never done it but I believe so

---

<div class="post-metadata">

**Author:** ![yfede](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/yfede/32/506_2.png) [@yfede](https://forum.juce.com/u/yfede)\
**Post date:** [January 3, 2019, 10:59am UTC](https://forum.juce.com/t/plugin-and-standalone-app-in-the-same-project/31075/5 "2019-01-03T10:59:42Z")

</div>

> [@Holy\_City](#):
>
> I don’t think there’s a #define for standalones

Actually, I think there is: `JucePlugin_Build_Standalone`
