From a73a039a3abac96837a2ca09d2b044702c27c98e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 10 Jul 2015 18:54:26 +0200 Subject: separate VST blacklist for 32/64bit --- libs/ardour/ardour/vst_info_file.h | 10 ++++++++++ libs/ardour/plugin_manager.cc | 6 +++--- libs/ardour/vst_info_file.cc | 12 +++--------- 3 files changed, 16 insertions(+), 12 deletions(-) (limited to 'libs') diff --git a/libs/ardour/ardour/vst_info_file.h b/libs/ardour/ardour/vst_info_file.h index 5e613801a6..27e12533be 100644 --- a/libs/ardour/ardour/vst_info_file.h +++ b/libs/ardour/ardour/vst_info_file.h @@ -25,6 +25,16 @@ #include "ardour/vst_types.h" #include +/* Cache File extensions */ +# if ( defined(__x86_64__) || defined(_M_X64) ) +# define VST_EXT_BLACKLIST ".fsb64" +#else +# define VST_EXT_BLACKLIST ".fsb" +#endif + +#define VST_EXT_ERRORFILE ".err" +#define VST_EXT_INFOFILE ".fsi" + #ifndef VST_SCANNER_APP namespace ARDOUR { #endif diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 37eb61ef3b..2f880c850e 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -313,7 +313,7 @@ PluginManager::clear_vst_blacklist () #ifdef WINDOWS_VST_SUPPORT { vector fsi_files; - find_files_matching_regex (fsi_files, Config->get_plugin_path_vst(), "\\.fsb$", true); + find_files_matching_regex (fsi_files, Config->get_plugin_path_vst(), "\\." VST_EXT_BLACKLIST "$", true); for (vector::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { ::g_unlink(i->c_str()); } @@ -323,7 +323,7 @@ PluginManager::clear_vst_blacklist () #ifdef LXVST_SUPPORT { vector fsi_files; - find_files_matching_regex (fsi_files, Config->get_plugin_path_lxvst(), "\\.fsb$", true); + find_files_matching_regex (fsi_files, Config->get_plugin_path_lxvst(), "\\." VST_EXT_BLACKLIST "$", true); for (vector::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { ::g_unlink(i->c_str()); } @@ -335,7 +335,7 @@ PluginManager::clear_vst_blacklist () string personal = get_personal_vst_blacklist_dir(); vector fsi_files; - find_files_matching_regex (fsi_files, personal, "\\.fsb$", /* flat user cache */ false); + find_files_matching_regex (fsi_files, personal, "\\." VST_EXT_BLACKLIST "$", /* flat user cache */ false); for (vector::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { ::g_unlink(i->c_str()); } diff --git a/libs/ardour/vst_info_file.cc b/libs/ardour/vst_info_file.cc index 3b56876494..b45a285f9b 100644 --- a/libs/ardour/vst_info_file.cc +++ b/libs/ardour/vst_info_file.cc @@ -55,12 +55,6 @@ #define MAX_STRING_LEN 256 #define PLUGIN_SCAN_TIMEOUT (Config->get_vst_scan_timeout()) // in deciseconds - -/* CACHE FILE PATHS */ -#define EXT_BLACKLIST ".fsb" -#define EXT_ERRORFILE ".err" -#define EXT_INFOFILE ".fsi" - #ifdef PLATFORM_WINDOWS #define PFX_DOTFILE "" #else @@ -118,21 +112,21 @@ vstfx_blacklist_path (const char* dllpath, int personal) } stringstream s; - s << PFX_DOTFILE << Glib::path_get_basename (dllpath) << EXT_BLACKLIST; + s << PFX_DOTFILE << Glib::path_get_basename (dllpath) << VST_EXT_BLACKLIST; return Glib::build_filename (dir, s.str ()); } static string vstfx_infofile_path (const char* dllpath, int personal) { - return vstfx_cache_file(dllpath, personal, EXT_INFOFILE); + return vstfx_cache_file(dllpath, personal, VST_EXT_INFOFILE); } #ifndef VST_SCANNER_APP static string vstfx_errorfile_path (const char* dllpath, int personal) { - return vstfx_cache_file(dllpath, personal, EXT_ERRORFILE); + return vstfx_cache_file(dllpath, personal, VST_EXT_ERRORFILE); } #endif -- cgit v1.2.3