forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -542,10 +542,23 @@ QList<ProjectExplorer::HeaderPath> S60ToolChainMixin::epocHeaderPaths() const
|
|||||||
|
|
||||||
void S60ToolChainMixin::addEpocToEnvironment(Utils::Environment *env) 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);
|
QDir epocDir(m_device.epocRoot);
|
||||||
|
|
||||||
env->prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/tools"))); // e.g. make.exe
|
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);
|
addBaseToEnvironment(env);
|
||||||
}
|
}
|
||||||
@@ -593,13 +606,9 @@ void S60ToolChainMixin::addGnuPocToEnvironment(Utils::Environment *env) const
|
|||||||
|
|
||||||
void S60ToolChainMixin::addBaseToEnvironment(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);
|
QString epocRootPath(m_device.epocRoot);
|
||||||
if (!epocRootPath.endsWith(QChar('/')))
|
if (!epocRootPath.endsWith(QLatin1Char('/')))
|
||||||
epocRootPath.append(QChar('/'));
|
epocRootPath.append(QLatin1Char('/'));
|
||||||
env->set(QLatin1String("EPOCROOT"), QDir::toNativeSeparators(S60Devices::cleanedRootPath(epocRootPath)));
|
env->set(QLatin1String("EPOCROOT"), QDir::toNativeSeparators(S60Devices::cleanedRootPath(epocRootPath)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1594,8 +1594,13 @@ void QtVersion::setMsvcVersion(const QString &version)
|
|||||||
void QtVersion::addToEnvironment(Utils::Environment &env) const
|
void QtVersion::addToEnvironment(Utils::Environment &env) const
|
||||||
{
|
{
|
||||||
env.set("QTDIR", QDir::toNativeSeparators(versionInfo().value("QT_INSTALL_DATA")));
|
env.set("QTDIR", QDir::toNativeSeparators(versionInfo().value("QT_INSTALL_DATA")));
|
||||||
if (isBuildWithSymbianSbsV2() && !m_sbsV2Directory.isEmpty())
|
if (isBuildWithSymbianSbsV2()) {
|
||||||
|
QString sbsHome(env.value(QLatin1String("SBS_HOME")));
|
||||||
|
if (!m_sbsV2Directory.isEmpty())
|
||||||
env.prependOrSetPath(m_sbsV2Directory);
|
env.prependOrSetPath(m_sbsV2Directory);
|
||||||
|
else if (!sbsHome.isEmpty())
|
||||||
|
env.prependOrSetPath(sbsHome + QLatin1Char('/') + QLatin1String("bin"));
|
||||||
|
}
|
||||||
env.prependOrSetPath(versionInfo().value("QT_INSTALL_BINS"));
|
env.prependOrSetPath(versionInfo().value("QT_INSTALL_BINS"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user