Repository navigation
Expand file tree
/
Copy pathmaintenance.qs
More file actions
46 lines (41 loc) · 1.62 KB
/
Copy pathmaintenance.qs
File metadata and controls
46 lines (41 loc) · 1.62 KB
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
// constructor
function Component()
{
installer.installationStarted.connect(this, Component.prototype.onInstallationStarted);
}
Component.prototype.>
{
if (component.updateRequested() || component.installationRequested()) {
if (installer.value("os") == "win")
component.installerbaseBinaryPath = "@TargetDir@/tempmaintenancetool.exe";
installer.setInstallerBaseBinary(component.installerbaseBinaryPath);
}
}
Component.prototype.createOperations = function()
{
// call the base createOperations
component.createOperations();
// only for windows online installer
if ( installer.value("os") == "win" && !installer.isOfflineOnly() )
{
// shortcut to add or remove packages
component.addOperation( "CreateShortcut",
"@TargetDir@/maintenancetool.exe",
"@StartMenuDir@/Manage vcpkg.lnk",
" --manage-packages");
// shortcut to update packages
component.addOperation( "CreateShortcut",
"@TargetDir@/maintenancetool.exe",
"@StartMenuDir@/Update vcpkg.lnk",
" --updater");
}
// create uninstall link only for windows
if (installer.value("os") == "win")
{
// shortcut to uninstaller
component.addOperation( "CreateShortcut",
"@TargetDir@/maintenancetool.exe",
"@StartMenuDir@/Uninstall vcpkg.lnk",
" --uninstall");
}
}