forked from qt-creator/qt-creator
Squish: Use cdb with Creator's bitness
Normal builds of Creator can only use cdb with the same bitness. In the official packages this is being solved by sharing qtcreatorcdbextXX between 32- and 64-bit builds. Change-Id: Ib31e4d71789065bef908bf13569de4284ae20de9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -6,12 +6,12 @@
|
|||||||
<variable>DebuggerItem.0</variable>
|
<variable>DebuggerItem.0</variable>
|
||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<valuelist type="QVariantList" key="Abis">
|
<valuelist type="QVariantList" key="Abis">
|
||||||
<value type="QString">x86-windows-msvc2015-pe-64bit</value>
|
<value type="QString">x86-windows-msvc2015-pe-SQUISH_DEBUGGER_BITNESSbit</value>
|
||||||
</valuelist>
|
</valuelist>
|
||||||
<value type="bool" key="AutoDetected">true</value>
|
<value type="bool" key="AutoDetected">true</value>
|
||||||
<value type="QString" key="AutoDetectionSource"></value>
|
<value type="QString" key="AutoDetectionSource"></value>
|
||||||
<value type="QString" key="Binary">C:/Program Files (x86)/Windows Kits/10/Debuggers/x64/cdb.exe</value>
|
<value type="QString" key="Binary">C:/Program Files (x86)/Windows Kits/10/Debuggers/SQUISH_DEBUGGER_ARCHITECTURE/cdb.exe</value>
|
||||||
<value type="QString" key="DisplayName">Auto-detected CDB at C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe</value>
|
<value type="QString" key="DisplayName">Auto-detected CDB at C:\Program Files (x86)\Windows Kits\10\Debuggers\SQUISH_DEBUGGER_ARCHITECTURE\cdb.exe</value>
|
||||||
<value type="int" key="EngineType">4</value>
|
<value type="int" key="EngineType">4</value>
|
||||||
<value type="QString" key="Id">{1b25f20a-d584-4fb7-85b3-74dd15b82f6f}</value>
|
<value type="QString" key="Id">{1b25f20a-d584-4fb7-85b3-74dd15b82f6f}</value>
|
||||||
<value type="QDateTime" key="LastModified"></value>
|
<value type="QDateTime" key="LastModified"></value>
|
||||||
|
|||||||
@@ -186,6 +186,30 @@ def substituteDefaultCompiler(settingsDir):
|
|||||||
__substitute__(qtversion, "SQUISH_DEFAULT_COMPILER", compiler)
|
__substitute__(qtversion, "SQUISH_DEFAULT_COMPILER", compiler)
|
||||||
test.log("Injected default compiler '%s' to qtversion.xml..." % compiler)
|
test.log("Injected default compiler '%s' to qtversion.xml..." % compiler)
|
||||||
|
|
||||||
|
def substituteCdb(settingsDir):
|
||||||
|
def canUse32bitCdb():
|
||||||
|
try:
|
||||||
|
serverIni = readFile(os.path.join(os.getenv("APPDATA"), "froglogic",
|
||||||
|
"Squish", "ver1", "server.ini"))
|
||||||
|
autLine = filter(lambda line: "AUT/qtcreator" in line, serverIni.splitlines())[0]
|
||||||
|
autPath = autLine.split("\"")[1]
|
||||||
|
return os.path.exists(os.path.join(autPath, "..", "lib", "qtcreatorcdbext32"))
|
||||||
|
except:
|
||||||
|
test.fatal("Something went wrong when determining debugger bitness",
|
||||||
|
"Did Squish's file structure change? Guessing 32-bit cdb can be used...")
|
||||||
|
return True
|
||||||
|
|
||||||
|
if canUse32bitCdb():
|
||||||
|
architecture = "x86"
|
||||||
|
bitness = "32"
|
||||||
|
else:
|
||||||
|
architecture = "x64"
|
||||||
|
bitness = "64"
|
||||||
|
debuggers = os.path.join(settingsDir, "QtProject", 'qtcreator', 'debuggers.xml')
|
||||||
|
__substitute__(debuggers, "SQUISH_DEBUGGER_ARCHITECTURE", architecture)
|
||||||
|
__substitute__(debuggers, "SQUISH_DEBUGGER_BITNESS", bitness)
|
||||||
|
test.log("Injected architecture '%s' and bitness '%s' in cdb path..." % (architecture, bitness))
|
||||||
|
|
||||||
def __guessABI__(supportedABIs, use64Bit):
|
def __guessABI__(supportedABIs, use64Bit):
|
||||||
if platform.system() == 'Linux':
|
if platform.system() == 'Linux':
|
||||||
supportedABIs = filter(lambda x: 'linux' in x, supportedABIs)
|
supportedABIs = filter(lambda x: 'linux' in x, supportedABIs)
|
||||||
@@ -277,6 +301,8 @@ def copySettingsToTmpDir(destination=None, omitFiles=[]):
|
|||||||
if platform.system() in ('Linux', 'Darwin'):
|
if platform.system() in ('Linux', 'Darwin'):
|
||||||
substituteTildeWithinToolchains(tmpSettingsDir)
|
substituteTildeWithinToolchains(tmpSettingsDir)
|
||||||
substituteDefaultCompiler(tmpSettingsDir)
|
substituteDefaultCompiler(tmpSettingsDir)
|
||||||
|
elif platform.system() in ('Windows', 'Microsoft'):
|
||||||
|
substituteCdb(tmpSettingsDir)
|
||||||
substituteUnchosenTargetABIs(tmpSettingsDir)
|
substituteUnchosenTargetABIs(tmpSettingsDir)
|
||||||
SettingsPath = ' -settingspath "%s"' % tmpSettingsDir
|
SettingsPath = ' -settingspath "%s"' % tmpSettingsDir
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user