Add some more plugin search paths to work better on non-debian systems

This commit is contained in:
Michael Zanetti 2019-11-26 19:10:06 +01:00
parent 4b890429fa
commit 5030ab8ac5
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;