diff options
author | Daniel Molkentin <daniel.molkentin@nokia.com> | 2009-06-12 15:11:28 +0200 |
---|---|---|
committer | Daniel Molkentin <daniel.molkentin@nokia.com> | 2009-06-12 15:11:42 +0200 |
commit | e8c4169866089dcf32488e34a3b3aa0be2472f65 (patch) | |
tree | 51bb55abc154e6aba0385dfacc233c8c01fb4f9c | |
parent | 7f0c0a513349ceb874f325c96a81e278d0772392 (diff) | |
download | qt-creator-e8c4169866089dcf32488e34a3b3aa0be2472f65.tar.gz |
cdb: Be a bit more robust when detecting debuggin tools for win, 64 bit.
It seems like some versions install with the postfix " 64-bit." The
change also makes it easier to add new postfixes.
Reviewed-by: owolff
-rw-r--r-- | src/plugins/debugger/cdb/cdb.pri | 4 | ||||
-rw-r--r-- | src/plugins/debugger/cdb/cdboptions.cpp | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/plugins/debugger/cdb/cdb.pri b/src/plugins/debugger/cdb/cdb.pri index f82495a64e..009b97bb82 100644 --- a/src/plugins/debugger/cdb/cdb.pri +++ b/src/plugins/debugger/cdb/cdb.pri @@ -14,6 +14,10 @@ CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows/sdk" CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows (x64)/sdk" } +!exists ($$CDB_PATH) { + CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows 64-bit/sdk" +} + exists ($$CDB_PATH) { message("Experimental: Adding support for $$CDB_PATH") diff --git a/src/plugins/debugger/cdb/cdboptions.cpp b/src/plugins/debugger/cdb/cdboptions.cpp index 0aba1a84ff..29acafc229 100644 --- a/src/plugins/debugger/cdb/cdboptions.cpp +++ b/src/plugins/debugger/cdb/cdboptions.cpp @@ -86,7 +86,11 @@ bool CdbOptions::autoDetectPath(QString *outPath, QStringList *checkedDirectorie // Look for $ProgramFiles/"Debugging Tools For Windows <bit-idy>" and its // " (x86)", " (x64)" variations. Qt Creator needs 64/32 bit depending // on how it was built. - static const char *postFixes[] = { " (x86)", " (x32)", " (x64)" }; +#ifdef Q_OS_WIN64 + static const char *postFixes[] = {" (x64)", " 64-bit" }; +#else + static const char *postFixes[] = { " (x86)", " (x32)" }; +#endif outPath->clear(); const QByteArray programDirB = qgetenv("ProgramFiles"); @@ -94,11 +98,7 @@ bool CdbOptions::autoDetectPath(QString *outPath, QStringList *checkedDirectorie return false; const QString programDir = QString::fromLocal8Bit(programDirB) + QDir::separator(); -#ifdef Q_OS_WIN64 - const QString installDir = QLatin1String("Debugging Tools For Windows (x64)"); -#else const QString installDir = QLatin1String("Debugging Tools For Windows"); -#endif QString path = programDir + installDir; if (checkedDirectories) |