diff options
| author | Samuli Piippo <samuli.piippo@qt.io> | 2016-12-28 15:16:42 +0200 |
|---|---|---|
| committer | Samuli Piippo <samuli.piippo@qt.io> | 2017-01-05 13:49:50 +0000 |
| commit | 6b7454d0b43888e4dac09693c674ee712638e27c (patch) | |
| tree | 7fb18715fe85a4698aa8508f720fedada85a64f5 | |
| parent | b2ce7b4ccf86a6e55735c579cc3b5d78fbc1b683 (diff) | |
| download | meta-boot2qt-6b7454d0b43888e4dac09693c674ee712638e27c.tar.gz | |
qbsp: update toolchain installer script
Update to use new <LANG>toolchain interface from sdktool and
register gdb as a separate component for the kit.
Change-Id: I440b7246a610701635b354d9403c146b70eefb22
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
| -rw-r--r-- | files/qbsp/toolchain_installscript.qs | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/files/qbsp/toolchain_installscript.qs b/files/qbsp/toolchain_installscript.qs index bcf9cd1..39a059c 100644 --- a/files/qbsp/toolchain_installscript.qs +++ b/files/qbsp/toolchain_installscript.qs | |||
| @@ -51,16 +51,14 @@ Component.prototype.createOperations = function() | |||
| 51 | component.addOperation("Execute", "{0}", script, "-y", "-d", path, "UNDOEXECUTE", "rm", "-rf", path); | 51 | component.addOperation("Execute", "{0}", script, "-y", "-d", path, "UNDOEXECUTE", "rm", "-rf", path); |
| 52 | component.addOperation("Execute", "{0}", "/bin/rm", script); | 52 | component.addOperation("Execute", "{0}", "/bin/rm", script); |
| 53 | } else { | 53 | } else { |
| 54 | var search = sdkPath; | ||
| 55 | path = path.replace(/\\/g,"/"); | 54 | path = path.replace(/\\/g,"/"); |
| 56 | component.addOperation("Replace", | 55 | component.addOperation("Replace", |
| 57 | path + "/sysroots/i686-pokysdk-mingw32/usr/bin/qt.conf", | 56 | path + "/sysroots/i686-pokysdk-mingw32/usr/bin/qt.conf", |
| 58 | search, path); | 57 | sdkPath, path); |
| 59 | } | 58 | } |
| 60 | // qt.embedded.b2qt.xx | ||
| 61 | var baseid = component.name.substring(17,19); | ||
| 62 | var basecomponent = component.name.substring(0, component.name.lastIndexOf(".")); | 59 | var basecomponent = component.name.substring(0, component.name.lastIndexOf(".")); |
| 63 | var toolchainId = "ProjectExplorer.ToolChain.Gcc:" + component.name; | 60 | var toolchainId = "ProjectExplorer.ToolChain.Gcc:" + component.name; |
| 61 | var debuggerId = basecomponent + ".gdb"; | ||
| 64 | var qtId = basecomponent + ".qt"; | 62 | var qtId = basecomponent + ".qt"; |
| 65 | var icon = installer.value("B2QtDeviceIcon"); | 63 | var icon = installer.value("B2QtDeviceIcon"); |
| 66 | var executableExt = ""; | 64 | var executableExt = ""; |
| @@ -73,12 +71,33 @@ Component.prototype.createOperations = function() | |||
| 73 | 71 | ||
| 74 | component.addOperation("Execute", | 72 | component.addOperation("Execute", |
| 75 | ["@SDKToolBinary@", "addTC", | 73 | ["@SDKToolBinary@", "addTC", |
| 76 | "--id", toolchainId, | 74 | "--id", toolchainId + ".gcc", |
| 77 | "--name", "GCC (Boot2Qt " + platform + ")", | 75 | "--name", "GCC (Boot2Qt " + platform + ")", |
| 76 | "--path", path + "/sysroots/" + hostSysroot + "/usr/bin/" + target + "/" + target + "-gcc" + executableExt, | ||
| 77 | "--abi", abi, | ||
| 78 | "--language", "1", | ||
| 79 | "UNDOEXECUTE", | ||
| 80 | "@SDKToolBinary@", "rmTC", "--id", toolchainId + ".gcc"]); | ||
| 81 | |||
| 82 | component.addOperation("Execute", | ||
| 83 | ["@SDKToolBinary@", "addTC", | ||
| 84 | "--id", toolchainId + ".g++", | ||
| 85 | "--name", "G++ (Boot2Qt " + platform + ")", | ||
| 78 | "--path", path + "/sysroots/" + hostSysroot + "/usr/bin/" + target + "/" + target + "-g++" + executableExt, | 86 | "--path", path + "/sysroots/" + hostSysroot + "/usr/bin/" + target + "/" + target + "-g++" + executableExt, |
| 79 | "--abi", abi, | 87 | "--abi", abi, |
| 88 | "--language", "2", | ||
| 89 | "UNDOEXECUTE", | ||
| 90 | "@SDKToolBinary@", "rmTC", "--id", toolchainId + ".g++"]); | ||
| 91 | |||
| 92 | component.addOperation("Execute", | ||
| 93 | ["@SDKToolBinary@", "addDebugger", | ||
| 94 | "--id", debuggerId, | ||
| 95 | "--name", "GDB (Boot2Qt " + platform + ")", | ||
| 96 | "--engine", "1", | ||
| 97 | "--binary", path + "/sysroots/" + hostSysroot + "/usr/bin/" + target + "/" + target + "-gdb" + executableExt, | ||
| 98 | "--abis", abi, | ||
| 80 | "UNDOEXECUTE", | 99 | "UNDOEXECUTE", |
| 81 | "@SDKToolBinary@", "rmTC", "--id", toolchainId]); | 100 | "@SDKToolBinary@", "rmDebugger", "--id", debuggerId]); |
| 82 | 101 | ||
| 83 | component.addOperation("Execute", | 102 | component.addOperation("Execute", |
| 84 | ["@SDKToolBinary@", "addQt", | 103 | ["@SDKToolBinary@", "addQt", |
| @@ -89,19 +108,18 @@ Component.prototype.createOperations = function() | |||
| 89 | "UNDOEXECUTE", | 108 | "UNDOEXECUTE", |
| 90 | "@SDKToolBinary@", "rmQt", "--id", qtId]); | 109 | "@SDKToolBinary@", "rmQt", "--id", qtId]); |
| 91 | 110 | ||
| 92 | var addKitOperations = ["@SDKToolBinary@", "addKit", | 111 | component.addOperation("Execute", |
| 112 | ["@SDKToolBinary@", "addKit", | ||
| 93 | "--id", basecomponent, | 113 | "--id", basecomponent, |
| 94 | "--name", "Boot2Qt %{Qt:Version} " + platform, | 114 | "--name", "Boot2Qt %{Qt:Version} " + platform, |
| 95 | "--mkspec", "devices/linux-oe-generic-g++", | 115 | "--mkspec", "devices/linux-oe-generic-g++", |
| 96 | "--qt", qtId, | 116 | "--qt", qtId, |
| 97 | "--debuggerengine", "1", | 117 | "--debuggerid", debuggerId, |
| 98 | "--debugger", path + "/sysroots/" + hostSysroot + "/usr/bin/" + target + "/" + target + "-gdb" + executableExt, | ||
| 99 | "--sysroot", path + "/sysroots/" + sysroot, | 118 | "--sysroot", path + "/sysroots/" + sysroot, |
| 100 | "--devicetype", deviceType, | 119 | "--devicetype", deviceType, |
| 101 | "--toolchain", toolchainId, | 120 | "--Ctoolchain", toolchainId + ".gcc", |
| 102 | "--icon", icon]; | 121 | "--Cxxtoolchain", toolchainId + ".g++", |
| 103 | 122 | "--icon", icon, | |
| 104 | addKitOperations.push("UNDOEXECUTE", "@SDKToolBinary@", "rmKit", "--id", basecomponent); | 123 | "UNDOEXECUTE", |
| 105 | 124 | "@SDKToolBinary@", "rmKit", "--id", basecomponent]); | |
| 106 | component.addOperation("Execute", addKitOperations); | ||
| 107 | } | 125 | } |
