Commit 954cabdd authored by BogDan Vatra's avatar BogDan Vatra
Browse files

QNX: Return the computed env vars.

They are needed to fix compilation of qnx apps from QtC. The mimicked
env vars are not enough to build qt apps for qnx660, so let's try to
return the right env vars, otherwise fallback to the old implementation.

Change-Id: I9cd0bbf18cea2ac51035f4cbc88c7e4063355830
Reviewed-by: default avatarTobias Hunger <>
parent 465722be
......@@ -155,13 +155,18 @@ QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironmentFromEnvFile(const QString
return items;
bool QnxUtils::isValidNdkPath(const QString &ndkPath)
return QFileInfo::exists(envFilePath(ndkPath));
QString QnxUtils::envFilePath(const QString &ndkPath, const QString &targetVersion)
QDir ndk(ndkPath);
QStringList entries;
if (Utils::HostOsInfo::isWindowsHost())
entries = ndk.entryList(QStringList(QLatin1String("*-env.bat")));
entries = ndk.entryList(QStringList(QLatin1String("*")));
if (!entries.isEmpty())
return ndk.absoluteFilePath(entries.first());
QString envFile;
if (Utils::HostOsInfo::isWindowsHost())
envFile = ndkPath + QLatin1String("/bbndk-env.bat");
......@@ -292,6 +297,10 @@ QString QnxUtils::qdeInstallProcess(const QString &ndkPath, const QString &targe
QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironment(const QString &sdkPath)
QList<Utils::EnvironmentItem> env = qnxEnvironmentFromEnvFile(envFilePath(sdkPath));
if (!env.isEmpty())
return env;
// Mimic what the SDP installer puts into the system environment
QList<Utils::EnvironmentItem> environmentItems;
......@@ -68,7 +68,6 @@ public:
static Qnx::QnxArchitecture cpudirToArch(const QString &cpuDir);
static QStringList searchPaths(Qnx::Internal::QnxQtVersion *qtVersion);
static QList<Utils::EnvironmentItem> qnxEnvironmentFromEnvFile(const QString &fileName);
static bool isValidNdkPath(const QString & ndkPath);
static QString envFilePath(const QString & ndkPath, const QString& targetVersion = QString());
static QString bbDataDirPath();
static QString bbqConfigPath();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment