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 lines111213141516171 unmodified line1920212223242526272829303132333435361 unmodified line38394041424313 unmodified lines57585960616210 unmodified lines// Usage: PluginBridgeHelper --test "/path/to/plugin.vst3"// Exit code 0 = safe, exit code 1 = failed to load, crash = unsafeclass HelperApplication : public juce::JUCEApplication{public:const juce::String getApplicationName() override { return "PluginBridgeHelper"; }1 unmodified linevoid initialise(const juce::String& commandLine) override{auto args = juce::StringArray::fromTokens(commandLine, " ", "\"");juce::String pluginPath;for (int i = 0; i < args.size() - 1; ++i){if (args[i] == "--test")pluginPath = args[i + 1];}if (pluginPath.isEmpty()){DBG("HelperApplication: Usage: --test \"/path/to/plugin.vst3\"");setApplicationReturnValue(1);quit();return;1 unmodified lineDBG("HelperApplication: Testing plugin: " + pluginPath);HelperPluginHost host;bool success = host.testLoad(pluginPath);13 unmodified linesvoid shutdown() override {}void systemRequestedQuit() override { quit(); }};START_JUCE_APPLICATION(HelperApplication)10 unmodified lines111213141516171 unmodified line192021222324252627282930313233343536373839401 unmodified line42434445464748495051525354555613 unmodified lines70717273747576777810 unmodified lines// Usage: PluginBridgeHelper --test "/path/to/plugin.vst3"// Exit code 0 = safe, exit code 1 = failed to load, crash = unsafeclass HelperApplication : public juce::JUCEApplication, private juce::Timer{public:const juce::String getApplicationName() override { return "PluginBridgeHelper"; }1 unmodified linevoid initialise(const juce::String& commandLine) override{// Parse --test flag. Everything after --test is the path (may contain spaces).auto testFlagPos = commandLine.indexOf("--test");if (testFlagPos < 0){DBG("HelperApplication: Usage: --test \"/path/to/plugin.vst3\"");setApplicationReturnValue(1);quit();return;}// Extract path: skip "--test " (7 chars), trim quotespluginPath = commandLine.substring(testFlagPos + 7).trim().unquoted();if (pluginPath.isEmpty()){DBG("HelperApplication: No plugin path provided");setApplicationReturnValue(1);quit();return;1 unmodified lineDBG("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 linesvoid shutdown() override {}void systemRequestedQuit() override { quit(); }private:juce::String pluginPath;};START_JUCE_APPLICATION(HelperApplication)
Source/Helper/main.cpp+24-8