From 9b1f3a5f4cc8310a9c4210fc8977ce3966567c34 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 29 Jun 2021 12:11:05 +0200 Subject: [PATCH] Remove non-existent VST2 entry point Since there isn't any public documentation on VST2, I saw JUCE and a couple of other plugins and bridges use this, but they all redefined the symbol to`main`. --- src/wine-host/bridges/vst2.cpp | 4 ++-- tools/yabridgectl/README.md | 4 ++-- tools/yabridgectl/src/files.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wine-host/bridges/vst2.cpp b/src/wine-host/bridges/vst2.cpp index c2e46cb4..e457ab7a 100644 --- a/src/wine-host/bridges/vst2.cpp +++ b/src/wine-host/bridges/vst2.cpp @@ -144,9 +144,9 @@ Vst2Bridge::Vst2Bridge(MainContext& main_context, } // VST plugin entry point functions should be called `VSTPluginMain`, but - // there are some older deprecated names that legacy plugins may still use + // pre-VST2.4 `main` was also a valid name VstEntryPoint vst_entry_point = nullptr; - for (auto name : {"VSTPluginMain", "main_plugin", "main"}) { + for (auto name : {"VSTPluginMain", "main"}) { vst_entry_point = reinterpret_cast(reinterpret_cast( GetProcAddress(plugin_handle.get(), name))); diff --git a/tools/yabridgectl/README.md b/tools/yabridgectl/README.md index e31cae8a..747b92d0 100644 --- a/tools/yabridgectl/README.md +++ b/tools/yabridgectl/README.md @@ -101,7 +101,7 @@ yabridge_home=$HOME/.local/share/yabridge plugin_dir="$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins" find -L "$plugin_dir" -type f -iname '*.dll' -print0 | - xargs -0 -P$(nproc) -I{} bash -c "(winedump -j export '{}' | grep -qE 'VSTPluginMain|main|main_plugin') && printf '{}\0'" | + xargs -0 -P$(nproc) -I{} bash -c "(winedump -j export '{}' | grep -qE 'VSTPluginMain|main') && printf '{}\0'" | sed -z 's/\.dll$/.so/' | xargs -0 -n1 ln -sf "$yabridge_home/libyabridge.so" @@ -110,7 +110,7 @@ yabridge_home=$HOME/.local/share/yabridge plugin_dir="$HOME/.wine/drive_c/Program Files/Steinberg/VstPlugins" find -L "$plugin_dir" -type f -iname '*.dll' -print0 | - xargs -0 -P$(nproc) -I{} bash -c "(winedump -j export '{}' | grep -qE 'VSTPluginMain|main|main_plugin') && printf '{}\0'" | + xargs -0 -P$(nproc) -I{} bash -c "(winedump -j export '{}' | grep -qE 'VSTPluginMain|main') && printf '{}\0'" | sed -z 's/\.dll$/.so/' | xargs -0 -n1 cp "$yabridge_home/libyabridge.so" ``` diff --git a/tools/yabridgectl/src/files.rs b/tools/yabridgectl/src/files.rs index 3151332b..3c53e1ba 100644 --- a/tools/yabridgectl/src/files.rs +++ b/tools/yabridgectl/src/files.rs @@ -392,7 +392,7 @@ impl SearchIndex { pub fn search(self) -> Result { lazy_static! { static ref VST2_AUTOMATON: AhoCorasick = - AhoCorasick::new_auto_configured(&["VSTPluginMain", "main", "main_plugin"]); + AhoCorasick::new_auto_configured(&["VSTPluginMain", "main"]); static ref VST3_AUTOMATON: AhoCorasick = AhoCorasick::new_auto_configured(&["GetPluginFactory"]); static ref DLL32_AUTOMATON: AhoCorasick =