diff options
author | Robin Gareus <robin@gareus.org> | 2014-02-25 13:06:13 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-02-25 14:57:58 +0100 |
commit | 30de04a58ccab82d00ff87ebdd2cece6c0aa388b (patch) | |
tree | 63319e00caf9edd82df85ab4c088238e32a48983 /libs/ardour/vst_info_file.cc | |
parent | e1c82dfd857465cd5900f1bd626b3d651b7e7617 (diff) |
global static path to plugin scanner app.
Diffstat (limited to 'libs/ardour/vst_info_file.cc')
-rw-r--r-- | libs/ardour/vst_info_file.cc | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/libs/ardour/vst_info_file.cc b/libs/ardour/vst_info_file.cc index 9fd0b414b3..8bb3f4aa7a 100644 --- a/libs/ardour/vst_info_file.cc +++ b/libs/ardour/vst_info_file.cc @@ -44,7 +44,7 @@ #ifndef VST_SCANNER_APP #include "pbd/system_exec.h" -#include "pbd/file_utils.h" +#include "ardour/plugin_manager.h" // scanner_bin_path #endif #include "ardour/filesystem_paths.h" @@ -723,23 +723,15 @@ vstfx_get_info (const char* dllpath, int type, enum VSTScanMode mode) } #ifndef VST_SCANNER_APP + std::string scanner_bin_path = ARDOUR::PluginManager::scanner_bin_path; + if (mode == VST_SCAN_CACHE_ONLY) { /* never scan explicitly, use cache only */ return infos; } - else if (mode == VST_SCAN_USE_APP) { - /* use external scanner app -- TODO resolve path only once use static - * ARDOUR::PluginManager::scanner_bin_path - */ - std::string scanner_bin_path; //= "/home/rgareus/src/git/ardourCairoCanvas/build/libs/fst/ardour-vst-scanner"; // XXX - if (!PBD::find_file_in_search_path ( - PBD::Searchpath(Glib::build_filename(ARDOUR::ardour_dll_directory(), "fst")), - "ardour-vst-scanner", scanner_bin_path)) { - PBD::error << "VST scanner app not found.'" << endmsg; - // TODO: fall-through !? - return infos; - } - /* note: these are free()d in the dtor of PBD::SystemExec */ + else if (mode == VST_SCAN_USE_APP && scanner_bin_path != "") { + /* use external scanner app */ + char **argp= (char**) calloc(3,sizeof(char*)); argp[0] = strdup(scanner_bin_path.c_str()); argp[1] = strdup(dllpath); |