juce_setCurrentExecutable[...] missed in VST wrapper

Isn’t call to juce_setCurrentExecutableFileNameFromBundleId() missed in juce_VstWrapper?

In the AU wrapper it is called just before createPluginFilter() but it doesn’t appear in VST wrapper (I mean about Mac native code of course)

I remember that when I need to know File::getSpecialLocation(File::currentApplicationFile) in my AudioProcessor class constructor I had to call juce_setCurrentExecutableFileNameFromBundleId() myself earlier.

Maybe I missed something?


I think it was missed out because the VST code doesn’t have access to that bundle ID that it needs?

It has the access to the bundle ID because it is defined in JucePluginCharacteristics.h file. It can be done exactly like in the AU wrapper.

  1. adding extern declaration in juce_VstWrapper.cpp eg. in l.136

#if JUCE_MAC extern void juce_setCurrentExecutableFileNameFromBundleId (const String& bundleId) throw(); #endif

  1. calling the function in the same way in pluginEntryPoint() after initialiseJuce_GUI(); (l. 1465)

#if JUCE_MAC #ifdef JucePlugin_CFBundleIdentifier juce_setCurrentExecutableFileNameFromBundleId (JucePlugin_CFBundleIdentifier); #endif #endif

I checked it and it works.

I forgot that declaration and call should be nested in #if JUCE_MAC … #endif directives as it’s native Mac function. Corrected…