Mercurial > hg > sonic-visualiser
diff main/main.cpp @ 1148:b3b5885e7c2c pluginscan
Check for plugin scan helper checker helper program in suitable directory, & tidy up warning messages somewhat
author | Chris Cannam |
---|---|
date | Fri, 15 Apr 2016 16:13:06 +0100 |
parents | a1ce253dc90e |
children | 2e83525cf638 |
line wrap: on
line diff
--- a/main/main.cpp Thu Apr 14 16:53:03 2016 +0100 +++ b/main/main.cpp Fri Apr 15 16:13:06 2016 +0100 @@ -334,8 +334,20 @@ StoreStartupLocale(); // Make known-plugins query as early as possible after showing - // splash screen - PluginScan::getInstance()->scan(); + // splash screen. This depends on our helper executable, which + // must exist either in the same directory as this one or + // (preferably) a subdirectory called "checker". + QString myDir = application.applicationDirPath(); + QString helperPath = myDir + "/checker/plugin-checker-helper"; + QString helperSuffix = ""; +#ifdef _WIN32 + helperSuffix = ".exe"; +#endif + if (!QFile(helperPath + helperSuffix).exists()) { + helperPath = myDir + "/plugin-checker-helper"; + } + helperPath += helperSuffix; + PluginScan::getInstance()->scan(helperPath); // Permit size_t and PropertyName to be used as args in queued signal calls qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName");