AppConfig fail

Near the top of AppConfig, the proJucer generates this:

 #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone)
  #define  JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone

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?

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.

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?


AudioProcessor::WrapperType == wrapperType_Standalone

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?

There is a static method for that:

Aha! Yes, that works well, thanks.