3 * Copyright (C) 2004-2008 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 * COPYRIGHT: See COPYING in the top level directory
21 * PROJECT: ReactOS GUI first stage setup application
22 * FILE: base/setup/reactos/reactos.c
23 * PROGRAMMERS: Matthias Kupfer
24 * Dmitry Chapyshev (dmitry@reactos.org)
36 #define WIN32_NO_STATUS
44 /**/#include <setupapi.h>/**/
46 // #include <wine/unicode.h>
48 #define NTOS_MODE_USER
49 #include <ndk/cmtypes.h> // For CM_DISK stuff
50 #include <ndk/iofuncs.h> // For NtCreate/OpenFile
51 #include <ndk/rtlfuncs.h>
54 /* Setup library headers */
55 // #include <reactos/rosioctl.h>
56 #include <../lib/setuplib.h>
57 // #include "errorcode.h"
66 typedef struct _KBLAYOUT
69 TCHAR LayoutName
[128];
71 } KBLAYOUT
, *PKBLAYOUT
;
73 // generic entries with simple 1:1 mapping
74 typedef struct _GENENTRY
78 } GENENTRY
, *PGENENTRY
;
81 typedef struct _SETUPDATA
89 TCHAR szAbortMessage
[512];
90 TCHAR szAbortTitle
[64];
92 USETUP_DATA USetupData
;
96 LONG DestPartSize
; // if partition doesn't exist, size of partition
97 LONG FSType
; // file system type on partition
98 LONG FormatPart
; // type of format the partition
100 LONG SelectedLangId
; // selected language (table index)
101 LONG SelectedKBLayout
; // selected keyboard layout (table index)
102 LONG SelectedComputer
; // selected computer type (table index)
103 LONG SelectedDisplay
; // selected display type (table index)
104 LONG SelectedKeyboard
; // selected keyboard type (table index)
106 BOOLEAN RepairUpdateFlag
; // flag for update/repair an installed reactos
111 LONG DefaultLang
; // default language (table index)
114 LONG DefaultKBLayout
; // default keyboard layout (table index)
115 PKBLAYOUT pKbLayouts
;
117 PGENENTRY pComputers
;
121 PGENENTRY pKeyboards
;
126 // LONG DefaultLang; // default language (table index)
127 // LONG DefaultKBLayout; // default keyboard layout (table index)
128 PWCHAR SelectedLanguageId
;
129 WCHAR DefaultLanguage
[20]; // Copy of string inside LanguageList
130 WCHAR DefaultKBLayout
[20]; // Copy of string inside KeyboardList
132 PGENERIC_LIST ComputerList
;
133 PGENERIC_LIST DisplayList
;
134 PGENERIC_LIST KeyboardList
;
135 PGENERIC_LIST LayoutList
;
136 PGENERIC_LIST LanguageList
;
138 PPARTLIST PartitionList
;
139 PNTOS_INSTALLATION CurrentInstallation
;
140 PGENERIC_LIST NtOsInstallsList
;
143 } SETUPDATA
, *PSETUPDATA
;
145 extern HANDLE ProcessHeap
;
146 extern BOOLEAN IsUnattendedSetup
;
149 typedef struct _IMGINFO
154 } IMGINFO
, *PIMGINFO
;
158 * Attempts to convert a pure NT file path into a corresponding Win32 path.
159 * Adapted from GetInstallSourceWin32() in dll/win32/syssetup/wizard.c
162 ConvertNtPathToWin32Path(
165 IN PCWSTR pwszNTPath
);
171 CreateListViewColumns(
172 IN HINSTANCE hInstance
,
173 IN HWND hWndListView
,
175 IN
const INT
* pColsWidth
,
176 IN
const INT
* pColsAlign
,
177 IN UINT nNumOfColumns
);
187 #endif /* _REACTOS_PCH_ */