-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConfigureInstaller.nsi
93 lines (62 loc) · 2.05 KB
/
ConfigureInstaller.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
; MakeWinInstaller.nsi
;
; This script builds the Windows installer for pyBrew
;--------------------------------
; The name of the installer
Name "pyBrew"
; The file to write
OutFile "pyBrewInstaller.exe"
; The default installation directory
InstallDir $PROGRAMFILES\pyBrew
RequestExecutionLevel admin
;--------------------------------
; Pages
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
;--------------------------------
; The stuff to install
Section "pyBrew (required)"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Save exe file to program folder
File "pyBrew.exe"
; Save database csv spreadsheets to program folder
File /r "data"
File /r "icons"
; Create an uninstaller
WriteUninstaller "uninstall-pyBrew.exe"
SectionEnd
; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\pyBrew"
CreateShortCut "$SMPROGRAMS\pyBrew\Uninstall.lnk" "$INSTDIR\uninstall-pyBrew.exe" "" "$INSTDIR\uninstall-pyBrew.exe" 0
CreateShortCut "$SMPROGRAMS\pyBrew\pyBrew.lnk" "$INSTDIR\pyBrew.exe" "" "$INSTDIR\pyBrew.exe" 0
SectionEnd
; Optional section (can be disabled by the user)
Section "Desktop Shortcut"
CreateShortCut "$DESKTOP\pyBrew.lnk" "$INSTDIR\pyBrew.exe" "" "$INSTDIR\pyBrew.exe" 0
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
;DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\pyBrew"
;DeleteRegKey HKLM SOFTWARE\pyBrew
; Remove files and uninstaller
Delete $INSTDIR\uninstall-pyBrew.exe
Delete "$INSTDIR\data\*.*"
Delete "$INSTDIR\icons\*.*"
Delete "$DESKTOP\pyBrew.lnk"
Delete $INSTDIR\pyBrew.exe
; Remove shortcuts, if any
Delete "$SMPROGRAMS\pyBrew\*.*"
; Remove directories used
RMDir "$INSTDIR\data"
RMDir "$INSTDIR\icons"
RMDir "$SMPROGRAMS\pyBrew"
RMDir "$INSTDIR"
SectionEnd