changeset 1149:3ba5bee2ace0 3.0-integration

Merge from branch pluginscan
author Chris Cannam
date Fri, 15 Apr 2016 16:26:15 +0100 (2016-04-15)
parents 129910eddd00 (current diff) b3b5885e7c2c (diff)
children 5e6e1e074080 e0aa911e1a8a
files .hgsubstate
diffstat 7 files changed, 37 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsub	Fri Mar 18 14:26:06 2016 +0000
+++ b/.hgsub	Fri Apr 15 16:26:15 2016 +0100
@@ -8,3 +8,4 @@
 bqaudioio = https://bitbucket.org/breakfastquay/bqaudioio
 sv-dependency-builds = https://code.soundsoftware.ac.uk/hg/sv-dependency-builds
 icons/scalable = https://code.soundsoftware.ac.uk/hg/sv-iconset
+checker = https://code.soundsoftware.ac.uk/hg/vamp-plugin-load-checker
--- a/.hgsubstate	Fri Mar 18 14:26:06 2016 +0000
+++ b/.hgsubstate	Fri Apr 15 16:26:15 2016 +0100
@@ -1,10 +1,11 @@
 442bdbbb17f3910898b892cc798794e32562a3f1 bqaudioio
 28f51eb8bf2dd985b0c1a6d704fb65e14c2f0f25 bqresample
 a518ddd9dd68917393887d28dfee6221bc37fb66 bqvec
+af46a17798be1c38cb6e7dcb88ad34508a77fd54 checker
 d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay
 68ae618c6b0e442d08a71d39217784a08f2a8de3 icons/scalable
 1e4f338ae482429a7ab9bdd0825242042354152f sv-dependency-builds
 f7ec9e410108fe08580cf61e328b73fe8c7e4e1d svapp
-4018fc0189bc46bf36ce1961ae558377afff2c6e svcore
+a1f410f895d3edf8008067a57d86f92b5da278de svcore
 3691af49291c57a31883fd27190586737935b12b svgui
-55de53d7c777008997721bb43051a67c3b3772d2 vamp-plugin-sdk
+9a2998401bbe0a7b9e3233eeca5004542bc0014d vamp-plugin-sdk
--- a/main/MainWindow.cpp	Fri Mar 18 14:26:06 2016 +0000
+++ b/main/MainWindow.cpp	Fri Apr 15 16:26:15 2016 +0100
@@ -69,6 +69,7 @@
 #include "data/fileio/FileSource.h"
 #include "data/midi/MIDIInput.h"
 #include "base/RecentFiles.h"
+#include "plugin/PluginScan.h"
 #include "transform/TransformFactory.h"
 #include "transform/ModelTransformerFactory.h"
 #include "base/PlayParameterRepository.h"
@@ -330,8 +331,10 @@
         m_versionTester = 0;
     }
 
-    QString warning = TransformFactory::getInstance()->getPluginPopulationWarning();
-    if (warning != "") pluginPopulationWarning(warning);
+    QString warning = PluginScan::getInstance()->getStartupFailureReport();
+    if (warning != "") {
+        QTimer::singleShot(500, this, SLOT(pluginPopulationWarning()));
+    }
 }
 
 MainWindow::~MainWindow()
@@ -4141,8 +4144,9 @@
 }
 
 void
-MainWindow::pluginPopulationWarning(QString warning)
+MainWindow::pluginPopulationWarning()
 {
+    QString warning = PluginScan::getInstance()->getStartupFailureReport();
     QMessageBox::warning(this, tr("Problems loading plugins"), warning);
 }
 
--- a/main/MainWindow.h	Fri Mar 18 14:26:06 2016 +0000
+++ b/main/MainWindow.h	Fri Apr 15 16:26:15 2016 +0100
@@ -147,7 +147,7 @@
     virtual void midiEventsAvailable();
     virtual void playStatusChanged(bool);
 
-    virtual void pluginPopulationWarning(QString);
+    virtual void pluginPopulationWarning();
 
     virtual void saveSessionAsTemplate();
     virtual void manageSavedTemplates();
--- 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");
 
--- a/sonic-visualiser.pro	Fri Mar 18 14:26:06 2016 +0000
+++ b/sonic-visualiser.pro	Fri Apr 15 16:26:15 2016 +0100
@@ -1,5 +1,5 @@
 TEMPLATE = subdirs
-SUBDIRS = sub_bq sub_dataquay svcore svgui svapp sub_sv 
+SUBDIRS = sub_bq sub_dataquay svcore svgui svapp checker sub_sv 
 
 !win* {
     # We should build and run the tests on any platform,
--- a/sv.pro	Fri Mar 18 14:26:06 2016 +0000
+++ b/sv.pro	Fri Apr 15 16:26:15 2016 +0100
@@ -58,15 +58,15 @@
 
 contains(DEFINES, BUILD_STATIC):LIBS -= -ljack
 
-MY_LIBS = -Lsvapp -Lsvgui -Lsvcore -Ldataquay -L. \
-          -lsvapp -lsvgui -lsvcore -ldataquay -lbq
+MY_LIBS = -Lsvapp -Lsvgui -Lsvcore -Lchecker -Ldataquay -L. \
+          -lsvapp -lsvgui -lsvcore -lchecker -ldataquay -lbq
 
 linux* {
 MY_LIBS = -Wl,-Bstatic $$MY_LIBS -Wl,-Bdynamic
 }
 
 win* {
-MY_LIBS = -Lsvapp/release -Lsvgui/release -Lsvcore/release -Ldataquay/release $$MY_LIBS
+MY_LIBS = -Lsvapp/release -Lsvgui/release -Lsvcore/release -Lchecker/release -Ldataquay/release $$MY_LIBS
 }
 
 LIBS = $$MY_LIBS $$LIBS
@@ -75,13 +75,15 @@
 PRE_TARGETDEPS += svapp/release/libsvapp.a \
                   svgui/release/libsvgui.a \
                   svcore/release/libsvcore.a \
-                  dataquay/release/libdataquay.a
+                  dataquay/release/libdataquay.a \
+                  checker/release/libchecker.a
 }
 !win* {
 PRE_TARGETDEPS += svapp/libsvapp.a \
                   svgui/libsvgui.a \
                   svcore/libsvcore.a \
-                  dataquay/libdataquay.a
+                  dataquay/libdataquay.a \
+                  checker/libchecker.a
 }
 
 RESOURCES += sonic-visualiser.qrc