3 * Copyright (C) 2002 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 text-mode setup
22 * FILE: base/setup/usetup/usetup.h
23 * PURPOSE: Text-mode setup
24 * PROGRAMMER: Eric Kohl
35 #define WIN32_NO_STATUS
44 #define NTOS_MODE_USER
45 #include <ndk/cmfuncs.h>
46 #include <ndk/exfuncs.h>
47 #include <ndk/iofuncs.h>
48 #include <ndk/kefuncs.h>
49 #include <ndk/mmfuncs.h>
50 #include <ndk/obfuncs.h>
51 #include <ndk/psfuncs.h>
52 #include <ndk/rtlfuncs.h>
53 #include <ndk/setypes.h>
55 /* Filesystem headers */
56 #include <reactos/rosioctl.h>
57 #include <fslib/vfatlib.h>
58 #include <fslib/ext2lib.h>
59 // #include <fslib/ntfslib.h>
61 /* Internal Headers */
67 #include "filequeue.h"
75 #include "errorcode.h"
77 extern HANDLE ProcessHeap
;
78 extern UNICODE_STRING SourceRootPath
;
79 extern UNICODE_STRING SourceRootDir
;
80 extern UNICODE_STRING SourcePath
;
81 extern BOOLEAN IsUnattendedSetup
;
82 extern PWCHAR SelectedLanguageId
;
84 extern VOID
InfSetHeap(PVOID Heap
);
85 extern VOID
InfCloseFile(HINF InfHandle
);
86 extern BOOLEAN
InfFindNextLine(PINFCONTEXT ContextIn
,
87 PINFCONTEXT ContextOut
);
88 extern BOOLEAN
InfGetBinaryField(PINFCONTEXT Context
,
91 ULONG ReturnBufferSize
,
93 extern BOOLEAN
InfGetMultiSzField(PINFCONTEXT Context
,
96 ULONG ReturnBufferSize
,
98 extern BOOLEAN
InfGetStringField(PINFCONTEXT Context
,
101 ULONG ReturnBufferSize
,
102 PULONG RequiredSize
);
104 #define SetupCloseInfFile InfCloseFile
105 #define SetupFindNextLine InfFindNextLine
106 #define SetupGetBinaryField InfGetBinaryField
107 #define SetupGetMultiSzFieldW InfGetMultiSzField
108 #define SetupGetStringFieldW InfGetStringField
110 #ifndef _PAGE_NUMBER_DEFINED
111 #define _PAGE_NUMBER_DEFINED
112 typedef enum _PAGE_NUMBER
120 // SCSI_CONTROLLER_PAGE,
122 DEVICE_SETTINGS_PAGE
,
123 COMPUTER_SETTINGS_PAGE
,
124 DISPLAY_SETTINGS_PAGE
,
125 KEYBOARD_SETTINGS_PAGE
,
126 LAYOUT_SETTINGS_PAGE
,
128 SELECT_PARTITION_PAGE
,
129 CREATE_PRIMARY_PARTITION_PAGE
,
130 CREATE_EXTENDED_PARTITION_PAGE
,
131 CREATE_LOGICAL_PARTITION_PAGE
,
132 CONFIRM_DELETE_SYSTEM_PARTITION_PAGE
,
133 DELETE_PARTITION_PAGE
,
135 SELECT_FILE_SYSTEM_PAGE
,
136 FORMAT_PARTITION_PAGE
,
137 CHECK_FILE_SYSTEM_PAGE
,
140 INSTALL_DIRECTORY_PAGE
,
144 BOOT_LOADER_FLOPPY_PAGE
,
145 BOOT_LOADER_HARDDISK_MBR_PAGE
,
146 BOOT_LOADER_HARDDISK_VBR_PAGE
,
153 REBOOT_PAGE
, /* virtual page */
154 RECOVERY_PAGE
, /* virtual page */
155 } PAGE_NUMBER
, *PPAGE_NUMBER
;
158 #define POPUP_WAIT_NONE 0
159 #define POPUP_WAIT_ANY_KEY 1
160 #define POPUP_WAIT_ENTER 2
162 #define InsertAscendingList(ListHead, NewEntry, Type, ListEntryField, SortField)\
164 PLIST_ENTRY current;\
166 current = (ListHead)->Flink;\
167 while (current != (ListHead))\
169 if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
170 (NewEntry)->SortField)\
174 current = current->Flink;\
177 InsertTailList(current, &((NewEntry)->ListEntryField));\
180 #endif /* _USETUP_PCH_ */