13
0

VST3: allow filename mismatch inside the bundle

This amends 5950df2b74. The VST3 SDK does not recursively search
directories that are bundles IFF the file inside the bundle's
architecture folder matches the bundle's name.

In case there's a file with a different name resides inside the
bundle it is treated as standalone, unbundled plugin.

Since Ardour, PBD::Searchpath always does a recursive search, the
bundled plugins need to be weeded after the fact.

This now follows the VST3 SDK by not just checking the arch name,
but also Contents and bundle.vst3 parent dirnames.
This commit is contained in:
Robin Gareus 2020-12-09 17:17:19 +01:00
parent fc4b2441dd
commit 4ef6ba0039
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -279,8 +279,16 @@ ARDOUR::module_path_vst3 (string const& path)
* ...\plugin.vst3
* ...\plugin.vst3\Contents\x64_64-win\plugin.vst3
*/
if (Glib::path_get_basename (Glib::path_get_dirname (path)) == vst3_bindir ()) {
/* ignore *.vst3 files if they're part of a bundle, use the bundle instead. */
std::string p1 = Glib::path_get_dirname (path);
std::string p2 = Glib::path_get_dirname (p1);
std::string p3 = Glib::path_get_dirname (p2);
if ( Glib::path_get_basename (p1) == vst3_bindir ()
&& Glib::path_get_basename (p2) == "Contents"
&& Glib::path_get_basename (p3) == Glib::path_get_basename (path)
) {
/* Ignore *.vst3 dll if it resides inside a bundle with the same name.
* Ardour will instead use the bundle.
*/
return "";
}
#endif