diff options
author | Tobias Hunger <tobias.hunger@nokia.com> | 2010-11-17 10:37:11 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2010-11-17 11:28:05 +0100 |
commit | 9f824f416594aba1548c6e5e245cbfc97591325b (patch) | |
tree | e0d7d00149ad2c7a818acdcd60fd51d4fe8b7f68 /src | |
parent | 1800e98ef1e53f4d4a113e0c530a7425ef031789 (diff) | |
download | qt-creator-9f824f416594aba1548c6e5e245cbfc97591325b.tar.gz |
Symbian: Fix pathes
Fix pathes for Nokia Qt SDK:
* Set SBS path in one location only
* Fix up perl path
* Set path to CMD on windows. Both ABLD and SBSv2 actually need this.
* Set GCC path only if the directory actually exists
These fixes allow for building both ABLD and SBSv2 based projects in
a clean environment.
Reviewed-by: Tim Jenssen
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/qt4projectmanager/qt-s60/s60devices.cpp | 25 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/qtversionmanager.cpp | 9 |
2 files changed, 24 insertions, 10 deletions
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp index ec646942b0..771888a33d 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp @@ -542,10 +542,23 @@ QList<ProjectExplorer::HeaderPath> S60ToolChainMixin::epocHeaderPaths() const void S60ToolChainMixin::addEpocToEnvironment(Utils::Environment *env) const { +#if defined(Q_OS_WIN) + QString winDir = QLatin1String(qgetenv("WINDIR")); + if (!winDir.isEmpty()) + env->prependOrSetPath(QDir(winDir).filePath(QLatin1String("system32"))); +#endif + QDir epocDir(m_device.epocRoot); + env->prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/tools"))); // e.g. make.exe - env->prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/gcc/bin"))); // e.g. gcc.exe - env->prependOrSetPath(epocDir.filePath(QLatin1String("perl/bin"))); // e.g. perl.exe (special SDK version) + + if (epocDir.exists(QLatin1String("epoc32/gcc/bin"))) + env->prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/gcc/bin"))); // e.g. cpp.exe, *NOT* gcc.exe + // Find perl in the special Symbian flavour: + if (epocDir.exists(QLatin1String("../../tools/perl/bin"))) + env->prependOrSetPath(epocDir.filePath(QLatin1String("../../tools/perl/bin"))); + else + env->prependOrSetPath(epocDir.filePath(QLatin1String("perl/bin"))); addBaseToEnvironment(env); } @@ -593,13 +606,9 @@ void S60ToolChainMixin::addGnuPocToEnvironment(Utils::Environment *env) const void S60ToolChainMixin::addBaseToEnvironment(Utils::Environment *env) const { - QString sbsHome(env->value(QLatin1String("SBS_HOME"))); // Do we use Raptor/SBSv2? - if (!sbsHome.isEmpty()) - env->prependOrSetPath(sbsHome + QDir::separator() + QLatin1String("bin")); - QString epocRootPath(m_device.epocRoot); - if (!epocRootPath.endsWith(QChar('/'))) - epocRootPath.append(QChar('/')); + if (!epocRootPath.endsWith(QLatin1Char('/'))) + epocRootPath.append(QLatin1Char('/')); env->set(QLatin1String("EPOCROOT"), QDir::toNativeSeparators(S60Devices::cleanedRootPath(epocRootPath))); } diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 5189d87feb..031eceee84 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -1594,8 +1594,13 @@ void QtVersion::setMsvcVersion(const QString &version) void QtVersion::addToEnvironment(Utils::Environment &env) const { env.set("QTDIR", QDir::toNativeSeparators(versionInfo().value("QT_INSTALL_DATA"))); - if (isBuildWithSymbianSbsV2() && !m_sbsV2Directory.isEmpty()) - env.prependOrSetPath(m_sbsV2Directory); + if (isBuildWithSymbianSbsV2()) { + QString sbsHome(env.value(QLatin1String("SBS_HOME"))); + if (!m_sbsV2Directory.isEmpty()) + env.prependOrSetPath(m_sbsV2Directory); + else if (!sbsHome.isEmpty()) + env.prependOrSetPath(sbsHome + QLatin1Char('/') + QLatin1String("bin")); + } env.prependOrSetPath(versionInfo().value("QT_INSTALL_BINS")); } |