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
46 /**/#include <setupapi.h>/**/
49 #define NTOS_MODE_USER
50 #include <ndk/cmtypes.h> // For CM_DISK stuff
51 #include <ndk/iofuncs.h> // For NtCreate/OpenFile
52 #include <ndk/rtlfuncs.h>
55 /* Setup library headers */
56 // #include <reactos/rosioctl.h>
57 #include <../lib/setuplib.h>
58 // #include "errorcode.h"
61 typedef struct _KBLAYOUT
64 TCHAR LayoutName
[128];
66 } KBLAYOUT
, *PKBLAYOUT
;
70 typedef struct _SETUPDATA
78 TCHAR szAbortMessage
[512];
79 TCHAR szAbortTitle
[64];
81 USETUP_DATA USetupData
;
85 LONG DestPartSize
; // if partition doesn't exist, size of partition
86 LONG FSType
; // file system type on partition
87 LONG FormatPart
; // type of format the partition
89 LONG SelectedLangId
; // selected language (table index)
90 LONG SelectedKBLayout
; // selected keyboard layout (table index)
91 LONG SelectedComputer
; // selected computer type (table index)
92 LONG SelectedDisplay
; // selected display type (table index)
93 LONG SelectedKeyboard
; // selected keyboard type (table index)
95 BOOLEAN RepairUpdateFlag
; // flag for update/repair an installed reactos
98 /* txtsetup.sif data */
99 // LONG DefaultLang; // default language (table index)
100 // LONG DefaultKBLayout; // default keyboard layout (table index)
101 PCWSTR SelectedLanguageId
;
102 WCHAR DefaultLanguage
[20]; // Copy of string inside LanguageList
103 WCHAR DefaultKBLayout
[20]; // Copy of string inside KeyboardList
105 PGENERIC_LIST ComputerList
;
106 PGENERIC_LIST DisplayList
;
107 PGENERIC_LIST KeyboardList
;
108 PGENERIC_LIST LayoutList
;
109 PGENERIC_LIST LanguageList
;
111 PPARTLIST PartitionList
;
112 PNTOS_INSTALLATION CurrentInstallation
;
113 PGENERIC_LIST NtOsInstallsList
;
115 } SETUPDATA
, *PSETUPDATA
;
117 extern HANDLE ProcessHeap
;
118 extern BOOLEAN IsUnattendedSetup
;
121 typedef struct _IMGINFO
126 } IMGINFO
, *PIMGINFO
;
130 * Attempts to convert a pure NT file path into a corresponding Win32 path.
131 * Adapted from GetInstallSourceWin32() in dll/win32/syssetup/wizard.c
134 ConvertNtPathToWin32Path(
137 IN PCWSTR pwszNTPath
);
143 CreateListViewColumns(
144 IN HINSTANCE hInstance
,
145 IN HWND hWndListView
,
147 IN
const INT
* pColsWidth
,
148 IN
const INT
* pColsAlign
,
149 IN UINT nNumOfColumns
);
159 #endif /* _REACTOS_PCH_ */