mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-24 16:55:15 +03:00
Fixes #2549 - Use PrefixPath to find the simulator libs
This commit is contained in:
parent
013c10e7fb
commit
71530f253d
1 changed files with 7 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QLibrary>
|
#include <QLibrary>
|
||||||
|
#include <QLibraryInfo>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
@ -46,9 +47,14 @@ void registerSimulators()
|
||||||
simulatorsFound = true;
|
simulatorsFound = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !( (!defined __GNUC__) || (defined __CYGWIN__) )
|
#if defined(__APPLE__) || !( (!defined __GNUC__) || (defined __CYGWIN__) )
|
||||||
if (!simulatorsFound) {
|
if (!simulatorsFound) {
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
qDebug() << "QLibraryInfo::PrefixPath: " << QLibraryInfo::location(QLibraryInfo::PrefixPath);
|
||||||
|
dir = QLibraryInfo::location(QLibraryInfo::PrefixPath) + "/Resources";
|
||||||
|
#else
|
||||||
dir = SIMULATOR_LIB_SEARCH_PATH;
|
dir = SIMULATOR_LIB_SEARCH_PATH;
|
||||||
|
#endif
|
||||||
foreach(QString filename, dir.entryList(filters, QDir::Files)) {
|
foreach(QString filename, dir.entryList(filters, QDir::Files)) {
|
||||||
registerSimulator(filename.prepend(dir.path() + "/"));
|
registerSimulator(filename.prepend(dir.path() + "/"));
|
||||||
simulatorsFound = true;
|
simulatorsFound = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue