Setup for combined standalone and plugin build


#1

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...


#2

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.


#3

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.


#4

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!


#5

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?


#6

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...


#7

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.