# Setup for combined standalone and plugin build

**URL:** <https://forum.juce.com/t/setup-for-combined-standalone-and-plugin-build/11971>\
**Category:** The Projucer\
**Created:** [December 2, 2013, 8:57am UTC](https://forum.juce.com/t/setup-for-combined-standalone-and-plugin-build/11971 "2013-12-02T08:57:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/sebk/32/6425_2.png) [@sebk](https://forum.juce.com/u/sebk)\
**Post date:** [December 2, 2013, 8:57am UTC](https://forum.juce.com/t/setup-for-combined-standalone-and-plugin-build/11971/1 "2013-12-02T08:57:08Z")

</div>

Hi,

currently I have a plugin written in JUCE and I also have some wrapper classes to include the plugin into a simple standalone application with an audio file player and playback controls.

What I want to achieve now is a simple build setup to create either the plugin or the standalone version. My project source folder looks like this:

Build/...  
JuceLibrayCode/...  
JuceLibrayCode/modules/"ALL MODULES"  
src/PluginProcessor.cpp .h  
src/PluginEditor.cpp .h  
src/wrapper/"WRAPPER CLASSES"  
Project.jucer

Currently I can either configure the .jucer file to build a standalone application by adding all the wrapper files to the project and removing the juce\_audio\_plugin\_client module or to build a plugin I add this module again and remove all the standalone code.

Is there an easier solution by only switching targets? What would you propose here?

Feels like there has to be a better way to do this...

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [December 2, 2013, 11:00am UTC](https://forum.juce.com/t/setup-for-combined-standalone-and-plugin-build/11971/2 "2013-12-02T11:00:01Z")

</div>

They're completely different things - an executable and a DLL are built very differently, so need different projects. Not sure how it'd be possible to create a hybrid.

---

<div class="post-metadata">

**Author:** ![sebk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/sebk/32/6425_2.png) [@sebk](https://forum.juce.com/u/sebk)\
**Post date:** [December 2, 2013, 11:48am UTC](https://forum.juce.com/t/setup-for-combined-standalone-and-plugin-build/11971/3 "2013-12-02T11:48:42Z")

</div>

Oh I did not want to have a standalone and plugin in one file. I wanted to have one jucer project with two targets: one target builds a standalone app and the other builds a plugin. Or a similar configuration.

The problem is that I currently have to do many edits in IntroJucer to change the configuration from plugin to standalone.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [December 2, 2013, 1:04pm UTC](https://forum.juce.com/t/setup-for-combined-standalone-and-plugin-build/11971/4 "2013-12-02T13:04:01Z")

</div>

Yes, I know, and that's what I meant.. At the moment, an introjucer project can only produce one type of "thing" - to make it possible to build multiple different things from one project would involve major reorganisation of the whole project structure, which isn't something I'm planning on doing imminently.. Maybe one day!

---

<div class="post-metadata">

**Author:** ![rory](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rory/32/534_2.png) [@rory](https://forum.juce.com/u/rory)\
**Post date:** [December 2, 2013, 11:28pm UTC](https://forum.juce.com/t/setup-for-combined-standalone-and-plugin-build/11971/5 "2013-12-02T23:28:45Z")

</div>

Can't you just create two different Jucer projects that include more or less the same source files(minus wrapper stuff for plugin) and then just swap between them in your IDE?

---

<div class="post-metadata">

**Author:** ![sebk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/sebk/32/6425_2.png) [@sebk](https://forum.juce.com/u/sebk)\
**Post date:** [December 3, 2013, 2:41pm UTC](https://forum.juce.com/t/setup-for-combined-standalone-and-plugin-build/11971/6 "2013-12-03T14:41:35Z")

</div>

Rory: that's what I have already tried first. Unfortunateley the JuceLibrayFolder gets rewritten and AppConfig.h is configured everytime you run the IntroJucer to edit a project.

So editing the standalone.jucer file will always remove the juce\_audio\_plugin\_client module and also removes it from the AppConfig.h header. When I want to compile the plugin I have to reconfigure the plugin.jucer and add the module again. This then breaks the standalone configuration as the plugin\_client module is now included but not properly configure... and so on...

---

<div class="post-metadata">

**Author:** ![andrewj](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/andrewj/32/13428_2.png) [@andrewj](https://forum.juce.com/u/andrewj)\
**Post date:** [December 3, 2013, 10:47pm UTC](https://forum.juce.com/t/setup-for-combined-standalone-and-plugin-build/11971/7 "2013-12-03T22:47:19Z")

</div>

A bit kludgy, but how about setting up two separate projects in parallel, but having your common source code included in both? Kind of like you're working with a library.
