Mercurial > hg > sonic-visualiser
diff main/main.cpp @ 1149:3ba5bee2ace0 3.0-integration
Merge from branch pluginscan
author | Chris Cannam |
---|---|
date | Fri, 15 Apr 2016 16:26:15 +0100 |
parents | b3b5885e7c2c |
children | 2e83525cf638 |
line wrap: on
line diff
--- a/main/main.cpp Fri Mar 18 14:26:06 2016 +0000 +++ b/main/main.cpp Fri Apr 15 16:26:15 2016 +0100 @@ -26,6 +26,7 @@ #include "widgets/InteractiveFileFinder.h" #include "svapp/framework/TransformUserConfigurator.h" #include "transform/TransformFactory.h" +#include "svcore/plugin/PluginScan.h" #include <QMetaType> #include <QApplication> @@ -332,6 +333,22 @@ StoreStartupLocale(); + // Make known-plugins query as early as possible after showing + // 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");