summaryrefslogtreecommitdiffstats
path: root/data/virt-viewer-debug.nsis.in
blob: 103b080c42e5efd7f85c92f278f3f8f376072fd6 (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
#!Nsis Installer Command Script
# @configure_input@
# To build an installer from the script you would normally do:
#
#   makensis virt-viewer-debug.nsis
#
# which will generate the output file 'virt-viewer-@VERSION@.exe' which is a Windows
# installer containing your program.

Name "VirtViewer Debug @VERSION@"
OutFile "virt-viewer-debug-@VERSION@.exe"
InstallDir "$LOCALAPPDATA\virt-viewer"
InstallDirRegKey HKCU "Software\virt-viewer" ""

RequestExecutionLevel user
SetCompressor bzip2
ShowInstDetails hide
ShowUninstDetails hide
XPStyle on

Page instfiles

Section "VirtViewer Debug"
  SectionIn RO
  WriteRegStr HKCU "Software\virt-viewer" "" $INSTDIR

  SetOutPath "$INSTDIR"

  SetOutPath "$INSTDIR\bin"
  File "@prefix@/bin/gdb.exe"
  File "@prefix@/bin/gdbserver.exe"
  File "${DESTDIR}@prefix@/bin/debug-helper.exe"

  # make virt-viewer debug the default spice-x client
  WriteRegStr HKCU "Software\spice-space.org\spicex" "client" "$INSTDIR\bin\debug-helper.exe remote-viewer.exe --spice-controller"
SectionEnd

Section "Uninstall"
  Delete /rebootok "$INSTDIR\bin\debug-helper.exe"
  Delete /rebootok "$INSTDIR\bin\gdbserver.exe"
  Delete /rebootok "$INSTDIR\bin\gdb.exe"
  RMDir "$INSTDIR\bin"

  RMDir "$INSTDIR"
SectionEnd

Section -post
  WriteUninstaller "$INSTDIR\Uninstall-debug.exe"
SectionEnd