diff options
author | Mehdi Fekari <mfekari@rim.com> | 2013-08-22 17:00:58 +0200 |
---|---|---|
committer | Mehdi Fekari <mfekari@blackberry.com> | 2013-08-27 14:22:17 +0200 |
commit | 01ebbe19bae9af7fa352a60461e12d48bf739720 (patch) | |
tree | b22d12a52db538b8300486b4b2a43b2fb39226ff /src/plugins/qnx/qnxutils.cpp | |
parent | afcb9b2c416464188e3bd922b4407801f3413605 (diff) | |
download | qt-creator-01ebbe19bae9af7fa352a60461e12d48bf739720.tar.gz |
Qnx: Support multiple BlackBerry target configurations
The new bbndk 10.2 is based on multiple targets (based on multiple bbnk-env scripts).
There is no default/common bbnk-env.sh file anymore, and an NDK directory may contain
various bbndk-env scripts (i.e targets).
This patch makes the BlackBerryConfiguration based on the bbnk-env script path
rather than on the NDK path. This will enable having multiple configurations
per targets in the same NDK directory.
N.B: NDKs 10.1 with one default bbnk-env file are still supported.
Change-Id: Icec57c6e722caec7e5ff81e3a9ce4d2cf11f249a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Diffstat (limited to 'src/plugins/qnx/qnxutils.cpp')
-rw-r--r-- | src/plugins/qnx/qnxutils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/qnx/qnxutils.cpp b/src/plugins/qnx/qnxutils.cpp index ad4ee89361..dadacceb0c 100644 --- a/src/plugins/qnx/qnxutils.cpp +++ b/src/plugins/qnx/qnxutils.cpp @@ -187,7 +187,7 @@ bool QnxUtils::isValidNdkPath(const QString &ndkPath) return (QFileInfo(envFilePath(ndkPath)).exists()); } -QString QnxUtils::envFilePath(const QString &ndkPath) +QString QnxUtils::envFilePath(const QString &ndkPath, const QString &targetVersion) { QString envFile; if (Utils::HostOsInfo::isWindowsHost()) @@ -196,7 +196,7 @@ QString QnxUtils::envFilePath(const QString &ndkPath) envFile = ndkPath + QLatin1String("/bbndk-env.sh"); if (!QFileInfo(envFile).exists()) { - QString version = ndkVersion(ndkPath); + QString version = targetVersion.isEmpty() ? defaultTargetVersion(ndkPath) : targetVersion; version = version.replace(QLatin1Char('.'), QLatin1Char('_')); if (Utils::HostOsInfo::isWindowsHost()) envFile = ndkPath + QLatin1String("/bbndk-env_") + version + QLatin1String(".bat"); @@ -262,7 +262,7 @@ QString QnxUtils::qConfigPath() } } -QString QnxUtils::ndkVersion(const QString &ndkPath) +QString QnxUtils::defaultTargetVersion(const QString &ndkPath) { foreach (const NdkInstallInformation &ndkInfo, installedNdks()) { if (!ndkInfo.path.compare(ndkPath, Utils::HostOsInfo::fileNameCaseSensitivity())) |