aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2010-09-29 12:14:37 +0200
committerTobias Hunger <tobias.hunger@nokia.com>2010-10-06 10:37:52 +0200
commit3c62d2aae69d6236ce748fbee0f20d1ca5fb3447 (patch)
tree534bf04e2b74af3b481c84814b7a79107062f9bc
parentd1b3420f2b3855036fbe73de967c9c99a904dca9 (diff)
Symbian: Make sure the EPOCROOT ends with / on Linux
Task-number: QTCREATORBUG-2445 Reviewed-by: Pawel Polanski
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devices.cpp35
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devices.h2
2 files changed, 20 insertions, 17 deletions
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp
index 4d1445195a..ec646942b0 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devices.cpp
@@ -542,19 +542,12 @@ QList<ProjectExplorer::HeaderPath> S60ToolChainMixin::epocHeaderPaths() const
void S60ToolChainMixin::addEpocToEnvironment(Utils::Environment *env) const
{
- QString epocRootPath(m_device.epocRoot);
- if (!epocRootPath.endsWith(QChar('/')))
- epocRootPath.append(QChar('/'));
+ 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)
- env->prependOrSetPath(QDir::toNativeSeparators(epocRootPath + QLatin1String("epoc32/tools"))); // e.g. make.exe
- env->prependOrSetPath(QDir::toNativeSeparators(epocRootPath + QLatin1String("epoc32/gcc/bin"))); // e.g. gcc.exe
- env->prependOrSetPath(QDir::toNativeSeparators(epocRootPath + QLatin1String("perl/bin"))); // e.g. perl.exe (special SDK version)
-
- QString sbsHome(env->value(QLatin1String("SBS_HOME"))); // Do we use Raptor/SBSv2?
- if (!sbsHome.isEmpty())
- env->prependOrSetPath(sbsHome + QDir::separator() + QLatin1String("bin"));
- // No longer set EPOCDEVICE as it conflicts with packaging
- env->set(QLatin1String("EPOCROOT"), QDir::toNativeSeparators(S60Devices::cleanedRootPath(epocRootPath)));
+ addBaseToEnvironment(env);
}
static const char *gnuPocHeaderPathsC[] = {
@@ -595,11 +588,19 @@ QList<ProjectExplorer::HeaderPath> S60ToolChainMixin::gnuPocRvctHeaderPaths(int
void S60ToolChainMixin::addGnuPocToEnvironment(Utils::Environment *env) const
{
env->prependOrSetPath(QDir::toNativeSeparators(m_device.toolsRoot + QLatin1String("/epoc32/tools")));
- const QString epocRootVar = QLatin1String("EPOCROOT");
- // No trailing slash is required here, so, do not perform path cleaning.
- // The variable also should be set since it is currently used for autodetection.
- if (env->find(epocRootVar) == env->constEnd())
- env->set(epocRootVar, m_device.epocRoot);
+ addBaseToEnvironment(env);
+}
+
+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('/'));
+ env->set(QLatin1String("EPOCROOT"), QDir::toNativeSeparators(S60Devices::cleanedRootPath(epocRootPath)));
}
QDebug operator<<(QDebug db, const S60Devices::Device &d)
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devices.h b/src/plugins/qt4projectmanager/qt-s60/s60devices.h
index 69d2a1a5e1..8d60998754 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devices.h
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devices.h
@@ -184,6 +184,8 @@ public:
QStringList gnuPocRvctLibPaths(int armver, bool debug) const;
void addGnuPocToEnvironment(Utils::Environment *env) const;
+ void addBaseToEnvironment(Utils::Environment *env) const;
+
bool equals(const S60ToolChainMixin &rhs) const;
private: