diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2018-03-02 13:08:39 +0200 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2018-03-12 14:12:31 +0000 |
commit | 344c2f97025c6504ec986600498121bb83aaeb8f (patch) | |
tree | 3d7ec602603cb083b7c8e998eddca543ce17e57c /files/qbsp/toolchain_installscript.qs | |
parent | d9985542d7617b43ec7180c7ade0c4f64db82b42 (diff) | |
download | meta-boot2qt-344c2f97025c6504ec986600498121bb83aaeb8f.tar.gz |
Split meta-boot2qt layer
Move distro specific recipes to own layer and leave only new recipes
and bbclasses to meta-boot2qt layer. This makes it easier to include
meta-boot2qt to your own distro layer to get access e.g., QDB and
QBSP recipes that might be useful even without boot2qt distro.
Task-number: QTBUG-65871
Change-Id: I6c353774dd1668b00f2d05aa262ad866b90bdef6
Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io>
Diffstat (limited to 'files/qbsp/toolchain_installscript.qs')
-rw-r--r-- | files/qbsp/toolchain_installscript.qs | 125 |
1 files changed, 0 insertions, 125 deletions
diff --git a/files/qbsp/toolchain_installscript.qs b/files/qbsp/toolchain_installscript.qs deleted file mode 100644 index 4afab71..0000000 --- a/files/qbsp/toolchain_installscript.qs +++ /dev/null | |||
@@ -1,125 +0,0 @@ | |||
1 | /**************************************************************************** | ||
2 | ** | ||
3 | ** Copyright (C) 2016 The Qt Company Ltd. | ||
4 | ** Contact: https://www.qt.io/licensing/ | ||
5 | ** | ||
6 | ** This file is part of the Boot to Qt meta layer. | ||
7 | ** | ||
8 | ** $QT_BEGIN_LICENSE:GPL$ | ||
9 | ** Commercial License Usage | ||
10 | ** Licensees holding valid commercial Qt licenses may use this file in | ||
11 | ** accordance with the commercial license agreement provided with the | ||
12 | ** Software or, alternatively, in accordance with the terms contained in | ||
13 | ** a written agreement between you and The Qt Company. For licensing terms | ||
14 | ** and conditions see https://www.qt.io/terms-conditions. For further | ||
15 | ** information use the contact form at https://www.qt.io/contact-us. | ||
16 | ** | ||
17 | ** GNU General Public License Usage | ||
18 | ** Alternatively, this file may be used under the terms of the GNU | ||
19 | ** General Public License version 3 or (at your option) any later version | ||
20 | ** approved by the KDE Free Qt Foundation. The licenses are as published by | ||
21 | ** the Free Software Foundation and appearing in the file LICENSE.GPL3 | ||
22 | ** included in the packaging of this file. Please review the following | ||
23 | ** information to ensure the GNU General Public License requirements will | ||
24 | ** be met: https://www.gnu.org/licenses/gpl-3.0.html. | ||
25 | ** | ||
26 | ** $QT_END_LICENSE$ | ||
27 | ** | ||
28 | ****************************************************************************/ | ||
29 | |||
30 | function Component() | ||
31 | { | ||
32 | } | ||
33 | |||
34 | Component.prototype.createOperations = function() | ||
35 | { | ||
36 | component.createOperations(); | ||
37 | |||
38 | var device = "@MACHINE@" | ||
39 | var platform = "@NAME@" | ||
40 | var sysroot = "@SYSROOT@" | ||
41 | var target_sys = "@TARGET_SYS@" | ||
42 | var target = "@TARGET@" | ||
43 | var abi = "@ABI@" | ||
44 | var installPath = "@INSTALLPATH@/toolchain" | ||
45 | var sdkPath = "@SDKPATH@" | ||
46 | var sdkFile = "@SDKFILE@" | ||
47 | |||
48 | var path = installer.value("TargetDir") + installPath; | ||
49 | if (systemInfo.kernelType !== "winnt") { | ||
50 | var script = path + "/" + sdkFile; | ||
51 | component.addOperation("Execute", "{0}", "chmod", "+x", script); | ||
52 | component.addOperation("Execute", "{0}", script, "-y", "-d", path, "UNDOEXECUTE", "rm", "-rf", path); | ||
53 | component.addOperation("Execute", "{0}", "/bin/rm", script); | ||
54 | } else { | ||
55 | path = path.replace(/\\/g,"/"); | ||
56 | component.addOperation("Replace", | ||
57 | path + "/sysroots/i686-pokysdk-mingw32/usr/bin/qt.conf", | ||
58 | sdkPath, path); | ||
59 | } | ||
60 | var basecomponent = component.name.substring(0, component.name.lastIndexOf(".")); | ||
61 | var toolchainId = "ProjectExplorer.ToolChain.Gcc:" + component.name; | ||
62 | var debuggerId = basecomponent + ".gdb"; | ||
63 | var qtId = basecomponent + ".qt"; | ||
64 | var icon = installer.value("B2QtDeviceIcon"); | ||
65 | var executableExt = ""; | ||
66 | var hostSysroot = "x86_64-pokysdk-linux"; | ||
67 | if (systemInfo.kernelType === "winnt") { | ||
68 | executableExt = ".exe"; | ||
69 | hostSysroot = "i686-pokysdk-mingw32"; | ||
70 | } | ||
71 | |||
72 | component.addOperation("Execute", | ||
73 | ["@SDKToolBinary@", "addTC", | ||
74 | "--id", toolchainId + ".gcc", | ||
75 | "--name", "GCC (" + platform + " " + target + ")", | ||
76 | "--path", path + "/sysroots/" + hostSysroot + "/usr/bin/" + target_sys + "/" + target_sys + "-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++ (" + platform + " " + target + ")", | ||
86 | "--path", path + "/sysroots/" + hostSysroot + "/usr/bin/" + target_sys + "/" + target_sys + "-g++" + executableExt, | ||
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 (" + platform + " " + target + ")", | ||
96 | "--engine", "1", | ||
97 | "--binary", path + "/sysroots/" + hostSysroot + "/usr/bin/" + target_sys + "/" + target_sys + "-gdb" + executableExt, | ||
98 | "--abis", abi, | ||
99 | "UNDOEXECUTE", | ||
100 | "@SDKToolBinary@", "rmDebugger", "--id", debuggerId]); | ||
101 | |||
102 | component.addOperation("Execute", | ||
103 | ["@SDKToolBinary@", "addQt", | ||
104 | "--id", qtId, | ||
105 | "--name", platform + " " + target, | ||
106 | "--type", "Qdb.EmbeddedLinuxQt", | ||
107 | "--qmake", path + "/sysroots/" + hostSysroot + "/usr/bin/qmake" + executableExt, | ||
108 | "UNDOEXECUTE", | ||
109 | "@SDKToolBinary@", "rmQt", "--id", qtId]); | ||
110 | |||
111 | component.addOperation("Execute", | ||
112 | ["@SDKToolBinary@", "addKit", | ||
113 | "--id", basecomponent, | ||
114 | "--name", platform + " " + target, | ||
115 | "--mkspec", "devices/linux-oe-generic-g++", | ||
116 | "--qt", qtId, | ||
117 | "--debuggerid", debuggerId, | ||
118 | "--sysroot", path + "/sysroots/" + sysroot, | ||
119 | "--devicetype", "QdbLinuxOsType", | ||
120 | "--Ctoolchain", toolchainId + ".gcc", | ||
121 | "--Cxxtoolchain", toolchainId + ".g++", | ||
122 | "--icon", icon, | ||
123 | "UNDOEXECUTE", | ||
124 | "@SDKToolBinary@", "rmKit", "--id", basecomponent]); | ||
125 | } | ||