-
Notifications
You must be signed in to change notification settings - Fork 4
/
new.nsi
271 lines (248 loc) · 10.6 KB
/
new.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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "TriCo"
!define PRODUCT_VERSION "3.1.0"
!define PRODUCT_PUBLISHER "NGUdbhav"
!define PRODUCT_WEB_SITE "https://github.com/ngudbhav/TriCo-electron-app/releases"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\TriCo.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 lzma
; MUI 1.67 compatible ------
!include "MUI.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "images\icons\win\icon.ico"
!define MUI_UNICON "images\icons\win\icon.ico"
; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "LICENSE.txt"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Start menu page
var ICONS_GROUP
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "TriCo"
!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\TriCo.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 "Setup-x64.exe"
InstallDir "$PROGRAMFILES\TriCo"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show
Section "MainSection" SEC01
SetOutPath "$INSTDIR"
SetOverwrite try
File "release-builds\TriCo-win32-x64\chrome_100_percent.pak"
File "release-builds\TriCo-win32-x64\chrome_200_percent.pak"
File "release-builds\TriCo-win32-x64\d3dcompiler_47.dll"
File "release-builds\TriCo-win32-x64\ffmpeg.dll"
File "release-builds\TriCo-win32-x64\icudtl.dat"
File "release-builds\TriCo-win32-x64\libEGL.dll"
File "release-builds\TriCo-win32-x64\libGLESv2.dll"
File "release-builds\TriCo-win32-x64\LICENSE"
File "release-builds\TriCo-win32-x64\LICENSES.chromium.html"
SetOutPath "$INSTDIR\locales"
File "release-builds\TriCo-win32-x64\locales\af.pak"
File "release-builds\TriCo-win32-x64\locales\am.pak"
File "release-builds\TriCo-win32-x64\locales\ar.pak"
File "release-builds\TriCo-win32-x64\locales\bg.pak"
File "release-builds\TriCo-win32-x64\locales\bn.pak"
File "release-builds\TriCo-win32-x64\locales\ca.pak"
File "release-builds\TriCo-win32-x64\locales\cs.pak"
File "release-builds\TriCo-win32-x64\locales\da.pak"
File "release-builds\TriCo-win32-x64\locales\de.pak"
File "release-builds\TriCo-win32-x64\locales\el.pak"
File "release-builds\TriCo-win32-x64\locales\en-GB.pak"
File "release-builds\TriCo-win32-x64\locales\en-US.pak"
File "release-builds\TriCo-win32-x64\locales\es-419.pak"
File "release-builds\TriCo-win32-x64\locales\es.pak"
File "release-builds\TriCo-win32-x64\locales\et.pak"
File "release-builds\TriCo-win32-x64\locales\fa.pak"
File "release-builds\TriCo-win32-x64\locales\fi.pak"
File "release-builds\TriCo-win32-x64\locales\fil.pak"
File "release-builds\TriCo-win32-x64\locales\fr.pak"
File "release-builds\TriCo-win32-x64\locales\gu.pak"
File "release-builds\TriCo-win32-x64\locales\he.pak"
File "release-builds\TriCo-win32-x64\locales\hi.pak"
File "release-builds\TriCo-win32-x64\locales\hr.pak"
File "release-builds\TriCo-win32-x64\locales\hu.pak"
File "release-builds\TriCo-win32-x64\locales\id.pak"
File "release-builds\TriCo-win32-x64\locales\it.pak"
File "release-builds\TriCo-win32-x64\locales\ja.pak"
File "release-builds\TriCo-win32-x64\locales\kn.pak"
File "release-builds\TriCo-win32-x64\locales\ko.pak"
File "release-builds\TriCo-win32-x64\locales\lt.pak"
File "release-builds\TriCo-win32-x64\locales\lv.pak"
File "release-builds\TriCo-win32-x64\locales\ml.pak"
File "release-builds\TriCo-win32-x64\locales\mr.pak"
File "release-builds\TriCo-win32-x64\locales\ms.pak"
File "release-builds\TriCo-win32-x64\locales\nb.pak"
File "release-builds\TriCo-win32-x64\locales\nl.pak"
File "release-builds\TriCo-win32-x64\locales\pl.pak"
File "release-builds\TriCo-win32-x64\locales\pt-BR.pak"
File "release-builds\TriCo-win32-x64\locales\pt-PT.pak"
File "release-builds\TriCo-win32-x64\locales\ro.pak"
File "release-builds\TriCo-win32-x64\locales\ru.pak"
File "release-builds\TriCo-win32-x64\locales\sk.pak"
File "release-builds\TriCo-win32-x64\locales\sl.pak"
File "release-builds\TriCo-win32-x64\locales\sr.pak"
File "release-builds\TriCo-win32-x64\locales\sv.pak"
File "release-builds\TriCo-win32-x64\locales\sw.pak"
File "release-builds\TriCo-win32-x64\locales\ta.pak"
File "release-builds\TriCo-win32-x64\locales\te.pak"
File "release-builds\TriCo-win32-x64\locales\th.pak"
File "release-builds\TriCo-win32-x64\locales\tr.pak"
File "release-builds\TriCo-win32-x64\locales\uk.pak"
File "release-builds\TriCo-win32-x64\locales\ur.pak"
File "release-builds\TriCo-win32-x64\locales\vi.pak"
File "release-builds\TriCo-win32-x64\locales\zh-CN.pak"
File "release-builds\TriCo-win32-x64\locales\zh-TW.pak"
SetOutPath "$INSTDIR\resources"
File "release-builds\TriCo-win32-x64\resources\app.asar"
SetOutPath "$INSTDIR"
File "release-builds\TriCo-win32-x64\resources.pak"
File "release-builds\TriCo-win32-x64\snapshot_blob.bin"
File "release-builds\TriCo-win32-x64\TriCo.exe"
File "release-builds\TriCo-win32-x64\v8_context_snapshot.bin"
File "release-builds\TriCo-win32-x64\version"
File "release-builds\TriCo-win32-x64\vk_swiftshader.dll"
File "release-builds\TriCo-win32-x64\vk_swiftshader_icd.json"
File "release-builds\TriCo-win32-x64\vulkan-1.dll"
; Shortcuts
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\TriCo.lnk" "$INSTDIR\TriCo.exe"
CreateShortCut "$DESKTOP\TriCo.lnk" "$INSTDIR\TriCo.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Section -AdditionalIcons
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Section Plugin
ApplicationID::Set "$SMPROGRAMS\$StartMenuFolder\${PRODUCT_NAME}.lnk" "NGUdbhav.TriCo"
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\TriCo.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\TriCo.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\uninst.exe"
Delete "$INSTDIR\vulkan-1.dll"
Delete "$INSTDIR\vk_swiftshader_icd.json"
Delete "$INSTDIR\vk_swiftshader.dll"
Delete "$INSTDIR\version"
Delete "$INSTDIR\v8_context_snapshot.bin"
Delete "$INSTDIR\TriCo.exe"
Delete "$INSTDIR\snapshot_blob.bin"
Delete "$INSTDIR\resources.pak"
Delete "$INSTDIR\resources\app.asar"
Delete "$INSTDIR\locales\zh-TW.pak"
Delete "$INSTDIR\locales\zh-CN.pak"
Delete "$INSTDIR\locales\vi.pak"
Delete "$INSTDIR\locales\ur.pak"
Delete "$INSTDIR\locales\uk.pak"
Delete "$INSTDIR\locales\tr.pak"
Delete "$INSTDIR\locales\th.pak"
Delete "$INSTDIR\locales\te.pak"
Delete "$INSTDIR\locales\ta.pak"
Delete "$INSTDIR\locales\sw.pak"
Delete "$INSTDIR\locales\sv.pak"
Delete "$INSTDIR\locales\sr.pak"
Delete "$INSTDIR\locales\sl.pak"
Delete "$INSTDIR\locales\sk.pak"
Delete "$INSTDIR\locales\ru.pak"
Delete "$INSTDIR\locales\ro.pak"
Delete "$INSTDIR\locales\pt-PT.pak"
Delete "$INSTDIR\locales\pt-BR.pak"
Delete "$INSTDIR\locales\pl.pak"
Delete "$INSTDIR\locales\nl.pak"
Delete "$INSTDIR\locales\nb.pak"
Delete "$INSTDIR\locales\ms.pak"
Delete "$INSTDIR\locales\mr.pak"
Delete "$INSTDIR\locales\ml.pak"
Delete "$INSTDIR\locales\lv.pak"
Delete "$INSTDIR\locales\lt.pak"
Delete "$INSTDIR\locales\ko.pak"
Delete "$INSTDIR\locales\kn.pak"
Delete "$INSTDIR\locales\ja.pak"
Delete "$INSTDIR\locales\it.pak"
Delete "$INSTDIR\locales\id.pak"
Delete "$INSTDIR\locales\hu.pak"
Delete "$INSTDIR\locales\hr.pak"
Delete "$INSTDIR\locales\hi.pak"
Delete "$INSTDIR\locales\he.pak"
Delete "$INSTDIR\locales\gu.pak"
Delete "$INSTDIR\locales\fr.pak"
Delete "$INSTDIR\locales\fil.pak"
Delete "$INSTDIR\locales\fi.pak"
Delete "$INSTDIR\locales\fa.pak"
Delete "$INSTDIR\locales\et.pak"
Delete "$INSTDIR\locales\es.pak"
Delete "$INSTDIR\locales\es-419.pak"
Delete "$INSTDIR\locales\en-US.pak"
Delete "$INSTDIR\locales\en-GB.pak"
Delete "$INSTDIR\locales\el.pak"
Delete "$INSTDIR\locales\de.pak"
Delete "$INSTDIR\locales\da.pak"
Delete "$INSTDIR\locales\cs.pak"
Delete "$INSTDIR\locales\ca.pak"
Delete "$INSTDIR\locales\bn.pak"
Delete "$INSTDIR\locales\bg.pak"
Delete "$INSTDIR\locales\ar.pak"
Delete "$INSTDIR\locales\am.pak"
Delete "$INSTDIR\locales\af.pak"
Delete "$INSTDIR\LICENSES.chromium.html"
Delete "$INSTDIR\LICENSE"
Delete "$INSTDIR\libGLESv2.dll"
Delete "$INSTDIR\libEGL.dll"
Delete "$INSTDIR\icudtl.dat"
Delete "$INSTDIR\ffmpeg.dll"
Delete "$INSTDIR\d3dcompiler_47.dll"
Delete "$INSTDIR\chrome_200_percent.pak"
Delete "$INSTDIR\chrome_100_percent.pak"
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
Delete "$DESKTOP\TriCo.lnk"
Delete "$SMPROGRAMS\$ICONS_GROUP\TriCo.lnk"
RMDir "$SMPROGRAMS\$ICONS_GROUP"
RMDir "$INSTDIR\resources"
RMDir "$INSTDIR\locales"
RMDir "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd