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: subsys/system/usetup/usetup.h
23 * PURPOSE: Text-mode setup
24 * PROGRAMMER: Eric Kohl
35 #define WIN32_NO_STATUS
37 #define NTOS_MODE_USER
38 #include <ndk/ntndk.h>
39 #include <fmifs/fmifs.h>
42 #include <fslib/vfatlib.h>
44 /* DDK Disk Headers */
48 #include <reactos/buildno.h>
50 /* Internal Headers */
51 #include "interface/consup.h"
58 #include "filequeue.h"
72 #include "errorcode.h"
74 extern HANDLE ProcessHeap
;
75 extern UNICODE_STRING SourceRootPath
;
76 extern UNICODE_STRING SourceRootDir
;
77 extern UNICODE_STRING SourcePath
;
78 extern BOOLEAN IsUnattendedSetup
;
79 extern PWCHAR SelectedLanguageId
;
81 typedef enum _PAGE_NUMBER
89 // SCSI_CONTROLLER_PAGE,
92 COMPUTER_SETTINGS_PAGE
,
93 DISPLAY_SETTINGS_PAGE
,
94 KEYBOARD_SETTINGS_PAGE
,
97 SELECT_PARTITION_PAGE
,
98 CREATE_PARTITION_PAGE
,
99 DELETE_PARTITION_PAGE
,
101 SELECT_FILE_SYSTEM_PAGE
,
102 FORMAT_PARTITION_PAGE
,
103 CHECK_FILE_SYSTEM_PAGE
,
106 INSTALL_DIRECTORY_PAGE
,
110 BOOT_LOADER_FLOPPY_PAGE
,
111 BOOT_LOADER_HARDDISK_MBR_PAGE
,
112 BOOT_LOADER_HARDDISK_VBR_PAGE
,
119 REBOOT_PAGE
, /* virtual page */
120 } PAGE_NUMBER
, *PPAGE_NUMBER
;
122 #define POPUP_WAIT_NONE 0
123 #define POPUP_WAIT_ANY_KEY 1
124 #define POPUP_WAIT_ENTER 2
126 #define LIST_FOR_EACH(elem, list, type, field) \
127 for ((elem) = CONTAINING_RECORD((list)->Flink, type, field); \
128 &(elem)->field != (list) || (elem == NULL); \
129 (elem) = CONTAINING_RECORD((elem)->field.Flink, type, field))
131 #define InsertAscendingList(ListHead, NewEntry, Type, ListEntryField, SortField)\
133 PLIST_ENTRY current;\
135 current = (ListHead)->Flink;\
136 while (current != (ListHead))\
138 if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
139 (NewEntry)->SortField)\
143 current = current->Flink;\
146 InsertTailList(current, &((NewEntry)->ListEntryField));\