-
Notifications
You must be signed in to change notification settings - Fork 0
/
cache901.nsi
213 lines (191 loc) · 7.23 KB
/
cache901.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Cache 901"
!define PRODUCT_VERSION "0.7.1"
!define PRODUCT_PUBLISHER "Cache 901"
!define PRODUCT_WEB_SITE "http://www.cache901.org/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\geocache901.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
SetCompressor bzip2
; MUI 1.67 compatible ------
!include "MUI.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "cache901\shield.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "COPYING"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Start menu page
var ICONS_GROUP
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Cache 901"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\geocache901.exe"
!insertmacro MUI_PAGE_FINISH
; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
; Language files
!insertmacro MUI_LANGUAGE "English"
; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; MUI end ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Cache901-0.7.1Setup.exe"
InstallDir "$PROGRAMFILES\Cache 901"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show
Section "MainSection" SEC01
SetOutPath "$INSTDIR"
SetOverwrite try
SetOutPath "$INSTDIR\cache901"
File "dist\cache901\shield.ico"
SetOutPath "$INSTDIR"
; Begin: Generate from "ls dist"
File "dist\MSVCR71.dll"
File "dist\_ctypes.pyd"
File "dist\_elementtree.pyd"
File "dist\_hashlib.pyd"
File "dist\_sqlite3.pyd"
File "dist\_socket.pyd"
File "dist\_ssl.pyd"
File "dist\bz2.pyd"
File "dist\gdiplus.dll"
File "dist\geocache901.exe"
File "dist\gpsbabel.exe"
File "dist\libexpat.dll"
File "dist\library.zip"
File "dist\MSVCP71.dll"
File "dist\msvcrt.dll"
File "dist\psyco._psyco.pyd"
File "dist\pyexpat.pyd"
File "dist\python25.dll"
File "dist\pywintypes25.dll"
File "dist\select.pyd"
File "dist\sqlite3.dll"
File "dist\unicodedata.pyd"
File "dist\version.dll"
File "dist\w9xpopen.exe"
File "dist\win32api.pyd"
File "dist\win32event.pyd"
File "dist\win32file.pyd"
File "dist\win32pipe.pyd"
File "dist\wx._controls_.pyd"
File "dist\wx._core_.pyd"
File "dist\wx._gdi_.pyd"
File "dist\wx._grid.pyd"
File "dist\wx._html.pyd"
File "dist\wx._misc_.pyd"
File "dist\wx._windows_.pyd"
File "dist\wx._xrc.pyd"
File "dist\wxbase28uh_net_vc.dll"
File "dist\wxbase28uh_vc.dll"
File "dist\wxbase28uh_xml_vc.dll"
File "dist\wxmsw28uh_adv_vc.dll"
File "dist\wxmsw28uh_core_vc.dll"
File "dist\wxmsw28uh_html_vc.dll"
File "dist\wxmsw28uh_xrc_vc.dll"
; End: Generate from "ls dist"
; Shortcuts
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Cache 901.lnk" "$INSTDIR\geocache901.exe"
CreateShortCut "$DESKTOP\Cache 901.lnk" "$INSTDIR\geocache901.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Section -AdditionalIcons
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Cache 901 Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\geocache901.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\geocache901.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
Abort
FunctionEnd
Section Uninstall
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
Delete "$INSTDIR\${PRODUCT_NAME}.url"
Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\geocache901.exe.log"
Delete "$INSTDIR\cache901\shield.ico"
; Begin: Generate from "ls dist"
Delete "$INSTDIR\MSVCR71.dll"
Delete "$INSTDIR\_ctypes.pyd"
Delete "$INSTDIR\_hashlib.pyd"
Delete "$INSTDIR\_socket.pyd"
Delete "$INSTDIR\_sqlite3.pyd"
Delete "$INSTDIR\_ssl.pyd"
Delete "$INSTDIR\bz2.pyd"
Delete "$INSTDIR\gdiplus.dll"
Delete "$INSTDIR\geocache901.exe"
Delete "$INSTDIR\gpsbabel.exe"
Delete "$INSTDIR\libexpat.dll"
Delete "$INSTDIR\library.zip"
Delete "$INSTDIR\msvcp71.dll"
Delete "$INSTDIR\msvcrt.dll"
Delete "$INSTDIR\psyco._psyco.pyd"
Delete "$INSTDIR\pyexpat.pyd"
Delete "$INSTDIR\python25.dll"
Delete "$INSTDIR\pywintypes25.dll"
Delete "$INSTDIR\select.pyd"
Delete "$INSTDIR\sqlite3.dll"
Delete "$INSTDIR\unicodedata.pyd"
Delete "$INSTDIR\w9xpopen.exe"
Delete "$INSTDIR\win32event.pyd"
Delete "$INSTDIR\win32file.pyd"
Delete "$INSTDIR\win32pipe.pyd"
Delete "$INSTDIR\wx._controls_.pyd"
Delete "$INSTDIR\wx._core_.pyd"
Delete "$INSTDIR\wx._gdi_.pyd"
Delete "$INSTDIR\wx._grid.pyd"
Delete "$INSTDIR\wx._html.pyd"
Delete "$INSTDIR\wx._misc_.pyd"
Delete "$INSTDIR\wx._windows_.pyd"
Delete "$INSTDIR\wx._xrc.pyd"
Delete "$INSTDIR\wxbase28uh_net_vc.dll"
Delete "$INSTDIR\wxbase28uh_vc.dll"
Delete "$INSTDIR\wxbase28uh_xml_vc.dll"
Delete "$INSTDIR\wxmsw28uh_adv_vc.dll"
Delete "$INSTDIR\wxmsw28uh_core_vc.dll"
Delete "$INSTDIR\wxmsw28uh_html_vc.dll"
Delete "$INSTDIR\wxmsw28uh_xrc_vc.dll"
; End: Generate from "ls dist"
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
Delete "$SMPROGRAMS\$ICONS_GROUP\Cache 901 Website.lnk"
Delete "$DESKTOP\Cache 901.lnk"
Delete "$SMPROGRAMS\$ICONS_GROUP\Cache 901.lnk"
RMDir "$SMPROGRAMS\$ICONS_GROUP"
RMDir "$INSTDIR\cache901"
RMDir "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd