From 4792715f205036f94b61aba3c582c0cff0d722bf Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 24 Feb 2011 17:17:25 +0100 Subject: [PATCH] Symbian: Allow for EPOCROOT and project to be on different drives Allow for EPOCROOT and the project to be on different drives when using SBSv2. Task-number: QTCREATORBUG-3781 --- .../qt4projectmanager/qt-s60/s60projectchecker.cpp | 2 +- src/plugins/qt4projectmanager/qtversionmanager.cpp | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt-s60/s60projectchecker.cpp b/src/plugins/qt4projectmanager/qt-s60/s60projectchecker.cpp index 7381b9878b0..92de51109fe 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60projectchecker.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60projectchecker.cpp @@ -51,7 +51,7 @@ S60ProjectChecker::reportIssues(const QString &proFile, const QtVersion *version QFileInfo cppheader(epocRootDir + QLatin1String("/epoc32/include/stdapis/string.h")); #if defined (Q_OS_WIN) // Report an error if project- and epoc directory are on different drives: - if (!epocRootDir.startsWith(proFile.left(3), Qt::CaseInsensitive)) { + if (!epocRootDir.startsWith(proFile.left(3), Qt::CaseInsensitive) && !version->isBuildWithSymbianSbsV2()) { results.append(Task(Task::Error, QCoreApplication::translate("ProjectExplorer::Internal::S60ProjectChecker", "The Symbian SDK and the project sources must reside on the same drive."), diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 1e2d998a012..55558b2f6f6 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -1635,9 +1635,20 @@ void QtVersion::addToEnvironment(Utils::Environment &env) const QString epocRootPath(systemRoot()); QDir epocDir(epocRootPath); + // Clean up epoc root path for the environment: if (!epocRootPath.endsWith(QLatin1Char('/'))) epocRootPath.append(QLatin1Char('/')); - env.set(QLatin1String("EPOCROOT"), QDir::toNativeSeparators(S60Devices::cleanedRootPath(epocRootPath))); + if (!isBuildWithSymbianSbsV2()) { +#ifdef Q_OS_WIN + if (epocRootPath.count() > 2 + && epocRootPath.at(0).toLower() >= QLatin1Char('a') + && epocRootPath.at(0).toLower() <= QLatin1Char('z') + && epocRootPath.at(1) == QLatin1Char(':')) { + epocRootPath = epocRootPath.mid(2); + } +#endif + } + env.set(QLatin1String("EPOCROOT"), QDir::toNativeSeparators(epocRootPath)); env.prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/tools"))); // e.g. make.exe // Windows only: