annotate nsis/gvim.nsi @ 5956:a076237d1c38 v7.4.319

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