Download Source/Helper/main.cpp from RAM2118/pluginbridge: direct link, hf CLI and curl.
- Browser
- Download file 1.85 kB
-
https://huggingface.co/RAM2118/pluginbridge/resolve/ddb115bf829f00a019effbe2c307028edd9a0d27/Source/Helper/main.cpp
- Command line
-
hf download hf://RAM2118/pluginbridge@ddb115bf829f00a019effbe2c307028edd9a0d27/Source/Helper/main.cpp
-
curl -L -o main.cpp https://huggingface.co/RAM2118/pluginbridge/resolve/ddb115bf829f00a019effbe2c307028edd9a0d27/Source/Helper/main.cpp
1.85 kB
| // PluginBridgeHelper — TEST MODE ONLY | |
| // Spawned by PluginBridge to test if a plugin can load safely. | |
| // If the plugin crashes, only this process dies. Ableton survives. | |
| // | |
| // Usage: PluginBridgeHelper --test "/path/to/plugin.vst3" | |
| // Exit code 0 = safe, exit code 1 = failed to load, crash = unsafe | |
| class HelperApplication : public juce::JUCEApplication | |
| { | |
| public: | |
| const juce::String getApplicationName() override { return "PluginBridgeHelper"; } | |
| const juce::String getApplicationVersion() override { return "0.3.0"; } | |
| 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) | |
| { | |
| if (args[i] == "--test") | |
| pluginPath = args[i + 1]; | |
| } | |
| if (pluginPath.isEmpty()) | |
| { | |
| DBG("HelperApplication: Usage: --test \"/path/to/plugin.vst3\""); | |
| setApplicationReturnValue(1); | |
| quit(); | |
| return; | |
| } | |
| DBG("HelperApplication: Testing plugin: " + pluginPath); | |
| HelperPluginHost host; | |
| bool success = host.testLoad(pluginPath); | |
| if (success) | |
| { | |
| DBG("HelperApplication: Plugin loaded successfully — SAFE"); | |
| setApplicationReturnValue(0); | |
| } | |
| else | |
| { | |
| DBG("HelperApplication: Plugin failed to load — UNSAFE"); | |
| setApplicationReturnValue(1); | |
| } | |
| quit(); | |
| } | |
| void shutdown() override {} | |
| void systemRequestedQuit() override { quit(); } | |
| }; | |
| START_JUCE_APPLICATION(HelperApplication) | |