13
0

VST3 path customization

Allow to add custom VST3 search to default. the VST3_PATH environment
variable is use to pre-seed this path at first start.
This commit is contained in:
Robin Gareus 2020-10-16 22:25:56 +02:00
parent c6222caea6
commit 76c86ee96d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 16 additions and 2 deletions

View File

@ -237,6 +237,7 @@ CONFIG_VARIABLE (uint32_t, limit_n_automatables, "limit-n-automatables", 512)
/* custom user plugin paths */
CONFIG_VARIABLE (std::string, plugin_path_vst, "plugin-path-vst", "@default@")
CONFIG_VARIABLE (std::string, plugin_path_lxvst, "plugin-path-lxvst", "@default@")
CONFIG_VARIABLE (std::string, plugin_path_vst3, "plugin-path-vst3", "@default@")
/* denormal management */

View File

@ -288,6 +288,14 @@ PluginManager::PluginManager ()
if (Config->get_plugin_path_vst() == X_("@default@")) {
Config->set_plugin_path_vst(get_default_windows_vst_path());
}
if (Config->get_plugin_path_vst3() == X_("@default@")) {
/* This path is currently only added to the existing path */
if ((s = getenv ("VST3_PATH"))) {
Config->set_plugin_path_vst3 (s);
} else {
Config->set_plugin_path_vst3 ("");
}
}
if (_instance == 0) {
_instance = this;
@ -1632,9 +1640,14 @@ PluginManager::vst3_discover_from_path (string const& path, bool cache_only)
return -1;
}
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("VST3: search along: [%1]\n", path));
Searchpath paths (path);
if (!Config->get_plugin_path_vst3().empty ()) {
Searchpath custom (Config->get_plugin_path_vst3 ());
paths += custom;
}
DEBUG_TRACE (DEBUG::PluginManager, string_compose ("VST3: search along: [%1]\n", paths.to_string ()));
vector<string> plugin_objects;
find_paths_matching_filter (plugin_objects, paths, vst3_filter, 0, false, true, true);