diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-10-05 18:14:57 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-05 18:14:57 -0700 |
| commit | 68a9876682f3eb4118b378a30be7b8fa6569da11 (patch) | |
| tree | 8d63ae24f9535a3386338879de0f4543744eaa13 /scripts | |
| parent | 9b0c2cb2524ef3fa1e8e7e8f2512c32e40eb5815 (diff) | |
| parent | 13385293e62561166c490671630e92458e630b1b (diff) | |
| download | vcpkg-68a9876682f3eb4118b378a30be7b8fa6569da11.tar.gz vcpkg-68a9876682f3eb4118b378a30be7b8fa6569da11.zip | |
Merge pull request #1931 from podsvirov/vcpkg-export-ifw
[vcpkg-export-ifw] Maintenance Tool
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/ifw/maintenance.qs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/scripts/ifw/maintenance.qs b/scripts/ifw/maintenance.qs new file mode 100644 index 000000000..5cdad7225 --- /dev/null +++ b/scripts/ifw/maintenance.qs @@ -0,0 +1,46 @@ +// constructor +function Component() +{ + installer.installationStarted.connect(this, Component.prototype.onInstallationStarted); +} + +Component.prototype.onInstallationStarted = function() +{ + 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"); + } +} + |
