Mercurial > vim
annotate nsis/gvim.nsi @ 11831:2454134c3a7a
Added tag v8.0.0795 for changeset edc806552a6054e8c31f15029b76f1e88d893ee5
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 28 Jul 2017 17:15:05 +0200 |
parents | bafb447104f6 |
children | e18b9d7d8d78 |
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?" \ | |
11571
bafb447104f6
patch 8.0.0668: nsis installer script does not work
Christian Brabandt <cb@256bit.org>
parents:
11555
diff
changeset
|
90 /SD IDYES \ |
bafb447104f6
patch 8.0.0668: nsis installer script does not work
Christian Brabandt <cb@256bit.org>
parents:
11555
diff
changeset
|
91 IDYES NoAbort |
7 | 92 Abort ; causes installer to quit. |
93 NoAbort: | |
94 | |
95 # run the install program to check for already installed versions | |
96 SetOutPath $TEMP | |
97 File /oname=install.exe ${VIMSRC}\installw32.exe | |
98 ExecWait "$TEMP\install.exe -uninstall-check" | |
99 Delete $TEMP\install.exe | |
100 | |
101 # We may have been put to the background when uninstall did something. | |
102 BringToFront | |
103 | |
104 # Install will have created a file for us that contains the directory where | |
105 # we should install. This is $VIM if it's set. This appears to be the only | |
106 # way to get the value of $VIM here!? | |
107 ReadINIStr $INSTDIR $TEMP\vimini.ini vimini dir | |
108 Delete $TEMP\vimini.ini | |
109 | |
110 # If ReadINIStr failed or did not find a path: use the default dir. | |
111 StrCmp $INSTDIR "" 0 IniOK | |
112 StrCpy $INSTDIR "$PROGRAMFILES\Vim" | |
113 IniOK: | |
114 | |
115 # Should check for the value of $VIM and use it. Unfortunately I don't know | |
116 # how to obtain the value of $VIM | |
117 # IfFileExists "$VIM" 0 No_Vim | |
118 # StrCpy $INSTDIR "$VIM" | |
119 # No_Vim: | |
120 | |
121 # User variables: | |
122 # $0 - holds the directory the executables are installed to | |
123 # $1 - holds the parameters to be passed to install.exe. Starts with OLE | |
124 # registration (since a non-OLE gvim will not complain, and we want to | |
125 # always register an OLE gvim). | |
126 # $2 - holds the names to create batch files for | |
127 StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}" | |
128 StrCpy $1 "-register-OLE" | |
801 | 129 StrCpy $2 "gvim evim gview gvimdiff vimtutor" |
7 | 130 |
131 FunctionEnd | |
132 | |
133 Function .onUserAbort | |
134 MessageBox MB_YESNO|MB_ICONQUESTION "Abort install?" IDYES NoCancelAbort | |
135 Abort ; causes installer to not quit. | |
136 NoCancelAbort: | |
137 FunctionEnd | |
138 | |
139 # We only accept the directory if it ends in "vim". Using .onVerifyInstDir has | |
140 # the disadvantage that the browse dialog is difficult to use. | |
141 Function CheckInstallDir | |
142 FunctionEnd | |
143 | |
144 Function .onInstSuccess | |
145 WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe | |
146 MessageBox MB_YESNO|MB_ICONQUESTION \ | |
1618 | 147 "The installation process has been successful. Happy Vimming! \ |
7 | 148 $\n$\n Do you want to see the README file now?" IDNO NoReadme |
149 Exec '$0\gvim.exe -R "$0\README.txt"' | |
150 NoReadme: | |
151 FunctionEnd | |
152 | |
153 Function .onInstFailed | |
154 MessageBox MB_OK|MB_ICONEXCLAMATION "Installation failed. Better luck next time." | |
155 FunctionEnd | |
156 | |
157 Function un.onUnInstSuccess | |
158 MessageBox MB_OK|MB_ICONINFORMATION \ | |
159 "Vim ${VER_MAJOR}.${VER_MINOR} has been (partly) removed from your system" | |
160 FunctionEnd | |
161 | |
162 Function un.GetParent | |
163 Exch $0 ; old $0 is on top of stack | |
164 Push $1 | |
165 Push $2 | |
166 StrCpy $1 -1 | |
167 loop: | |
168 StrCpy $2 $0 1 $1 | |
169 StrCmp $2 "" exit | |
170 StrCmp $2 "\" exit | |
171 IntOp $1 $1 - 1 | |
172 Goto loop | |
173 exit: | |
174 StrCpy $0 $0 $1 | |
175 Pop $2 | |
176 Pop $1 | |
177 Exch $0 ; put $0 on top of stack, restore $0 to original value | |
178 FunctionEnd | |
179 | |
180 ########################################################## | |
181 Section "Vim executables and runtime files" | |
182 SectionIn 1 2 3 | |
183 | |
184 # we need also this here if the user changes the instdir | |
185 StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}" | |
186 | |
187 SetOutPath $0 | |
188 File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe | |
189 File /oname=install.exe ${VIMSRC}\installw32.exe | |
190 File /oname=uninstal.exe ${VIMSRC}\uninstalw32.exe | |
191 File ${VIMSRC}\vimrun.exe | |
10028
62b7fb15ff7e
commit https://github.com/vim/vim/commit/fec246d2c595164ac3b7e9fe9677053d3739b834
Christian Brabandt <cb@256bit.org>
parents:
9005
diff
changeset
|
192 File /oname=tee.exe ${VIMSRC}\teew32.exe |
7 | 193 File /oname=xxd.exe ${VIMSRC}\xxdw32.exe |
194 File ${VIMTOOLS}\diff.exe | |
195 File ${VIMRT}\vimtutor.bat | |
196 File ${VIMRT}\README.txt | |
197 File ..\uninstal.txt | |
198 File ${VIMRT}\*.vim | |
199 File ${VIMRT}\rgb.txt | |
200 | |
201 SetOutPath $0\colors | |
202 File ${VIMRT}\colors\*.* | |
203 | |
204 SetOutPath $0\compiler | |
205 File ${VIMRT}\compiler\*.* | |
206 | |
207 SetOutPath $0\doc | |
208 File ${VIMRT}\doc\*.txt | |
209 File ${VIMRT}\doc\tags | |
210 | |
211 SetOutPath $0\ftplugin | |
212 File ${VIMRT}\ftplugin\*.* | |
213 | |
214 SetOutPath $0\indent | |
215 File ${VIMRT}\indent\*.* | |
216 | |
217 SetOutPath $0\macros | |
218 File ${VIMRT}\macros\*.* | |
219 | |
9005
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
220 SetOutPath $0\pack\dist\opt\dvorak\dvorak |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
221 File ${VIMRT}\pack\dist\opt\dvorak\dvorak\*.* |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
222 SetOutPath $0\pack\dist\opt\dvorak\plugin |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
223 File ${VIMRT}\pack\dist\opt\dvorak\plugin\*.* |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
224 |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
225 SetOutPath $0\pack\dist\opt\editexisting\plugin |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
226 File ${VIMRT}\pack\dist\opt\editexisting\plugin\*.* |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
227 |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
228 SetOutPath $0\pack\dist\opt\justify\plugin |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
229 File ${VIMRT}\pack\dist\opt\justify\plugin\*.* |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
230 |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
231 SetOutPath $0\pack\dist\opt\matchit\doc |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
232 File ${VIMRT}\pack\dist\opt\matchit\doc\*.* |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
233 SetOutPath $0\pack\dist\opt\matchit\plugin |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
234 File ${VIMRT}\pack\dist\opt\matchit\plugin\*.* |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
235 |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
236 SetOutPath $0\pack\dist\opt\shellmenu\plugin |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
237 File ${VIMRT}\pack\dist\opt\shellmenu\plugin\*.* |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
238 |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
239 SetOutPath $0\pack\dist\opt\swapmouse\plugin |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
240 File ${VIMRT}\pack\dist\opt\swapmouse\plugin\*.* |
c473a9393dc5
commit https://github.com/vim/vim/commit/c7baa43fdb3f5b001ba3e6eb05bf6e199698eeea
Christian Brabandt <cb@256bit.org>
parents:
7613
diff
changeset
|
241 |
7 | 242 SetOutPath $0\plugin |
243 File ${VIMRT}\plugin\*.* | |
244 | |
801 | 245 SetOutPath $0\autoload |
246 File ${VIMRT}\autoload\*.* | |
247 | |
827 | 248 SetOutPath $0\autoload\xml |
249 File ${VIMRT}\autoload\xml\*.* | |
250 | |
7 | 251 SetOutPath $0\syntax |
252 File ${VIMRT}\syntax\*.* | |
253 | |
799 | 254 SetOutPath $0\spell |
255 File ${VIMRT}\spell\*.txt | |
256 File ${VIMRT}\spell\*.vim | |
257 File ${VIMRT}\spell\*.spl | |
258 File ${VIMRT}\spell\*.sug | |
259 | |
7 | 260 SetOutPath $0\tools |
261 File ${VIMRT}\tools\*.* | |
262 | |
263 SetOutPath $0\tutor | |
264 File ${VIMRT}\tutor\*.* | |
265 SectionEnd | |
266 | |
267 ########################################################## | |
268 Section "Vim console program (vim.exe)" | |
269 SectionIn 1 3 | |
270 | |
271 SetOutPath $0 | |
272 ReadRegStr $R0 HKLM \ | |
273 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion | |
274 IfErrors 0 lbl_winnt | |
5128
3dafc80e781b
updated for version 7.3.1307
Bram Moolenaar <bram@vim.org>
parents:
2577
diff
changeset
|
275 # Windows 95/98/ME: not supported |
7 | 276 Goto lbl_done |
277 lbl_winnt: | |
5134
b49784c49d53
updated for version 7.3.1310
Bram Moolenaar <bram@vim.org>
parents:
5128
diff
changeset
|
278 # Windows NT/2000/XP and later |
7 | 279 File /oname=vim.exe ${VIMSRC}\vimw32.exe |
280 lbl_done: | |
281 StrCpy $2 "$2 vim view vimdiff" | |
282 SectionEnd | |
283 | |
284 ########################################################## | |
285 Section "Create .bat files for command line use" | |
286 SectionIn 3 | |
287 | |
288 StrCpy $1 "$1 -create-batfiles $2" | |
289 SectionEnd | |
290 | |
291 ########################################################## | |
292 Section "Create icons on the Desktop" | |
293 SectionIn 1 3 | |
294 | |
295 StrCpy $1 "$1 -install-icons" | |
296 SectionEnd | |
297 | |
298 ########################################################## | |
299 Section "Add Vim to the Start Menu" | |
300 SectionIn 1 3 | |
301 | |
302 StrCpy $1 "$1 -add-start-menu" | |
303 SectionEnd | |
304 | |
305 ########################################################## | |
306 Section "Add an Edit-with-Vim context menu entry" | |
307 SectionIn 1 3 | |
308 | |
309 # Be aware of this sequence of events: | |
310 # - user uninstalls Vim, gvimext.dll can't be removed (it's in use) and | |
311 # is scheduled to be removed at next reboot. | |
312 # - user installs Vim in same directory, gvimext.dll still exists. | |
313 # If we now skip installing gvimext.dll, it will disappear at the next | |
314 # reboot. Thus when copying gvimext.dll fails always schedule it to be | |
315 # installed at the next reboot. Can't use UpgradeDLL! | |
316 # We don't ask the user to reboot, the old dll will keep on working. | |
317 SetOutPath $0 | |
318 ClearErrors | |
319 SetOverwrite try | |
2217
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
320 ${If} ${RunningX64} |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
321 File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext64.dll |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
322 ${Else} |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
323 File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext.dll |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
324 ${EndIf} |
7 | 325 IfErrors 0 GvimExtDone |
326 | |
327 # Can't copy gvimext.dll, create it under another name and rename it on | |
328 # next reboot. | |
329 GetTempFileName $3 $0 | |
2217
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
330 ${If} ${RunningX64} |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
331 File /oname=$3 ${VIMSRC}\GvimExt\gvimext64.dll |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
332 ${Else} |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
333 File /oname=$3 ${VIMSRC}\GvimExt\gvimext.dll |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
334 ${EndIf} |
7 | 335 Rename /REBOOTOK $3 $0\gvimext.dll |
336 | |
337 GvimExtDone: | |
338 SetOverwrite lastused | |
339 | |
340 # We don't have a separate entry for the "Open With..." menu, assume | |
341 # the user wants either both or none. | |
342 StrCpy $1 "$1 -install-popup -install-openwith" | |
343 SectionEnd | |
344 | |
345 ########################################################## | |
346 Section "Create a _vimrc if it doesn't exist" | |
347 SectionIn 1 3 | |
348 | |
349 StrCpy $1 "$1 -create-vimrc" | |
350 SectionEnd | |
351 | |
352 ########################################################## | |
353 Section "Create plugin directories in HOME or VIM" | |
354 SectionIn 1 3 | |
355 | |
356 StrCpy $1 "$1 -create-directories home" | |
357 SectionEnd | |
358 | |
359 ########################################################## | |
360 Section "Create plugin directories in VIM" | |
361 SectionIn 3 | |
362 | |
363 StrCpy $1 "$1 -create-directories vim" | |
364 SectionEnd | |
365 | |
366 ########################################################## | |
367 Section "VisVim Extension for MS Visual Studio" | |
368 SectionIn 3 | |
369 | |
370 SetOutPath $0 | |
371 !insertmacro UpgradeDLL "${VIMSRC}\VisVim\VisVim.dll" "$0\VisVim.dll" "$0" | |
372 File ${VIMSRC}\VisVim\README_VisVim.txt | |
373 SectionEnd | |
374 | |
375 ########################################################## | |
376 !ifdef HAVE_NLS | |
377 Section "Native Language Support" | |
378 SectionIn 1 3 | |
379 | |
380 SetOutPath $0\lang | |
381 File /r ${VIMRT}\lang\*.* | |
382 SetOutPath $0\keymap | |
383 File ${VIMRT}\keymap\README.txt | |
384 File ${VIMRT}\keymap\*.vim | |
385 SetOutPath $0 | |
7613
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
386 File ${VIMRT}\libintl-8.dll |
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
387 File ${VIMRT}\libiconv-2.dll |
4456fa2d22e8
commit https://github.com/vim/vim/commit/286eacd3f6631e985089176fb1dff1bcf1a1d6b5
Christian Brabandt <cb@256bit.org>
parents:
7443
diff
changeset
|
388 File /nonfatal ${VIMRT}\libwinpthread-1.dll |
11042
5de2fb612f21
patch 8.0.0410: newer gettext/iconv library has extra dll file
Christian Brabandt <cb@256bit.org>
parents:
10028
diff
changeset
|
389 File /nonfatal ${VIMRT}\libgcc_s_sjlj-1.dll |
7 | 390 SectionEnd |
391 !endif | |
392 | |
393 ########################################################## | |
394 Section -call_install_exe | |
395 SetOutPath $0 | |
396 ExecWait "$0\install.exe $1" | |
397 SectionEnd | |
398 | |
399 ########################################################## | |
400 Section -post | |
401 BringToFront | |
402 SectionEnd | |
403 | |
404 ########################################################## | |
405 Section Uninstall | |
406 # Apparently $INSTDIR is set to the directory where the uninstaller is | |
407 # created. Thus the "vim61" directory is included in it. | |
408 StrCpy $0 "$INSTDIR" | |
409 | |
410 # If VisVim was installed, unregister the DLL. | |
411 IfFileExists "$0\VisVim.dll" Has_VisVim No_VisVim | |
412 Has_VisVim: | |
413 ExecWait "regsvr32.exe /u /s $0\VisVim.dll" | |
414 | |
415 No_VisVim: | |
416 | |
417 # delete the context menu entry and batch files | |
418 ExecWait "$0\uninstal.exe -nsis" | |
419 | |
420 # We may have been put to the background when uninstall did something. | |
421 BringToFront | |
422 | |
423 # ask the user if the Vim version dir must be removed | |
424 MessageBox MB_YESNO|MB_ICONQUESTION \ | |
425 "Would you like to delete $0?$\n \ | |
426 $\nIt contains the Vim executables and runtime files." IDNO NoRemoveExes | |
427 | |
428 Delete /REBOOTOK $0\*.dll | |
429 ClearErrors | |
430 # Remove everything but *.dll files. Avoids that | |
431 # a lot remains when gvimext.dll cannot be deleted. | |
879 | 432 RMDir /r $0\autoload |
7 | 433 RMDir /r $0\colors |
434 RMDir /r $0\compiler | |
435 RMDir /r $0\doc | |
436 RMDir /r $0\ftplugin | |
437 RMDir /r $0\indent | |
438 RMDir /r $0\macros | |
439 RMDir /r $0\plugin | |
879 | 440 RMDir /r $0\spell |
7 | 441 RMDir /r $0\syntax |
442 RMDir /r $0\tools | |
443 RMDir /r $0\tutor | |
444 RMDir /r $0\VisVim | |
445 RMDir /r $0\lang | |
446 RMDir /r $0\keymap | |
447 Delete $0\*.exe | |
448 Delete $0\*.bat | |
449 Delete $0\*.vim | |
450 Delete $0\*.txt | |
451 | |
452 IfErrors ErrorMess NoErrorMess | |
453 ErrorMess: | |
454 MessageBox MB_OK|MB_ICONEXCLAMATION \ | |
455 "Some files in $0 have not been deleted!$\nYou must do it manually." | |
456 NoErrorMess: | |
457 | |
458 # No error message if the "vim62" directory can't be removed, the | |
459 # gvimext.dll may still be there. | |
460 RMDir $0 | |
461 | |
462 NoRemoveExes: | |
463 # get the parent dir of the installation | |
464 Push $INSTDIR | |
465 Call un.GetParent | |
466 Pop $0 | |
467 StrCpy $1 $0 | |
468 | |
469 # if a plugin dir was created at installation ask the user to remove it | |
470 # first look in the root of the installation then in HOME | |
471 IfFileExists $1\vimfiles AskRemove 0 | |
472 ReadEnvStr $1 "HOME" | |
473 StrCmp $1 "" NoRemove 0 | |
474 | |
475 IfFileExists $1\vimfiles 0 NoRemove | |
476 | |
477 AskRemove: | |
478 MessageBox MB_YESNO|MB_ICONQUESTION \ | |
2468
7f578da7edb2
Update version.h for 7.3c -> 7.3d.
Bram Moolenaar <bram@vim.org>
parents:
2465
diff
changeset
|
479 "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
|
480 $\nCAREFUL: If you have created something there that you want to keep, click No" IDNO Fin |
7 | 481 RMDir /r $1\vimfiles |
482 NoRemove: | |
483 | |
484 # ask the user if the Vim root dir must be removed | |
485 MessageBox MB_YESNO|MB_ICONQUESTION \ | |
486 "Would you like to remove $0?$\n \ | |
487 $\nIt contains your Vim configuration files!" IDNO NoDelete | |
488 RMDir /r $0 ; skipped if no | |
489 NoDelete: | |
490 | |
491 Fin: | |
492 Call un.onUnInstSuccess | |
493 | |
494 SectionEnd |