fix: Helper test-load — handle paths with spaces + allow message loop to run
Browse filesBug 1: paths with spaces got split by tokenizer. Fix: join all args after --test.
Bug 2: some plugins need the JUCE message loop to finish loading (VST3 validation).
Fix: use a Timer to delay quit, giving the plugin time to initialize.
10 unmodified lines11121314141516171 unmodified line19202122232425222324252728262728293031323334353633373839401 unmodified line42434445464748495051525354555613 unmodified lines70717273747576777810 unmodified lines// Usage: PluginBridgeHelper --test "/path/to/plugin.vst3"// Exit code 0 = safe, exit code 1 = failed to load, crash = unsafe
class HelperApplication : public juce::JUCEApplicationclass HelperApplication : public juce::JUCEApplication, private juce::Timer{public: const juce::String getApplicationName() override { return "PluginBridgeHelper"; }1 unmodified line
void initialise(const juce::String& commandLine) override { auto args = juce::StringArray::fromTokens(commandLine, " ", "\"");
juce::String pluginPath; for (int i = 0; i < args.size() - 1; ++i) // Parse --test flag. Everything after --test is the path (may contain spaces). auto testFlagPos = commandLine.indexOf("--test"); if (testFlagPos < 0) { if (args[i] == "--test") pluginPath = args[i + 1]; DBG("HelperApplication: Usage: --test \"/path/to/plugin.vst3\""); setApplicationReturnValue(1); quit(); return; }
// Extract path: skip "--test " (7 chars), trim quotes pluginPath = commandLine.substring(testFlagPos + 7).trim().unquoted();
if (pluginPath.isEmpty()) { DBG("HelperApplication: Usage: --test \"/path/to/plugin.vst3\""); DBG("HelperApplication: No plugin path provided"); setApplicationReturnValue(1); quit(); return;1 unmodified line
DBG("HelperApplication: Testing plugin: " + pluginPath);
// Start test on a timer so the message loop is running // (some plugins need it for VST3 validation) startTimer(100); }
void timerCallback() override { stopTimer();
HelperPluginHost host; bool success = host.testLoad(pluginPath);
13 unmodified lines
void shutdown() override {} void systemRequestedQuit() override { quit(); }
private: juce::String pluginPath;};
START_JUCE_APPLICATION(HelperApplication)Source/Helper/main.cpp+24-8