Merge PR #236: Add some more plugin search paths to work better on non-debian systems

pull/240/head
Jenkins nymea 2019-12-01 00:05:00 +01:00
commit f1cd51c5e6
2 changed files with 8 additions and 2 deletions

View File

@ -107,7 +107,10 @@ QStringList DeviceManagerImplementation::pluginSearchDirs()
foreach (QString libraryPath, QCoreApplication::libraryPaths()) {
searchDirs << libraryPath.replace("qt5", "nymea");
}
searchDirs << QDir(QCoreApplication::applicationDirPath() + "/../lib/nymea/plugins").absolutePath();
foreach (QString libraryPath, QCoreApplication::libraryPaths()) {
searchDirs << libraryPath.replace("plugins", "nymea/plugins");
}
searchDirs << QDir(QCoreApplication::applicationDirPath() + "/../lib/nymea/plugins/").absolutePath();
searchDirs << QDir(QCoreApplication::applicationDirPath() + "/../plugins/").absolutePath();
searchDirs << QDir(QCoreApplication::applicationDirPath() + "/../../../plugins/").absolutePath();
searchDirs.removeDuplicates();

View File

@ -102,7 +102,10 @@ QStringList Platform::pluginSearchDirs() const
foreach (QString libraryPath, QCoreApplication::libraryPaths()) {
searchDirs << libraryPath.replace("qt5", "nymea").replace("plugins", "platform");
}
searchDirs << QCoreApplication::applicationDirPath() + "/../lib/nymea/platform";
foreach (QString libraryPath, QCoreApplication::libraryPaths()) {
searchDirs << libraryPath.replace("plugins", "nymea/platform");
}
searchDirs << QCoreApplication::applicationDirPath() + "/../lib/nymea/platform/";
searchDirs << QCoreApplication::applicationDirPath() + "/../platform/";
searchDirs << QCoreApplication::applicationDirPath() + "/../../../platform/";
return searchDirs;