summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Williamson <grant.williamson@gmail.com>2012-03-07 11:31:57 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2012-03-13 18:08:52 +0100
commite305ceb2194051e052ad8ac3555e5acffd8f980c (patch)
tree9d47dcc3f7b88166cdfe5da4c031c1ab8aea7839
parent6049233842f38adb2a4c262e8b849997637fba2d (diff)
Handle 32/64 bit vdagent
-rw-r--r--spice-guest-tools.nsis21
1 files changed, 16 insertions, 5 deletions
diff --git a/spice-guest-tools.nsis b/spice-guest-tools.nsis
index 1afa5a6..db012f9 100644
--- a/spice-guest-tools.nsis
+++ b/spice-guest-tools.nsis
@@ -66,9 +66,12 @@ DirText "Please select the installation folder."
Section "spice-guest-tools"
SectionIn RO
- SetOutPath "$INSTDIR"
+ SetOutPath "$INSTDIR/32"
File "bin/vdagent_x86/vdagent.exe"
File "bin/vdagent_x86/vdservice.exe"
+ SetOutPath "$INSTDIR/64"
+ File "bin/vdagent_x64/vdagent.exe"
+ File "bin/vdagent_x64/vdservice.exe"
SetOutPath "$INSTDIR\drivers"
File /r drivers/virtio/
@@ -95,7 +98,11 @@ Section "spice-guest-tools"
Call InstallDriver
- SetOutPath "$INSTDIR"
+ ${if} ${RunningX64}
+ SetOutPath "$INSTDIR\64"
+ ${else}
+ SetOutPath "$INSTDIR\32"
+ ${endif}
nsExec::ExecToLog 'vdservice install'
nsExec::ExecToLog 'net start vdservice'
@@ -114,12 +121,16 @@ Section "Uninstall"
Delete /rebootok "$SMPROGRAMS\virt-viewer\Uninstall SPICE Guest Tools.lnk"
RMDir "$SMPROGRAMS\spice-guest-tools"
- SetOutPath "$INSTDIR"
+ ${if} ${RunningX64}
+ SetOutPath "$INSTDIR\64"
+ ${else}
+ SetOutPath "$INSTDIR\32"
+ ${EndIf}
nsExec::ExecToLog 'net stop vdservice'
nsExec::ExecToLog 'vdservice uninstall'
- Delete /rebootok "$INSTDIR\vdagent.exe"
- Delete /rebootok "$INSTDIR\vdservice.exe"
+ Delete /rebootok "$OUTDIR\vdagent.exe"
+ Delete /rebootok "$OUTDIR\vdservice.exe"
RMDir "$INSTDIR"
SectionEnd