Mercurial > vim
annotate src/uninstal.c @ 8978:cf47625d9df9
Added tag v7.4.1774 for changeset b3da1ec8d1562a680722dd118c031764c2d8a508
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 22 Apr 2016 12:00:07 +0200 |
parents | 05b88224cea1 |
children | 4aead6a9b7a9 |
rev | line source |
---|---|
7 | 1 /* vi:set ts=8 sts=4 sw=4: |
2 * | |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * | |
5 * Do ":help uganda" in Vim to read copying and usage conditions. | |
6 * Do ":help credits" in Vim to see a list of people who contributed. | |
7 * See README.txt for an overview of the Vim source code. | |
8 */ | |
9 | |
10 /* | |
11 * uninstal.c: Minimalistic uninstall program for Vim on MS-Windows | |
12 * Removes: | |
13 * - the "Edit with Vim" popup menu entry | |
14 * - the Vim "Open With..." popup menu entry | |
15 * - any Vim Batch files in the path | |
16 * - icons for Vim on the Desktop | |
17 * - the Vim entry in the Start Menu | |
18 */ | |
19 | |
20 /* Include common code for dosinst.c and uninstal.c. */ | |
21 #include "dosinst.h" | |
22 | |
23 /* | |
24 * Return TRUE if the user types a 'y' or 'Y', FALSE otherwise. | |
25 */ | |
26 static int | |
27 confirm(void) | |
28 { | |
29 char answer[10]; | |
30 | |
31 fflush(stdout); | |
32 return (scanf(" %c", answer) == 1 && toupper(answer[0]) == 'Y'); | |
33 } | |
34 | |
35 #ifdef WIN3264 | |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
36 |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
37 static int |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
38 reg_delete_key(HKEY hRootKey, const char *key) |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
39 { |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
40 static int did_load = FALSE; |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
41 static HANDLE advapi_lib = NULL; |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
42 static LONG (WINAPI *delete_key_ex)(HKEY, LPCTSTR, REGSAM, DWORD) = NULL; |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
43 |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
44 if (!did_load) |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
45 { |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
46 /* The RegDeleteKeyEx() function is only available on new systems. It |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
47 * is required for 64-bit registry access. For other systems fall |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
48 * back to RegDeleteKey(). */ |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
49 did_load = TRUE; |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
50 advapi_lib = LoadLibrary("ADVAPI32.DLL"); |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
51 if (advapi_lib != NULL) |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
52 delete_key_ex = (LONG (WINAPI *)(HKEY, LPCTSTR, REGSAM, DWORD))GetProcAddress(advapi_lib, "RegDeleteKeyExA"); |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
53 } |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
54 if (delete_key_ex != NULL) { |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
55 return (*delete_key_ex)(hRootKey, key, KEY_WOW64_64KEY, 0); |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
56 } |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
57 return RegDeleteKey(hRootKey, key); |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
58 } |
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
59 |
7 | 60 /* |
61 * Check if the popup menu entry exists and what gvim it refers to. | |
62 * Returns non-zero when it's found. | |
63 */ | |
64 static int | |
65 popup_gvim_path(char *buf) | |
66 { | |
67 HKEY key_handle; | |
68 DWORD value_type; | |
69 DWORD bufsize = BUFSIZE; | |
70 int r; | |
71 | |
72 /* Open the key where the path to gvim.exe is stored. */ | |
2449
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
73 if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0, |
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
74 KEY_WOW64_64KEY | KEY_READ, &key_handle) != ERROR_SUCCESS) |
7 | 75 return 0; |
76 | |
77 /* get the DisplayName out of it to show the user */ | |
78 r = RegQueryValueEx(key_handle, "path", 0, | |
79 &value_type, (LPBYTE)buf, &bufsize); | |
80 RegCloseKey(key_handle); | |
81 | |
82 return (r == ERROR_SUCCESS); | |
83 } | |
84 | |
85 /* | |
86 * Check if the "Open With..." menu entry exists and what gvim it refers to. | |
87 * Returns non-zero when it's found. | |
88 */ | |
89 static int | |
90 openwith_gvim_path(char *buf) | |
91 { | |
92 HKEY key_handle; | |
93 DWORD value_type; | |
94 DWORD bufsize = BUFSIZE; | |
95 int r; | |
96 | |
97 /* Open the key where the path to gvim.exe is stored. */ | |
98 if (RegOpenKeyEx(HKEY_CLASSES_ROOT, | |
2449
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
99 "Applications\\gvim.exe\\shell\\edit\\command", 0, |
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
100 KEY_WOW64_64KEY | KEY_READ, &key_handle) != ERROR_SUCCESS) |
7 | 101 return 0; |
102 | |
103 /* get the DisplayName out of it to show the user */ | |
104 r = RegQueryValueEx(key_handle, "", 0, &value_type, (LPBYTE)buf, &bufsize); | |
105 RegCloseKey(key_handle); | |
106 | |
107 return (r == ERROR_SUCCESS); | |
108 } | |
109 | |
110 static void | |
111 remove_popup(void) | |
112 { | |
113 int fail = 0; | |
114 HKEY kh; | |
115 | |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
116 if (reg_delete_key(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}\\InProcServer32") != ERROR_SUCCESS) |
7 | 117 ++fail; |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
118 if (reg_delete_key(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}") != ERROR_SUCCESS) |
7 | 119 ++fail; |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
120 if (reg_delete_key(HKEY_CLASSES_ROOT, "*\\shellex\\ContextMenuHandlers\\gvim") != ERROR_SUCCESS) |
7 | 121 ++fail; |
2449
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
122 if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", 0, |
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
123 KEY_WOW64_64KEY | KEY_ALL_ACCESS, &kh) != ERROR_SUCCESS) |
7 | 124 ++fail; |
125 else | |
126 { | |
127 if (RegDeleteValue(kh, "{51EEE242-AD87-11d3-9C1E-0090278BBD99}") != ERROR_SUCCESS) | |
128 ++fail; | |
129 RegCloseKey(kh); | |
130 } | |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
131 if (reg_delete_key(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim") != ERROR_SUCCESS) |
7 | 132 ++fail; |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
133 if (reg_delete_key(HKEY_LOCAL_MACHINE, "Software\\Vim") != ERROR_SUCCESS) |
7 | 134 ++fail; |
135 | |
136 if (fail == 6) | |
137 printf("No Vim popup registry entries could be removed\n"); | |
138 else if (fail > 0) | |
139 printf("Some Vim popup registry entries could not be removed\n"); | |
140 else | |
141 printf("The Vim popup registry entries have been removed\n"); | |
142 } | |
143 | |
144 static void | |
145 remove_openwith(void) | |
146 { | |
147 int fail = 0; | |
148 | |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
149 if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit\\command") != ERROR_SUCCESS) |
7 | 150 ++fail; |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
151 if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit") != ERROR_SUCCESS) |
7 | 152 ++fail; |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
153 if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell") != ERROR_SUCCESS) |
7 | 154 ++fail; |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
155 if (reg_delete_key(HKEY_CLASSES_ROOT, "Applications\\gvim.exe") != ERROR_SUCCESS) |
7 | 156 ++fail; |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
157 if (reg_delete_key(HKEY_CLASSES_ROOT, ".htm\\OpenWithList\\gvim.exe") != ERROR_SUCCESS) |
7 | 158 ++fail; |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
159 if (reg_delete_key(HKEY_CLASSES_ROOT, ".vim\\OpenWithList\\gvim.exe") != ERROR_SUCCESS) |
7 | 160 ++fail; |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
161 if (reg_delete_key(HKEY_CLASSES_ROOT, "*\\OpenWithList\\gvim.exe") != ERROR_SUCCESS) |
7 | 162 ++fail; |
163 | |
164 if (fail == 7) | |
165 printf("No Vim open-with registry entries could be removed\n"); | |
166 else if (fail > 0) | |
167 printf("Some Vim open-with registry entries could not be removed\n"); | |
168 else | |
169 printf("The Vim open-with registry entries have been removed\n"); | |
170 } | |
171 #endif | |
172 | |
173 /* | |
174 * Check if a batch file is really for the current version. Don't delete a | |
175 * batch file that was written for another (possibly newer) version. | |
176 */ | |
177 static int | |
178 batfile_thisversion(char *path) | |
179 { | |
180 FILE *fd; | |
181 char line[BUFSIZE]; | |
182 char *p; | |
183 int ver_len = strlen(VIM_VERSION_NODOT); | |
184 int found = FALSE; | |
185 | |
186 fd = fopen(path, "r"); | |
187 if (fd != NULL) | |
188 { | |
189 while (fgets(line, BUFSIZE, fd) != NULL) | |
190 { | |
191 for (p = line; *p != 0; ++p) | |
192 /* don't accept "vim60an" when looking for "vim60". */ | |
193 if (strnicmp(p, VIM_VERSION_NODOT, ver_len) == 0 | |
194 && !isdigit(p[ver_len]) | |
195 && !isalpha(p[ver_len])) | |
196 { | |
197 found = TRUE; | |
198 break; | |
199 } | |
200 if (found) | |
201 break; | |
202 } | |
203 fclose(fd); | |
204 } | |
205 return found; | |
206 } | |
207 | |
208 static int | |
209 remove_batfiles(int doit) | |
210 { | |
211 char *batfile_path; | |
212 int i; | |
213 int found = 0; | |
214 | |
215 for (i = 1; i < TARGET_COUNT; ++i) | |
216 { | |
217 batfile_path = searchpath_save(targets[i].batname); | |
218 if (batfile_path != NULL && batfile_thisversion(batfile_path)) | |
219 { | |
220 ++found; | |
221 if (doit) | |
222 { | |
223 printf("removing %s\n", batfile_path); | |
224 remove(batfile_path); | |
225 } | |
226 else | |
227 printf(" - the batch file %s\n", batfile_path); | |
228 free(batfile_path); | |
229 } | |
230 } | |
231 return found; | |
232 } | |
233 | |
234 #ifdef WIN3264 | |
235 static void | |
236 remove_if_exists(char *path, char *filename) | |
237 { | |
238 char buf[BUFSIZE]; | |
239 FILE *fd; | |
240 | |
241 sprintf(buf, "%s\\%s", path, filename); | |
242 | |
243 fd = fopen(buf, "r"); | |
244 if (fd != NULL) | |
245 { | |
246 fclose(fd); | |
247 printf("removing %s\n", buf); | |
248 remove(buf); | |
249 } | |
250 } | |
251 | |
252 static void | |
253 remove_icons(void) | |
254 { | |
255 char path[BUFSIZE]; | |
256 int i; | |
257 | |
258 if (get_shell_folder_path(path, "desktop")) | |
259 for (i = 0; i < ICON_COUNT; ++i) | |
260 remove_if_exists(path, icon_link_names[i]); | |
261 } | |
262 | |
263 static void | |
264 remove_start_menu(void) | |
265 { | |
266 char path[BUFSIZE]; | |
267 int i; | |
268 struct stat st; | |
269 | |
270 if (get_shell_folder_path(path, VIM_STARTMENU)) | |
271 { | |
272 for (i = 1; i < TARGET_COUNT; ++i) | |
273 remove_if_exists(path, targets[i].lnkname); | |
274 remove_if_exists(path, "uninstall.lnk"); | |
275 remove_if_exists(path, "Help.lnk"); | |
276 /* Win95 uses .pif, WinNT uses .lnk */ | |
277 remove_if_exists(path, "Vim tutor.pif"); | |
278 remove_if_exists(path, "Vim tutor.lnk"); | |
279 remove_if_exists(path, "Vim online.url"); | |
280 if (stat(path, &st) == 0) | |
281 { | |
282 printf("removing %s\n", path); | |
283 rmdir(path); | |
284 } | |
285 } | |
286 } | |
287 #endif | |
288 | |
289 static void | |
290 delete_uninstall_key(void) | |
291 { | |
2475
7d1044b27eb5
Windows uninstaller: Instead of calling RegDeleteKeyEx() directly load it
Bram Moolenaar <bram@vim.org>
parents:
2466
diff
changeset
|
292 reg_delete_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT); |
7 | 293 } |
294 | |
295 int | |
296 main(int argc, char *argv[]) | |
297 { | |
298 int found = 0; | |
299 FILE *fd; | |
300 #ifdef WIN3264 | |
301 int i; | |
302 struct stat st; | |
303 char icon[BUFSIZE]; | |
304 char path[BUFSIZE]; | |
305 char popup_path[BUFSIZE]; | |
306 | |
307 /* The nsis uninstaller calls us with a "-nsis" argument. */ | |
308 if (argc == 2 && stricmp(argv[1], "-nsis") == 0) | |
309 interactive = FALSE; | |
310 else | |
311 #endif | |
312 interactive = TRUE; | |
313 | |
314 /* Initialize this program. */ | |
315 do_inits(argv); | |
316 | |
317 printf("This program will remove the following items:\n"); | |
318 | |
319 #ifdef WIN3264 | |
320 if (popup_gvim_path(popup_path)) | |
321 { | |
322 printf(" - the \"Edit with Vim\" entry in the popup menu\n"); | |
323 printf(" which uses \"%s\"\n", popup_path); | |
2217
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
324 if (interactive) |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
325 printf("\nRemove it (y/n)? "); |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
326 if (!interactive || confirm()) |
7 | 327 { |
328 remove_popup(); | |
329 /* Assume the "Open With" entry can be removed as well, don't | |
330 * bother the user with asking him again. */ | |
331 remove_openwith(); | |
332 } | |
333 } | |
334 else if (openwith_gvim_path(popup_path)) | |
335 { | |
336 printf(" - the Vim \"Open With...\" entry in the popup menu\n"); | |
337 printf(" which uses \"%s\"\n", popup_path); | |
338 printf("\nRemove it (y/n)? "); | |
339 if (confirm()) | |
340 remove_openwith(); | |
341 } | |
342 | |
343 if (get_shell_folder_path(path, "desktop")) | |
344 { | |
345 printf("\n"); | |
346 for (i = 0; i < ICON_COUNT; ++i) | |
347 { | |
348 sprintf(icon, "%s\\%s", path, icon_link_names[i]); | |
349 if (stat(icon, &st) == 0) | |
350 { | |
351 printf(" - the \"%s\" icon on the desktop\n", icon_names[i]); | |
352 ++found; | |
353 } | |
354 } | |
355 if (found > 0) | |
356 { | |
357 if (interactive) | |
358 printf("\nRemove %s (y/n)? ", found > 1 ? "them" : "it"); | |
359 if (!interactive || confirm()) | |
360 remove_icons(); | |
361 } | |
362 } | |
363 | |
364 if (get_shell_folder_path(path, VIM_STARTMENU) | |
365 && stat(path, &st) == 0) | |
366 { | |
367 printf("\n - the \"%s\" entry in the Start Menu\n", VIM_STARTMENU); | |
368 if (interactive) | |
369 printf("\nRemove it (y/n)? "); | |
370 if (!interactive || confirm()) | |
371 remove_start_menu(); | |
372 } | |
373 #endif | |
374 | |
375 printf("\n"); | |
376 found = remove_batfiles(0); | |
377 if (found > 0) | |
378 { | |
379 if (interactive) | |
380 printf("\nRemove %s (y/n)? ", found > 1 ? "them" : "it"); | |
381 if (!interactive || confirm()) | |
382 remove_batfiles(1); | |
383 } | |
384 | |
385 fd = fopen("gvim.exe", "r"); | |
386 if (fd != NULL) | |
387 { | |
388 fclose(fd); | |
389 printf("gvim.exe detected. Attempting to unregister gvim with OLE\n"); | |
390 system("gvim.exe -silent -unregister"); | |
391 } | |
392 | |
393 delete_uninstall_key(); | |
394 | |
395 if (interactive) | |
396 { | |
397 printf("\nYou may now want to delete the Vim executables and runtime files.\n"); | |
398 printf("(They are still where you unpacked them.)\n"); | |
399 } | |
400 | |
2217
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
401 if (interactive) |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
402 { |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
403 rewind(stdin); |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
404 printf("\nPress Enter to exit..."); |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
405 (void)getchar(); |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
406 } |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
407 else |
2287
573da4dac306
Make the dos installer work with more compilers.
Bram Moolenaar <bram@vim.org>
parents:
2217
diff
changeset
|
408 sleep(3); |
7 | 409 |
410 return 0; | |
411 } |