Mercurial > vim
annotate nsis/gvim.nsi @ 8709:0e13fb6f07f4
Added tag v7.4.1643 for changeset 31f9fa8e153208fe5f5552ef5145f55cec908d24
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 24 Mar 2016 19:15:09 +0100 |
parents | 4456fa2d22e8 |
children | c473a9393dc5 |
rev | line source |
---|---|
7 | 1 # NSIS file to create a self-installing exe for Vim. |
2 # It requires NSIS version 2.0 or later. | |
6343 | 3 # Last Change: 2014 Nov 5 |
7 | 4 |
5 # WARNING: if you make changes to this script, look out for $0 to be valid, | |
6 # because uninstall deletes most files in $0. | |
7 | |
5128
3dafc80e781b
updated for version 7.3.1307
Bram Moolenaar <bram@vim.org>
parents:
2577
diff
changeset
|
8 # Location of gvim_ole.exe, vimw32.exe, GvimExt/*, etc. |
7613
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
9 !ifndef VIMSRC |
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
10 !define VIMSRC "..\src" |
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
11 !endif |
7 | 12 |
13 # Location of runtime files | |
7613
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
14 !ifndef VIMRT |
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
15 !define VIMRT ".." |
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
16 !endif |
7 | 17 |
18 # Location of extra tools: diff.exe | |
7613
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
19 !ifndef VIMTOOLS |
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
20 !define VIMTOOLS ..\.. |
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
21 !endif |
7 | 22 |
23 # Comment the next line if you don't have UPX. | |
24 # Get it at http://upx.sourceforge.net | |
25 !define HAVE_UPX | |
26 | |
27 # comment the next line if you do not want to add Native Language Support | |
28 !define HAVE_NLS | |
29 | |
7443
357b7bd8d612
commit https://github.com/vim/vim/commit/6c7b44472f7055c78d996e1b626bd2932502212f
Christian Brabandt <cb@256bit.org>
parents:
6343
diff
changeset
|
30 !include gvim_version.nsh # for version number |
7 | 31 |
32 # ----------- No configurable settings below this line ----------- | |
33 | |
34 !include UpgradeDLL.nsh # for VisVim.dll | |
2217
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
35 !include LogicLib.nsh |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
36 !include x64.nsh |
7 | 37 |
38 Name "Vim ${VER_MAJOR}.${VER_MINOR}" | |
39 OutFile gvim${VER_MAJOR}${VER_MINOR}.exe | |
40 CRCCheck force | |
7613
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
41 SetCompressor /SOLID lzma |
7 | 42 SetDatablockOptimize on |
2217
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
43 RequestExecutionLevel highest |
7613
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
44 XPStyle on |
7 | 45 |
46 ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer." | |
6343 | 47 DirText "Choose a directory to install Vim (should contain 'vim')" |
7 | 48 Icon icons\vim_16c.ico |
5134
b49784c49d53
updated for version 7.3.1310
Bram Moolenaar <bram@vim.org>
parents:
5128
diff
changeset
|
49 # NSIS2 uses a different strategy with six different images in a strip... |
7 | 50 #EnabledBitmap icons\enabled.bmp |
51 #DisabledBitmap icons\disabled.bmp | |
52 UninstallText "This will uninstall Vim ${VER_MAJOR}.${VER_MINOR} from your system." | |
53 UninstallIcon icons\vim_uninst_16c.ico | |
54 | |
55 # On NSIS 2 using the BGGradient causes trouble on Windows 98, in combination | |
56 # with the BringToFront. | |
57 # BGGradient 004000 008200 FFFFFF | |
58 LicenseText "You should read the following before installing:" | |
59 LicenseData ${VIMRT}\doc\uganda.nsis.txt | |
60 | |
61 !ifdef HAVE_UPX | |
62 !packhdr temp.dat "upx --best --compress-icons=1 temp.dat" | |
63 !endif | |
64 | |
65 # This adds '\vim' to the user choice automagically. The actual value is | |
66 # obtained below with ReadINIStr. | |
67 InstallDir "$PROGRAMFILES\Vim" | |
68 | |
69 # Types of installs we can perform: | |
70 InstType Typical | |
71 InstType Minimal | |
72 InstType Full | |
73 | |
74 SilentInstall normal | |
75 | |
76 # These are the pages we use | |
77 Page license | |
78 Page components | |
79 Page directory "" "" CheckInstallDir | |
80 Page instfiles | |
81 UninstPage uninstConfirm | |
82 UninstPage instfiles | |
83 | |
84 ########################################################## | |
85 # Functions | |
86 | |
87 Function .onInit | |
88 MessageBox MB_YESNO|MB_ICONQUESTION \ | |
89 "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer.$\n Continue?" \ | |
90 IDYES NoAbort | |
91 Abort ; causes installer to quit. | |
92 NoAbort: | |
93 | |
94 # run the install program to check for already installed versions | |
95 SetOutPath $TEMP | |
96 File /oname=install.exe ${VIMSRC}\installw32.exe | |
97 ExecWait "$TEMP\install.exe -uninstall-check" | |
98 Delete $TEMP\install.exe | |
99 | |
100 # We may have been put to the background when uninstall did something. | |
101 BringToFront | |
102 | |
103 # Install will have created a file for us that contains the directory where | |
104 # we should install. This is $VIM if it's set. This appears to be the only | |
105 # way to get the value of $VIM here!? | |
106 ReadINIStr $INSTDIR $TEMP\vimini.ini vimini dir | |
107 Delete $TEMP\vimini.ini | |
108 | |
109 # If ReadINIStr failed or did not find a path: use the default dir. | |
110 StrCmp $INSTDIR "" 0 IniOK | |
111 StrCpy $INSTDIR "$PROGRAMFILES\Vim" | |
112 IniOK: | |
113 | |
114 # Should check for the value of $VIM and use it. Unfortunately I don't know | |
115 # how to obtain the value of $VIM | |
116 # IfFileExists "$VIM" 0 No_Vim | |
117 # StrCpy $INSTDIR "$VIM" | |
118 # No_Vim: | |
119 | |
120 # User variables: | |
121 # $0 - holds the directory the executables are installed to | |
122 # $1 - holds the parameters to be passed to install.exe. Starts with OLE | |
123 # registration (since a non-OLE gvim will not complain, and we want to | |
124 # always register an OLE gvim). | |
125 # $2 - holds the names to create batch files for | |
126 StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}" | |
127 StrCpy $1 "-register-OLE" | |
801 | 128 StrCpy $2 "gvim evim gview gvimdiff vimtutor" |
7 | 129 |
130 FunctionEnd | |
131 | |
132 Function .onUserAbort | |
133 MessageBox MB_YESNO|MB_ICONQUESTION "Abort install?" IDYES NoCancelAbort | |
134 Abort ; causes installer to not quit. | |
135 NoCancelAbort: | |
136 FunctionEnd | |
137 | |
138 # We only accept the directory if it ends in "vim". Using .onVerifyInstDir has | |
139 # the disadvantage that the browse dialog is difficult to use. | |
140 Function CheckInstallDir | |
141 FunctionEnd | |
142 | |
143 Function .onInstSuccess | |
144 WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe | |
145 MessageBox MB_YESNO|MB_ICONQUESTION \ | |
1618 | 146 "The installation process has been successful. Happy Vimming! \ |
7 | 147 $\n$\n Do you want to see the README file now?" IDNO NoReadme |
148 Exec '$0\gvim.exe -R "$0\README.txt"' | |
149 NoReadme: | |
150 FunctionEnd | |
151 | |
152 Function .onInstFailed | |
153 MessageBox MB_OK|MB_ICONEXCLAMATION "Installation failed. Better luck next time." | |
154 FunctionEnd | |
155 | |
156 Function un.onUnInstSuccess | |
157 MessageBox MB_OK|MB_ICONINFORMATION \ | |
158 "Vim ${VER_MAJOR}.${VER_MINOR} has been (partly) removed from your system" | |
159 FunctionEnd | |
160 | |
161 Function un.GetParent | |
162 Exch $0 ; old $0 is on top of stack | |
163 Push $1 | |
164 Push $2 | |
165 StrCpy $1 -1 | |
166 loop: | |
167 StrCpy $2 $0 1 $1 | |
168 StrCmp $2 "" exit | |
169 StrCmp $2 "\" exit | |
170 IntOp $1 $1 - 1 | |
171 Goto loop | |
172 exit: | |
173 StrCpy $0 $0 $1 | |
174 Pop $2 | |
175 Pop $1 | |
176 Exch $0 ; put $0 on top of stack, restore $0 to original value | |
177 FunctionEnd | |
178 | |
179 ########################################################## | |
180 Section "Vim executables and runtime files" | |
181 SectionIn 1 2 3 | |
182 | |
183 # we need also this here if the user changes the instdir | |
184 StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}" | |
185 | |
186 SetOutPath $0 | |
187 File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe | |
188 File /oname=install.exe ${VIMSRC}\installw32.exe | |
189 File /oname=uninstal.exe ${VIMSRC}\uninstalw32.exe | |
190 File ${VIMSRC}\vimrun.exe | |
191 File /oname=xxd.exe ${VIMSRC}\xxdw32.exe | |
192 File ${VIMTOOLS}\diff.exe | |
193 File ${VIMRT}\vimtutor.bat | |
194 File ${VIMRT}\README.txt | |
195 File ..\uninstal.txt | |
196 File ${VIMRT}\*.vim | |
197 File ${VIMRT}\rgb.txt | |
198 | |
199 SetOutPath $0\colors | |
200 File ${VIMRT}\colors\*.* | |
201 | |
202 SetOutPath $0\compiler | |
203 File ${VIMRT}\compiler\*.* | |
204 | |
205 SetOutPath $0\doc | |
206 File ${VIMRT}\doc\*.txt | |
207 File ${VIMRT}\doc\tags | |
208 | |
209 SetOutPath $0\ftplugin | |
210 File ${VIMRT}\ftplugin\*.* | |
211 | |
212 SetOutPath $0\indent | |
213 File ${VIMRT}\indent\*.* | |
214 | |
215 SetOutPath $0\macros | |
216 File ${VIMRT}\macros\*.* | |
217 | |
218 SetOutPath $0\plugin | |
219 File ${VIMRT}\plugin\*.* | |
220 | |
801 | 221 SetOutPath $0\autoload |
222 File ${VIMRT}\autoload\*.* | |
223 | |
827 | 224 SetOutPath $0\autoload\xml |
225 File ${VIMRT}\autoload\xml\*.* | |
226 | |
7 | 227 SetOutPath $0\syntax |
228 File ${VIMRT}\syntax\*.* | |
229 | |
799 | 230 SetOutPath $0\spell |
231 File ${VIMRT}\spell\*.txt | |
232 File ${VIMRT}\spell\*.vim | |
233 File ${VIMRT}\spell\*.spl | |
234 File ${VIMRT}\spell\*.sug | |
235 | |
7 | 236 SetOutPath $0\tools |
237 File ${VIMRT}\tools\*.* | |
238 | |
239 SetOutPath $0\tutor | |
240 File ${VIMRT}\tutor\*.* | |
241 SectionEnd | |
242 | |
243 ########################################################## | |
244 Section "Vim console program (vim.exe)" | |
245 SectionIn 1 3 | |
246 | |
247 SetOutPath $0 | |
248 ReadRegStr $R0 HKLM \ | |
249 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion | |
250 IfErrors 0 lbl_winnt | |
5128
3dafc80e781b
updated for version 7.3.1307
Bram Moolenaar <bram@vim.org>
parents:
2577
diff
changeset
|
251 # Windows 95/98/ME: not supported |
7 | 252 Goto lbl_done |
253 lbl_winnt: | |
5134
b49784c49d53
updated for version 7.3.1310
Bram Moolenaar <bram@vim.org>
parents:
5128
diff
changeset
|
254 # Windows NT/2000/XP and later |
7 | 255 File /oname=vim.exe ${VIMSRC}\vimw32.exe |
256 lbl_done: | |
257 StrCpy $2 "$2 vim view vimdiff" | |
258 SectionEnd | |
259 | |
260 ########################################################## | |
261 Section "Create .bat files for command line use" | |
262 SectionIn 3 | |
263 | |
264 StrCpy $1 "$1 -create-batfiles $2" | |
265 SectionEnd | |
266 | |
267 ########################################################## | |
268 Section "Create icons on the Desktop" | |
269 SectionIn 1 3 | |
270 | |
271 StrCpy $1 "$1 -install-icons" | |
272 SectionEnd | |
273 | |
274 ########################################################## | |
275 Section "Add Vim to the Start Menu" | |
276 SectionIn 1 3 | |
277 | |
278 StrCpy $1 "$1 -add-start-menu" | |
279 SectionEnd | |
280 | |
281 ########################################################## | |
282 Section "Add an Edit-with-Vim context menu entry" | |
283 SectionIn 1 3 | |
284 | |
285 # Be aware of this sequence of events: | |
286 # - user uninstalls Vim, gvimext.dll can't be removed (it's in use) and | |
287 # is scheduled to be removed at next reboot. | |
288 # - user installs Vim in same directory, gvimext.dll still exists. | |
289 # If we now skip installing gvimext.dll, it will disappear at the next | |
290 # reboot. Thus when copying gvimext.dll fails always schedule it to be | |
291 # installed at the next reboot. Can't use UpgradeDLL! | |
292 # We don't ask the user to reboot, the old dll will keep on working. | |
293 SetOutPath $0 | |
294 ClearErrors | |
295 SetOverwrite try | |
2217
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
296 ${If} ${RunningX64} |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
297 File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext64.dll |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
298 ${Else} |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
299 File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext.dll |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
300 ${EndIf} |
7 | 301 IfErrors 0 GvimExtDone |
302 | |
303 # Can't copy gvimext.dll, create it under another name and rename it on | |
304 # next reboot. | |
305 GetTempFileName $3 $0 | |
2217
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
306 ${If} ${RunningX64} |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
307 File /oname=$3 ${VIMSRC}\GvimExt\gvimext64.dll |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
308 ${Else} |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
309 File /oname=$3 ${VIMSRC}\GvimExt\gvimext.dll |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
310 ${EndIf} |
7 | 311 Rename /REBOOTOK $3 $0\gvimext.dll |
312 | |
313 GvimExtDone: | |
314 SetOverwrite lastused | |
315 | |
316 # We don't have a separate entry for the "Open With..." menu, assume | |
317 # the user wants either both or none. | |
318 StrCpy $1 "$1 -install-popup -install-openwith" | |
319 SectionEnd | |
320 | |
321 ########################################################## | |
322 Section "Create a _vimrc if it doesn't exist" | |
323 SectionIn 1 3 | |
324 | |
325 StrCpy $1 "$1 -create-vimrc" | |
326 SectionEnd | |
327 | |
328 ########################################################## | |
329 Section "Create plugin directories in HOME or VIM" | |
330 SectionIn 1 3 | |
331 | |
332 StrCpy $1 "$1 -create-directories home" | |
333 SectionEnd | |
334 | |
335 ########################################################## | |
336 Section "Create plugin directories in VIM" | |
337 SectionIn 3 | |
338 | |
339 StrCpy $1 "$1 -create-directories vim" | |
340 SectionEnd | |
341 | |
342 ########################################################## | |
343 Section "VisVim Extension for MS Visual Studio" | |
344 SectionIn 3 | |
345 | |
346 SetOutPath $0 | |
347 !insertmacro UpgradeDLL "${VIMSRC}\VisVim\VisVim.dll" "$0\VisVim.dll" "$0" | |
348 File ${VIMSRC}\VisVim\README_VisVim.txt | |
349 SectionEnd | |
350 | |
351 ########################################################## | |
352 !ifdef HAVE_NLS | |
353 Section "Native Language Support" | |
354 SectionIn 1 3 | |
355 | |
356 SetOutPath $0\lang | |
357 File /r ${VIMRT}\lang\*.* | |
358 SetOutPath $0\keymap | |
359 File ${VIMRT}\keymap\README.txt | |
360 File ${VIMRT}\keymap\*.vim | |
361 SetOutPath $0 | |
7613
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
362 File ${VIMRT}\libintl-8.dll |
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
363 File ${VIMRT}\libiconv-2.dll |
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
364 File /nonfatal ${VIMRT}\libwinpthread-1.dll |
7 | 365 SectionEnd |
366 !endif | |
367 | |
368 ########################################################## | |
369 Section -call_install_exe | |
370 SetOutPath $0 | |
371 ExecWait "$0\install.exe $1" | |
372 SectionEnd | |
373 | |
374 ########################################################## | |
375 Section -post | |
376 BringToFront | |
377 SectionEnd | |
378 | |
379 ########################################################## | |
380 Section Uninstall | |
381 # Apparently $INSTDIR is set to the directory where the uninstaller is | |
382 # created. Thus the "vim61" directory is included in it. | |
383 StrCpy $0 "$INSTDIR" | |
384 | |
385 # If VisVim was installed, unregister the DLL. | |
386 IfFileExists "$0\VisVim.dll" Has_VisVim No_VisVim | |
387 Has_VisVim: | |
388 ExecWait "regsvr32.exe /u /s $0\VisVim.dll" | |
389 | |
390 No_VisVim: | |
391 | |
392 # delete the context menu entry and batch files | |
393 ExecWait "$0\uninstal.exe -nsis" | |
394 | |
395 # We may have been put to the background when uninstall did something. | |
396 BringToFront | |
397 | |
398 # ask the user if the Vim version dir must be removed | |
399 MessageBox MB_YESNO|MB_ICONQUESTION \ | |
400 "Would you like to delete $0?$\n \ | |
401 $\nIt contains the Vim executables and runtime files." IDNO NoRemoveExes | |
402 | |
403 Delete /REBOOTOK $0\*.dll | |
404 ClearErrors | |
405 # Remove everything but *.dll files. Avoids that | |
406 # a lot remains when gvimext.dll cannot be deleted. | |
879 | 407 RMDir /r $0\autoload |
7 | 408 RMDir /r $0\colors |
409 RMDir /r $0\compiler | |
410 RMDir /r $0\doc | |
411 RMDir /r $0\ftplugin | |
412 RMDir /r $0\indent | |
413 RMDir /r $0\macros | |
414 RMDir /r $0\plugin | |
879 | 415 RMDir /r $0\spell |
7 | 416 RMDir /r $0\syntax |
417 RMDir /r $0\tools | |
418 RMDir /r $0\tutor | |
419 RMDir /r $0\VisVim | |
420 RMDir /r $0\lang | |
421 RMDir /r $0\keymap | |
422 Delete $0\*.exe | |
423 Delete $0\*.bat | |
424 Delete $0\*.vim | |
425 Delete $0\*.txt | |
426 | |
427 IfErrors ErrorMess NoErrorMess | |
428 ErrorMess: | |
429 MessageBox MB_OK|MB_ICONEXCLAMATION \ | |
430 "Some files in $0 have not been deleted!$\nYou must do it manually." | |
431 NoErrorMess: | |
432 | |
433 # No error message if the "vim62" directory can't be removed, the | |
434 # gvimext.dll may still be there. | |
435 RMDir $0 | |
436 | |
437 NoRemoveExes: | |
438 # get the parent dir of the installation | |
439 Push $INSTDIR | |
440 Call un.GetParent | |
441 Pop $0 | |
442 StrCpy $1 $0 | |
443 | |
444 # if a plugin dir was created at installation ask the user to remove it | |
445 # first look in the root of the installation then in HOME | |
446 IfFileExists $1\vimfiles AskRemove 0 | |
447 ReadEnvStr $1 "HOME" | |
448 StrCmp $1 "" NoRemove 0 | |
449 | |
450 IfFileExists $1\vimfiles 0 NoRemove | |
451 | |
452 AskRemove: | |
453 MessageBox MB_YESNO|MB_ICONQUESTION \ | |
2468
7f578da7edb2
Update version.h for 7.3c -> 7.3d.
Bram Moolenaar <bram@vim.org>
parents:
2465
diff
changeset
|
454 "Remove all files in your $1\vimfiles directory?$\n \ |
2449
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2439
diff
changeset
|
455 $\nCAREFUL: If you have created something there that you want to keep, click No" IDNO Fin |
7 | 456 RMDir /r $1\vimfiles |
457 NoRemove: | |
458 | |
459 # ask the user if the Vim root dir must be removed | |
460 MessageBox MB_YESNO|MB_ICONQUESTION \ | |
461 "Would you like to remove $0?$\n \ | |
462 $\nIt contains your Vim configuration files!" IDNO NoDelete | |
463 RMDir /r $0 ; skipped if no | |
464 NoDelete: | |
465 | |
466 Fin: | |
467 Call un.onUnInstSuccess | |
468 | |
469 SectionEnd |