Mercurial > hg > xemacs-beta
annotate netinstall/init.cc @ 5402:308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Thu, 14 Oct 2010 17:15:20 +0200 |
parents | 6504113e7c2d |
children |
rev | line source |
---|---|
819 | 1 /* Initialisation for netinstall. |
2 Copyright (C) 2001 Andy Piper. | |
3 | |
4 This file is part of XEmacs. | |
5 | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
819
diff
changeset
|
6 XEmacs is free software: you can redistribute it and/or modify it |
819 | 7 under the terms of the GNU General Public License as published by the |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
819
diff
changeset
|
8 Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
819
diff
changeset
|
9 option) any later version. |
819 | 10 |
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
819
diff
changeset
|
17 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
819 | 18 |
19 #include "win32.h" | |
20 #include <stdio.h> | |
21 #include <stdlib.h> | |
22 #include "dialog.h" | |
23 #include "log.h" | |
24 #include "resource.h" | |
25 #include "state.h" | |
26 #include "msg.h" | |
27 #include "regedit.h" | |
28 #include "reginfo.h" | |
29 #include "version.h" | |
30 | |
31 static void | |
32 init_root () | |
33 { | |
34 int isnative, issystem; | |
35 root_dir = find_root_location (&issystem, &isnative); | |
36 if (root_dir) | |
37 { | |
38 if (isnative) | |
39 install_type = IDC_INSTALL_NATIVE; | |
40 else | |
41 install_type = IDC_INSTALL_CYGWIN; | |
42 | |
43 if (issystem) | |
44 root_scope = IDC_ROOT_SYSTEM; | |
45 else | |
46 root_scope = IDC_ROOT_USER; | |
47 root_dir_default = 0; | |
48 } | |
49 } | |
50 | |
51 void | |
52 do_init (HINSTANCE h) | |
53 { | |
54 char cwd[_MAX_PATH]; | |
55 GetCurrentDirectory (sizeof (cwd), cwd); | |
56 local_dir = strdup (cwd); | |
57 log (0, "Current Directory: %s", cwd); | |
58 | |
59 HANDLE gnu = LoadImage (h, MAKEINTRESOURCE (IDB_GNU), | |
60 IMAGE_BITMAP, 0, 0, 0); | |
61 init_root(); | |
62 } | |
63 |