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
This commit is contained in:
Tobias Hunger
2011-02-24 17:17:25 +01:00
parent 1cc74effde
commit 4792715f20
2 changed files with 13 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ S60ProjectChecker::reportIssues(const QString &proFile, const QtVersion *version
QFileInfo cppheader(epocRootDir + QLatin1String("/epoc32/include/stdapis/string.h")); QFileInfo cppheader(epocRootDir + QLatin1String("/epoc32/include/stdapis/string.h"));
#if defined (Q_OS_WIN) #if defined (Q_OS_WIN)
// Report an error if project- and epoc directory are on different drives: // 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, results.append(Task(Task::Error,
QCoreApplication::translate("ProjectExplorer::Internal::S60ProjectChecker", QCoreApplication::translate("ProjectExplorer::Internal::S60ProjectChecker",
"The Symbian SDK and the project sources must reside on the same drive."), "The Symbian SDK and the project sources must reside on the same drive."),

View File

@@ -1635,9 +1635,20 @@ void QtVersion::addToEnvironment(Utils::Environment &env) const
QString epocRootPath(systemRoot()); QString epocRootPath(systemRoot());
QDir epocDir(epocRootPath); QDir epocDir(epocRootPath);
// Clean up epoc root path for the environment:
if (!epocRootPath.endsWith(QLatin1Char('/'))) if (!epocRootPath.endsWith(QLatin1Char('/')))
epocRootPath.append(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 env.prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/tools"))); // e.g. make.exe
// Windows only: // Windows only: