-
Notifications
You must be signed in to change notification settings - Fork 750
/
iscript.qs
209 lines (179 loc) · 6.93 KB
/
iscript.qs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
function Controller()
{
installer.wizardPageInsertionRequested.connect(function(widget, page)
{
installer.removeWizardPage(installer.components()[0], "WorkspaceWidget");
})
installer.setDefaultPageVisible(4092, false);
installer.setDefaultPageVisible(4093, false);
installer.setDefaultPageVisible(4094, false);
installer.setDefaultPageVisible(4095, false);
if (!installer.isOfflineOnly())
{
var repos = [
"http://download.qt.io/online/qtsdkrepository/"+installer.value("os")+"_x64/desktop/licenses/",
"http://download.qt.io/online/qtsdkrepository/"+installer.value("os")+"_x64/desktop/tools_generic/",
"http://download.qt.io/online/qtsdkrepository/"+installer.value("os")+"_x64/desktop/tools_qtcreator/",
"http://download.qt.io/online/qtsdkrepository/"+installer.value("os")+"_x64/desktop/"+installer.value("VERSION").replace(".", "_")+"/",
"http://download.qt.io/online/qtsdkrepository/"+installer.value("os")+"_x64/desktop/"+installer.value("VERSION").replace(".", "_")+"_src_doc_examples/"
];
if (installer.value("PREVIEW") == "true")
{
repos.push("http://download.qt.io/online/qtsdkrepository/"+installer.value("os")+"_x64/desktop/"+installer.value("VERSION").replace(".", "_").slice(0, -1)+"_preview/")
}
installer.addUserRepositories(repos)
}
installer.autoRejectMessageBoxes();
installer.installationFinished.connect(function()
{
gui.clickButton(buttons.NextButton);
})
}
Controller.prototype.WelcomePageCallback = function()
{
gui.clickButton(buttons.NextButton, 30000);
}
Controller.prototype.CredentialsPageCallback = function()
{
gui.clickButton(buttons.NextButton);
}
Controller.prototype.IntroductionPageCallback = function()
{
gui.clickButton(buttons.NextButton);
}
Controller.prototype.DynamicTelemetryPluginFormCallback = function()
{
var page = gui.pageWidgetByObjectName("DynamicTelemetryPluginForm");
page.statisticGroupBox.disableStatisticRadioButton.setChecked(true);
gui.clickButton(buttons.NextButton);
}
Controller.prototype.ObligationsPageCallback = function()
{
var page = gui.pageWidgetByObjectName("ObligationsPage");
page.obligationsAgreement.setChecked(true);
//company
//var nameEdit = gui.findChild(page, "CompanyName")
//if (nameEdit) { nameEdit.text = "My Company" }
//individual
var individualCheckbox = gui.findChild(page, "IndividualPerson")
if (individualCheckbox) { individualCheckbox.checked = true; }
page.completeChanged();
gui.clickButton(buttons.NextButton);
}
Controller.prototype.TargetDirectoryPageCallback = function()
{
gui.clickButton(buttons.NextButton);
}
Controller.prototype.ComponentSelectionPageCallback = function()
{
var cBoxes = ["Archive", "LTS", "Latest releases", "Preview"];
for (var i in cBoxes)
{
var box = gui.currentPageWidget().findChild(cBoxes[i]);
if (box)
{
box.checked = true;
}
}
var refButton = gui.currentPageWidget().findChild("FetchCategoryButton");
if (refButton)
{
refButton.click();
}
var version = "qt5.5130";
var prefix = "";
if (installer.value("VERSION") != "")
{
version = installer.value("VERSION");
}
if (installer.value("PREVIEW") == "true")
{
version = version.slice(0, -1)
prefix = "preview."
}
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qt3d");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtcanvas3d");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtcharts");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtdatavis3d");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtlocation");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtnetworkauth");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtpurchasing");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtquickcontrols");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtquickcontrols2");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtremoteobjects");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtscript");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtserialbus");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtspeech");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtvirtualkeyboard");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtwebengine");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtwebglplugin");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtwebview");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".qtlottie");
if (installer.value("LINUX") == "true")
{
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".gcc_64");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".android_armv7");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".android_x86");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".android_arm64_v8a");
}
if (installer.value("DARWIN") == "true")
{
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".clang_64");
}
if (installer.value("IOS") == "true")
{
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".ios");
}
if (installer.value("WINDOWS") == "true")
{
if (installer.value("MSVC") == "true")
{
if (installer.value("ARCH") == "32")
{
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".win32_msvc2017");
gui.currentPageWidget().selectComponent("qt.tools.win32_mingw730")
}
else
{
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".win64_msvc2017_64");
gui.currentPageWidget().selectComponent("qt.tools.win64_mingw730")
}
}
else
{
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".win32_mingw49");
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".win32_mingw53");
if (installer.value("ARCH") == "32")
{
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".win32_mingw73");
}
else
{
gui.currentPageWidget().selectComponent(prefix+"qt."+version+".win64_mingw73");
}
}
}
gui.clickButton(buttons.NextButton);
}
Controller.prototype.LicenseAgreementPageCallback = function()
{
gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
gui.clickButton(buttons.NextButton);
}
Controller.prototype.StartMenuDirectoryPageCallback = function()
{
gui.clickButton(buttons.NextButton);
}
Controller.prototype.ReadyForInstallationPageCallback = function()
{
gui.clickButton(buttons.NextButton);
}
Controller.prototype.FinishedPageCallback = function()
{
var checkBox = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm;
if (checkBox && checkBox.launchQtCreatorCheckBox)
{
checkBox.launchQtCreatorCheckBox.checked = false;
}
gui.clickButton(buttons.FinishButton);
}