Mercurial > hg > xemacs-beta
comparison netinstall/localdir.cc @ 673:685b588e92d8
[xemacs-hg @ 2001-10-30 05:13:26 by andyp]
merge of windows 21.4.5 codeline
author | andyp |
---|---|
date | Tue, 30 Oct 2001 05:13:31 +0000 |
parents | 3078fd1074e8 |
children |
comparison
equal
deleted
inserted
replaced
672:42a8626b741e | 673:685b588e92d8 |
---|---|
10 * http://www.gnu.org/ | 10 * http://www.gnu.org/ |
11 * | 11 * |
12 * Written by Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru> | 12 * Written by Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru> |
13 * based on work and suggestions of DJ Delorie | 13 * based on work and suggestions of DJ Delorie |
14 * | 14 * |
15 * Sync'ed with cinstall 2001-10-16 | |
15 */ | 16 */ |
16 | 17 |
17 /* The purpose of this file is to ask the user where they want the | 18 /* The purpose of this file is to ask the user where they want the |
18 root of the installation to be, and to ask whether the user prefers | 19 root of the installation to be, and to ask whether the user prefers |
19 text or binary mounts. */ | 20 text or binary mounts. */ |
21 #include "win32.h" | 22 #include "win32.h" |
22 #include <shlobj.h> | 23 #include <shlobj.h> |
23 #include <stdio.h> | 24 #include <stdio.h> |
24 #include <stdlib.h> | 25 #include <stdlib.h> |
25 #include <ctype.h> | 26 #include <ctype.h> |
27 #include <io.h> | |
26 | 28 |
29 #include "mkdir.h" | |
27 #include "dialog.h" | 30 #include "dialog.h" |
28 #include "resource.h" | 31 #include "resource.h" |
29 #include "state.h" | 32 #include "state.h" |
30 #include "msg.h" | 33 #include "msg.h" |
31 #include "concat.h" | 34 #include "concat.h" |
100 browse (h); | 103 browse (h); |
101 break; | 104 break; |
102 | 105 |
103 case IDOK: | 106 case IDOK: |
104 save_dialog (h); | 107 save_dialog (h); |
108 if (_access (local_dir, 0) != 0 && yesno (IDS_CREATE_DIR, local_dir) == IDYES) | |
109 { | |
110 log (0, "Created install directory %s\n", local_dir); | |
111 mkdir_p (1, local_dir); | |
112 } | |
105 if (SetCurrentDirectoryA (local_dir)) | 113 if (SetCurrentDirectoryA (local_dir)) |
106 { | 114 { |
107 switch (source) | 115 switch (source) |
108 { | 116 { |
109 case IDC_SOURCE_DOWNLOAD: | 117 case IDC_SOURCE_DOWNLOAD: |
130 | 138 |
131 case IDCANCEL: | 139 case IDCANCEL: |
132 NEXT (0); | 140 NEXT (0); |
133 break; | 141 break; |
134 } | 142 } |
135 return FALSE; | |
136 } | 143 } |
137 | 144 |
138 static BOOL CALLBACK | 145 static BOOL CALLBACK |
139 dialog_proc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) | 146 dialog_proc (HWND h, UINT message, WPARAM wParam, LPARAM lParam) |
140 { | 147 { |