-
Notifications
You must be signed in to change notification settings - Fork 4
/
VolViewer32bit.nsi
76 lines (62 loc) · 2.08 KB
/
VolViewer32bit.nsi
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; VolViewerInstaller.nsi
;
; Nullsoft Scriptable Install System
;
; Custom script for the VolViewer Application
; author: Jerome Avondo
;--------------------------------
; The name of the installer
Name "VolViewer - 32bit"
; The file to write
OutFile "VolViewerInstaller_x86.exe"
; The default installation directory
InstallDir $PROGRAMFILES\VolViewer
; The text to prompt the user to enter a directory
DirText "This will install the VolViewer application on your computer. Please choose a directory"
;--------------------------------
; The stuff to install
Section "" ;No components page, name is not important
; Set output path to the installation directory.
; Put file there
SetOutPath $INSTDIR
File 32bitInstall\VolViewer.exe
File 32bitInstall\*.dll
File 32bitInstall\settings.ini
SetOutPath $INSTDIR\imageformats
File 32bitInstall\imageformats\*.*
SetOutPath $INSTDIR\Icons
File 32bitInstall\Icons\*.*
SetOutPath $INSTDIR\Shaders
File 32bitInstall\Shaders\*.*
SetOutPath $INSTDIR\Kernels
File 32bitInstall\Kernels\*.*
SetOutPath $INSTDIR
; Now create shortcuts
CreateDirectory "$SMPROGRAMS\VolViewer"
CreateShortCut "$SMPROGRAMS\VolViewer\VolViewer.lnk" "$INSTDIR\VolViewer.exe"
CreateShortCut "$SMPROGRAMS\VolViewer\Edit Settings.lnk" "$INSTDIR\Settings.ini"
CreateShortCut "$SMPROGRAMS\VolViewer\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
CreateShortCut "$DESKTOP\VolViewer.lnk" "$INSTDIR\VolViewer.exe"
; Tell the compiler to write an uninstaller and to look for a "Uninstall" section
WriteUninstaller $INSTDIR\Uninstall.exe
SectionEnd ; end the section
; The uninstall section
Section "Uninstall"
; Delete the files and folders
Delete $INSTDIR\*.*
Delete $INSTDIR\Icons\*.*
Delete $INSTDIR\Shaders\*.*
Delete $INSTDIR\Kernels\*.*
Delete $INSTDIR\imageformats\*.*
RMDir $INSTDIR\Icons
RMDir $INSTDIR\Shaders
RMDir $INSTDIR\Kernels
RMDir $INSTDIR\imageformats
RMDir $INSTDIR
;Now remove shortcuts too
Delete "$SMPROGRAMS\VolViewer\Uninstall.lnk"
Delete "$SMPROGRAMS\VolViewer\Edit Settings.lnk"
Delete "$SMPROGRAMS\VolViewer\VolViewer.lnk"
RMDir "$SMPROGRAMS\VolViewer"
Delete "$DESKTOP\VolViewer.lnk"
SectionEnd