comparison main/main.cpp @ 1307:e93ad534c1cb 3.0-integration

Support multiple plugin checker helpers, as for multiple piper servers
author Chris Cannam
date Tue, 01 Nov 2016 14:06:47 +0000
parents 7293bc5ee7f8
children b0138a0fbace 8ca62b402846
comparison
equal deleted inserted replaced
1306:6038fb7a8f09 1307:e93ad534c1cb
340 application.installTranslator(&svTranslator); 340 application.installTranslator(&svTranslator);
341 341
342 StoreStartupLocale(); 342 StoreStartupLocale();
343 343
344 // Make known-plugins query as early as possible after showing 344 // Make known-plugins query as early as possible after showing
345 // splash screen. This depends on our helper executable, which 345 // splash screen.
346 // must exist either in the same directory as this one or 346 PluginScan::getInstance()->scan();
347 // (preferably) a subdirectory called "checker".
348 QString myDir = application.applicationDirPath();
349 QString helperPath = myDir + "/checker/plugin-checker-helper";
350 QString helperSuffix = "";
351 #ifdef _WIN32
352 helperSuffix = ".exe";
353 #endif
354 if (!QFile(helperPath + helperSuffix).exists()) {
355 cerr << "NOTE: helper not found at " << (helperPath + helperSuffix)
356 << ", trying in my own directory" << endl;
357 helperPath = myDir + "/plugin-checker-helper";
358 }
359 if (!QFile(helperPath + helperSuffix).exists()) {
360 cerr << "NOTE: helper not found at " << (helperPath + helperSuffix)
361 << endl;
362 }
363 helperPath += helperSuffix;
364 PluginScan::getInstance()->scan(helperPath);
365 347
366 // Permit size_t and PropertyName to be used as args in queued signal calls 348 // Permit size_t and PropertyName to be used as args in queued signal calls
367 qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName"); 349 qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName");
368 350
369 MainWindow::SoundOptions options = MainWindow::WithEverything; 351 MainWindow::SoundOptions options = MainWindow::WithEverything;