separate VST blacklist for 32/64bit

This commit is contained in:
Robin Gareus 2015-07-10 18:54:26 +02:00
parent ad9f76a8c5
commit a73a039a3a
3 changed files with 16 additions and 12 deletions

View file

@ -25,6 +25,16 @@
#include "ardour/vst_types.h" #include "ardour/vst_types.h"
#include <vector> #include <vector>
/* 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 #ifndef VST_SCANNER_APP
namespace ARDOUR { namespace ARDOUR {
#endif #endif

View file

@ -313,7 +313,7 @@ PluginManager::clear_vst_blacklist ()
#ifdef WINDOWS_VST_SUPPORT #ifdef WINDOWS_VST_SUPPORT
{ {
vector<string> fsi_files; vector<string> 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<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { for (vector<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) {
::g_unlink(i->c_str()); ::g_unlink(i->c_str());
} }
@ -323,7 +323,7 @@ PluginManager::clear_vst_blacklist ()
#ifdef LXVST_SUPPORT #ifdef LXVST_SUPPORT
{ {
vector<string> fsi_files; vector<string> 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<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { for (vector<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) {
::g_unlink(i->c_str()); ::g_unlink(i->c_str());
} }
@ -335,7 +335,7 @@ PluginManager::clear_vst_blacklist ()
string personal = get_personal_vst_blacklist_dir(); string personal = get_personal_vst_blacklist_dir();
vector<string> fsi_files; vector<string> 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<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) { for (vector<string>::iterator i = fsi_files.begin(); i != fsi_files.end (); ++i) {
::g_unlink(i->c_str()); ::g_unlink(i->c_str());
} }

View file

@ -55,12 +55,6 @@
#define MAX_STRING_LEN 256 #define MAX_STRING_LEN 256
#define PLUGIN_SCAN_TIMEOUT (Config->get_vst_scan_timeout()) // in deciseconds #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 #ifdef PLATFORM_WINDOWS
#define PFX_DOTFILE "" #define PFX_DOTFILE ""
#else #else
@ -118,21 +112,21 @@ vstfx_blacklist_path (const char* dllpath, int personal)
} }
stringstream s; 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 ()); return Glib::build_filename (dir, s.str ());
} }
static string static string
vstfx_infofile_path (const char* dllpath, int personal) 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 #ifndef VST_SCANNER_APP
static string static string
vstfx_errorfile_path (const char* dllpath, int personal) 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 #endif