Near the top of AppConfig, the proJucer generates this:
#ifndef JUCE_STANDALONE_APPLICATION
#if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone)
#define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone
#else
#define JUCE_STANDALONE_APPLICATION 0
#endif
#endif
But it seems as though this will always set standalone to 0, since JucePlugin_Name is NOT defined until later in the AppConfig file.
Maybe I’m missing something?
fr810
May 31, 2017, 2:10pm
2
This is fixed on develop now. Please re-compile the Projucer and re-juce your project.
Thanks for reporting.
Is develop a branch?
I’m still on master, but it doesn’t seem to be fixed there with the latest pull.
That is … JUCE_STANDALONE_APPLICATION is still 0 even with JucePlugin_Build_Standalone and JucePlugin_Name set. This seems to be because you use:
#if defined(JucePlugin_Name)
before defining JucePlugin_Name.
t0m
June 12, 2017, 2:02pm
4
Yes, develop is a branch which gets merged into master every 6 months or so.
Aha. Ok, I’ll take a look there.
Also - as a more general question: I have certain UI elements that need to show up for the plugins, but not for the standalone, etc. It seems however, there is no preprocessor flag I can use to test if it is running as standalone or not (since they are lumped in together in the shared code, which has the standalone flag set as well as the plugin flags).
Is there some way to differentiate at runtime whether the plugin/app is running in standalone mode or not?
t0m
June 12, 2017, 4:09pm
6
Aha! Just what I was looking for … thanks.
Hmmm … I notice that after setting JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 the wrapperTpe goes to undefined.
I added:
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_Standalone;
To my JUCEApplication … but am I missing something else?
daniel
June 14, 2017, 11:44am
9
There is a static method for that:
JUCEApplication::isStandaloneApp()
Aha! Yes, that works well, thanks.