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:
parent
013c10e7fb
commit
71530f253d
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue