From fbae8f398d3fc803622aac6420cd729e1302a0f0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 15 May 2023 00:43:34 +0200 Subject: [PATCH] Quick tweaks for OBS just to find discovery tools Signed-off-by: falkTX --- .../frontend/pluginlist/pluginlistdialog.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source/frontend/pluginlist/pluginlistdialog.cpp b/source/frontend/pluginlist/pluginlistdialog.cpp index 74790cd5c..de814511a 100644 --- a/source/frontend/pluginlist/pluginlistdialog.cpp +++ b/source/frontend/pluginlist/pluginlistdialog.cpp @@ -49,6 +49,12 @@ #include +#ifdef BUILDING_CARLA_OBS +extern "C" { +const char *get_carla_bin_path(void); +} +#endif + CARLA_BACKEND_USE_NAMESPACE // -------------------------------------------------------------------------------------------------------------------- @@ -1004,7 +1010,17 @@ struct PluginListDialog::Self { paths.init(); paths.loadFromEnv(); - CarlaPluginDiscoveryHandle handle = carla_plugin_discovery_start("/usr/lib/carla/carla-discovery-native", +#ifdef BUILDING_CARLA_OBS + QCarlaString binPath(get_carla_bin_path()); + binPath += CARLA_OS_SEP_STR "carla-discovery-native"; +#ifdef CARLA_OS_WIN + binPath += ".exe"; +#endif +#else + QCarlaString binPath("/usr/lib/carla/carla-discovery-native"); +#endif + + CarlaPluginDiscoveryHandle handle = carla_plugin_discovery_start(binPath.toUtf8().constData(), PLUGIN_VST3, paths.vst3.toUtf8().constData(), _discoveryCallback,