summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2015-04-27 19:13:17 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2015-04-28 12:45:26 +0200
commitce7b3f514d4212c9da5e7718394d4c7abe42ccb1 (patch)
treef5e86178c0ff92c6eedeccddce5bbe01942f98c1
parentb4a640e5546c87108596744f5e10ddee6a026570 (diff)
nsis: Make StopServices callable during uninstall
Use hack described at http://nsis.sourceforge.net/Sharing_functions_between_Installer_and_Uninstaller to share the code between the installer and the uninstaller.
-rw-r--r--spice-guest-tools.nsis7
1 files changed, 6 insertions, 1 deletions
diff --git a/spice-guest-tools.nsis b/spice-guest-tools.nsis
index 742c2c6..35428cd 100644
--- a/spice-guest-tools.nsis
+++ b/spice-guest-tools.nsis
@@ -232,7 +232,8 @@ Function InstallDriver
Call InstallUpgradeDriver
FunctionEnd
-Function StopServices
+!macro StopServices un
+Function ${un}StopServices
SimpleSC::ServiceIsRunning "vdservice"
pop $0
pop $1
@@ -259,3 +260,7 @@ stopBalloon:
DetailPrint "Failed to stop BalloonService: $0"
end:
FunctionEnd
+!macroend
+
+!insertmacro StopServices ""
+!insertmacro StopServices "un."