blob: b2acc6f087b64fd7b86ac740a5ee3fbca6351ae5 (
plain)
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
|
/* This file is part of the Qt SDK
*/
// constructor
function Component()
{
if (component.fromOnlineRepository)
{
// Commented line below used by the packaging scripts
//%IFW_DOWNLOADABLE_ARCHIVE_NAMES%
}
installer.installationFinished.connect(this, Component.prototype.installationFinishedPageIsShown);
installer.finishButtonClicked.connect(this, Component.prototype.installationFinished);
}
checkWhetherStopProcessIsNeeded = function()
{
}
Component.prototype.createOperations = function()
{
component.createOperations();
var component_root_path = installer.value("TargetDir") + "%TARGET_INSTALL_DIR%";
if (installer.value("os") == "win")
{
var windir = installer.environmentVariable("WINDIR");
if (windir == "") {
QMessageBox["warning"]( "Error" , "Error", "Could not find windows installation directory");
return;
}
// README Qt Readme - C:\Windows\notepad.exe <installdir>\README
var notePadLocation = windir + "\\notepad.exe";
component.addOperation( "CreateShortcut",
notePadLocation,
"@StartMenuDir@/README.lnk",
component_root_path + "/README");
}
}
Component.prototype.installationFinishedPageIsShown = function()
{
try {
if (installer.isInstaller() && installer.status == QInstaller.Success) {
installer.addWizardPageItem( component, "ReadMeCheckBoxForm", QInstaller.InstallationFinished );
}
} catch(e) {
print(e);
}
}
Component.prototype.installationFinished = function()
{
try {
if (installer.isInstaller() && installer.status == QInstaller.Success) {
var isReadMeCheckBoxChecked = component.userInterface( "ReadMeCheckBoxForm" ).readMeCheckBox.checked;
if (isReadMeCheckBoxChecked) {
QDesktopServices.openUrl("file:///" + installer.value("TargetDir") + "/README");
}
}
} catch(e) {
print(e);
}
}
|