-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindows_unattended_installer_script.qs
71 lines (57 loc) · 2.34 KB
/
windows_unattended_installer_script.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
// Note: you can list members of a widget with a line like "console.log(Object.getOwnPropertyNames(widget))"
function Controller() {
// Set installer target directory to the app subfolder for testing
installer.setValue("TargetDir", (installer.value("InstallerDirPath") + "/app"));
// Note could auto-reject/accept message boxes here , don't expect to see any though so we won't...
//installer.autoRejectMessageBoxes()
installer.installationFinished.connect(function() {
// Run the executable after installation completes
//try {
// var targetDir = installer.value("TargetDir");
// if (installer.isInstaller() && installer.status == QInstaller.Success) {
// installer.executeDetached(targetDir + "/Geometrize.exe"); // TODO - run this via the self-tests, potentially a python script instead
// }
//} catch(e) {
// print(e);
//}
gui.clickButton(buttons.NextButton);
})
}
// Welcome -> Next
Controller.prototype.WelcomePageCallback = function() {
gui.clickButton(buttons.NextButton);
}
// Intro -> Next
Controller.prototype.IntroductionPageCallback = function() {
gui.clickButton(buttons.NextButton);
}
// Installation Folder -> Next
Controller.prototype.TargetDirectoryPageCallback = function() {
gui.clickButton(buttons.NextButton);
}
// Select Components -> Next
Controller.prototype.ComponentSelectionPageCallback = function() {
var widget = gui.currentPageWidget();
widget.selectAll();
gui.clickButton(buttons.NextButton);
}
// Start Menu Options -> Next
Controller.prototype.StartMenuDirectoryPageCallback = function() {
gui.clickButton(buttons.NextButton);
}
// License -> Select "I accept the license" checkbox -> Next
Controller.prototype.LicenseAgreementPageCallback = function() {
gui.currentPageWidget().AcceptLicenseCheckBox.setChecked(true)
gui.clickButton(buttons.NextButton);
}
// Ready To Install -> Next
Controller.prototype.ReadyForInstallationPageCallback = function() {
gui.clickButton(buttons.CommitButton);
}
Controller.prototype.FinishedPageCallback = function() {
var checkBoxForm = gui.currentPageWidget().LaunchAppCheckBoxForm;
if (checkBoxForm && checkBoxForm.launchAppCheckBox) {
checkBoxForm.launchAppCheckBox.checked = false;
}
gui.clickButton(buttons.FinishButton);
}