1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-20 06:45:08 +03:00

Fixes #2549 - Use PrefixPath to find the simulator libs

This commit is contained in:
Raphael Coeffic 2015-07-31 10:41:16 +02:00
parent 013c10e7fb
commit 71530f253d

View file

@ -2,6 +2,7 @@
#include <QDebug>
#include <QDir>
#include <QLibrary>
#include <QLibraryInfo>
#include <QMap>
#include <QMessageBox>
#include "version.h"
@ -46,9 +47,14 @@ void registerSimulators()
simulatorsFound = true;
}
#if !( (!defined __GNUC__) || (defined __CYGWIN__) )
#if defined(__APPLE__) || !( (!defined __GNUC__) || (defined __CYGWIN__) )
if (!simulatorsFound) {
#if defined(__APPLE__)
qDebug() << "QLibraryInfo::PrefixPath: " << QLibraryInfo::location(QLibraryInfo::PrefixPath);
dir = QLibraryInfo::location(QLibraryInfo::PrefixPath) + "/Resources";
#else
dir = SIMULATOR_LIB_SEARCH_PATH;
#endif
foreach(QString filename, dir.entryList(filters, QDir::Files)) {
registerSimulator(filename.prepend(dir.path() + "/"));
simulatorsFound = true;