2002-09-08 18:29:56 +00:00
|
|
|
/*
|
2002-10-29 18:40:02 +00:00
|
|
|
* ReactOS kernel
|
|
|
|
* Copyright (C) 2002 ReactOS Team
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
2009-10-27 10:34:16 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2002-10-29 18:40:02 +00:00
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS text-mode setup
|
|
|
|
* FILE: subsys/system/usetup/usetup.h
|
|
|
|
* PURPOSE: Text-mode setup
|
|
|
|
* PROGRAMMER: Eric Kohl
|
|
|
|
*/
|
2002-09-08 18:29:56 +00:00
|
|
|
|
2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2002-09-08 18:29:56 +00:00
|
|
|
|
2005-07-27 00:54:07 +00:00
|
|
|
/* C Headers */
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <stdio.h>
|
2005-09-17 22:00:35 +00:00
|
|
|
#include <stddef.h>
|
2005-07-27 00:54:07 +00:00
|
|
|
|
2005-06-20 22:49:45 +00:00
|
|
|
/* PSDK/NDK */
|
2005-11-18 23:19:48 +00:00
|
|
|
#define WIN32_NO_STATUS
|
2005-06-20 22:49:45 +00:00
|
|
|
#include <windows.h>
|
|
|
|
#define NTOS_MODE_USER
|
|
|
|
#include <ndk/ntndk.h>
|
2006-09-07 17:55:51 +00:00
|
|
|
#include <fmifs/fmifs.h>
|
2003-08-02 16:49:36 +00:00
|
|
|
|
2005-06-20 22:49:45 +00:00
|
|
|
/* VFAT */
|
|
|
|
#include <fslib/vfatlib.h>
|
2002-09-08 18:29:56 +00:00
|
|
|
|
2005-06-20 22:49:45 +00:00
|
|
|
/* DDK Disk Headers */
|
2005-12-01 21:37:19 +00:00
|
|
|
#include <ntddscsi.h>
|
2005-06-20 22:49:45 +00:00
|
|
|
|
|
|
|
/* ReactOS Version */
|
|
|
|
#include <reactos/buildno.h>
|
|
|
|
|
|
|
|
/* Internal Headers */
|
2006-11-10 18:20:00 +00:00
|
|
|
#include "interface/consup.h"
|
2005-06-20 22:49:45 +00:00
|
|
|
#include "partlist.h"
|
2006-08-31 09:13:03 +00:00
|
|
|
#include "inffile.h"
|
2005-06-20 22:49:45 +00:00
|
|
|
#include "inicache.h"
|
|
|
|
#include "progress.h"
|
2006-11-10 21:00:24 +00:00
|
|
|
#ifdef __REACTOS__
|
2006-09-01 12:58:56 +00:00
|
|
|
#include "filequeue.h"
|
2006-11-10 21:00:24 +00:00
|
|
|
#endif
|
2005-06-20 22:49:45 +00:00
|
|
|
#include "bootsup.h"
|
|
|
|
#include "registry.h"
|
|
|
|
#include "fslist.h"
|
2006-09-09 17:11:03 +00:00
|
|
|
#include "chkdsk.h"
|
2006-09-07 22:42:28 +00:00
|
|
|
#include "format.h"
|
2005-06-20 22:49:45 +00:00
|
|
|
#include "cabinet.h"
|
|
|
|
#include "filesup.h"
|
|
|
|
#include "drivesup.h"
|
|
|
|
#include "genlist.h"
|
|
|
|
#include "settings.h"
|
2006-11-10 21:00:24 +00:00
|
|
|
#include "host.h"
|
2007-12-12 00:05:00 +00:00
|
|
|
#include "mui.h"
|
2007-12-15 14:24:02 +00:00
|
|
|
#include "errorcode.h"
|
2005-06-20 22:49:45 +00:00
|
|
|
|
|
|
|
extern HANDLE ProcessHeap;
|
|
|
|
extern UNICODE_STRING SourceRootPath;
|
2007-10-02 12:16:45 +00:00
|
|
|
extern UNICODE_STRING SourceRootDir;
|
2006-11-10 21:00:24 +00:00
|
|
|
extern UNICODE_STRING SourcePath;
|
2006-10-30 12:41:17 +00:00
|
|
|
extern BOOLEAN IsUnattendedSetup;
|
2007-12-25 20:24:19 +00:00
|
|
|
extern PWCHAR SelectedLanguageId;
|
2006-10-30 12:41:17 +00:00
|
|
|
|
2007-12-12 00:05:00 +00:00
|
|
|
typedef enum _PAGE_NUMBER
|
|
|
|
{
|
2007-12-13 16:15:43 +00:00
|
|
|
START_PAGE,
|
2007-12-23 20:29:52 +00:00
|
|
|
LANGUAGE_PAGE,
|
2007-12-12 00:05:00 +00:00
|
|
|
INTRO_PAGE,
|
|
|
|
LICENSE_PAGE,
|
|
|
|
INSTALL_INTRO_PAGE,
|
|
|
|
|
|
|
|
// SCSI_CONTROLLER_PAGE,
|
|
|
|
|
|
|
|
DEVICE_SETTINGS_PAGE,
|
|
|
|
COMPUTER_SETTINGS_PAGE,
|
|
|
|
DISPLAY_SETTINGS_PAGE,
|
|
|
|
KEYBOARD_SETTINGS_PAGE,
|
|
|
|
LAYOUT_SETTINGS_PAGE,
|
|
|
|
|
|
|
|
SELECT_PARTITION_PAGE,
|
|
|
|
CREATE_PARTITION_PAGE,
|
|
|
|
DELETE_PARTITION_PAGE,
|
|
|
|
|
|
|
|
SELECT_FILE_SYSTEM_PAGE,
|
|
|
|
FORMAT_PARTITION_PAGE,
|
|
|
|
CHECK_FILE_SYSTEM_PAGE,
|
|
|
|
|
|
|
|
PREPARE_COPY_PAGE,
|
|
|
|
INSTALL_DIRECTORY_PAGE,
|
|
|
|
FILE_COPY_PAGE,
|
|
|
|
REGISTRY_PAGE,
|
|
|
|
BOOT_LOADER_PAGE,
|
|
|
|
BOOT_LOADER_FLOPPY_PAGE,
|
|
|
|
BOOT_LOADER_HARDDISK_PAGE,
|
|
|
|
|
|
|
|
REPAIR_INTRO_PAGE,
|
|
|
|
|
|
|
|
SUCCESS_PAGE,
|
|
|
|
QUIT_PAGE,
|
|
|
|
FLUSH_PAGE,
|
|
|
|
REBOOT_PAGE, /* virtual page */
|
|
|
|
} PAGE_NUMBER, *PPAGE_NUMBER;
|
|
|
|
|
|
|
|
#define POPUP_WAIT_NONE 0
|
|
|
|
#define POPUP_WAIT_ANY_KEY 1
|
|
|
|
#define POPUP_WAIT_ENTER 2
|
|
|
|
|
2009-01-25 16:13:16 +00:00
|
|
|
#define LIST_FOR_EACH(elem, list, type, field) \
|
|
|
|
for ((elem) = CONTAINING_RECORD((list)->Flink, type, field); \
|
|
|
|
&(elem)->field != (list) || (elem == NULL); \
|
|
|
|
(elem) = CONTAINING_RECORD((elem)->field.Flink, type, field))
|
|
|
|
|
|
|
|
#define InsertAscendingList(ListHead, NewEntry, Type, ListEntryField, SortField)\
|
|
|
|
{\
|
|
|
|
PLIST_ENTRY current;\
|
|
|
|
\
|
|
|
|
current = (ListHead)->Flink;\
|
|
|
|
while (current != (ListHead))\
|
|
|
|
{\
|
|
|
|
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
|
|
|
|
(NewEntry)->SortField)\
|
|
|
|
{\
|
|
|
|
break;\
|
|
|
|
}\
|
|
|
|
current = current->Flink;\
|
|
|
|
}\
|
|
|
|
\
|
|
|
|
InsertTailList(current, &((NewEntry)->ListEntryField));\
|
|
|
|
}
|
2007-12-12 00:05:00 +00:00
|
|
|
|
2002-10-03 18:34:09 +00:00
|
|
|
/* EOF */
|