Commit 2c17c756 authored by Aaron McCarthy's avatar Aaron McCarthy

Windows CE SDK not always found.

Creator fails to set up the build environment with MSVC 2008 and
Windows Mobile SDK 6.  This is caused by two problems:

1. The toolchain was being searched for in
   C:\Program Files\Microsoft Visual Studio 9.0\VC\VC
   The correct path is
   C:\Program Files\Microsoft Visual Studio 9.0\VC

2. Include statements in mkspecs were not being processed.  All of the
   important variables are set in files included from the
   wincewm60{standard,professional}-msvc2008 mkspecs.
parent 28231f8f
......@@ -56,11 +56,8 @@ CeSdkHandler::CeSdkHandler()
{
}
QString CeSdkHandler::platformName(const QString &qtpath)
static void readMkSpec(const QString &qtpath, QString *ceSdk, QString *ceArch)
{
QString platformName;
QString CE_SDK;
QString CE_ARCH;
QFile f(qtpath);
if (f.exists() && f.open(QIODevice::ReadOnly)) {
while (!f.atEnd()) {
......@@ -68,20 +65,41 @@ QString CeSdkHandler::platformName(const QString &qtpath)
if (line.startsWith("CE_SDK")) {
int index = line.indexOf('=');
if (index >= 0) {
CE_SDK = line.mid(index + 1).trimmed();
*ceSdk = line.mid(index + 1).trimmed();
}
} else if (line.startsWith("CE_ARCH")) {
int index = line.indexOf('=');
if (index >= 0) {
CE_ARCH = line.mid(index + 1).trimmed();
*ceArch = line.mid(index + 1).trimmed();
}
} else if (line.startsWith("include(")) {
int startIndex = line.indexOf('(');
int endIndex = line.indexOf(')');
if (startIndex >= 0 && endIndex >= 0) {
QString path = line.mid(startIndex + 1, endIndex - startIndex - 1).trimmed();
int index = qtpath.lastIndexOf('/');
if (index >= 0)
readMkSpec(qtpath.left(index + 1) + path, ceSdk, ceArch);
else
readMkSpec(path, ceSdk, ceArch);
}
}
if (!CE_SDK.isEmpty() && !CE_ARCH.isEmpty()) {
platformName = CE_SDK + " (" + CE_ARCH + ")";
break;
}
}
}
}
QString CeSdkHandler::platformName(const QString &qtpath)
{
QString platformName;
QString CE_SDK;
QString CE_ARCH;
readMkSpec(qtpath, &CE_SDK, &CE_ARCH);
if (!CE_SDK.isEmpty() && !CE_ARCH.isEmpty())
platformName = CE_SDK + " (" + CE_ARCH + ")";
return platformName;
}
......@@ -91,8 +109,7 @@ bool CeSdkHandler::parse(const QString &vsdir)
// and scan through all installed sdks...
m_list.clear();
VCInstallDir = vsdir + "/VC/";
VSInstallDir = vsdir;
VCInstallDir = vsdir;
QDir vStudioDir(VCInstallDir);
if (!vStudioDir.cd("vcpackages"))
......
......@@ -518,10 +518,10 @@ void WinCEToolChain::addToEnvironment(ProjectExplorer::Environment &env)
path += "/";
// qDebug()<<"MSVC path"<<msvcPath;
// qDebug()<<"MSVC path"<<path;
// qDebug()<<"looking for platform name in"<< path() + "/mkspecs/" + mkspec() +"/qmake.conf";
// Find Platform name
// qDebug()<<"Platform Name"<<platformName;
// qDebug()<<"Platform Name"<<m_platform;
CeSdkHandler cesdkhandler;
cesdkhandler.parse(path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment