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
|
2015-09-13 16:40:36 +00:00
|
|
|
* FILE: base/setup/usetup/usetup.h
|
2002-10-29 18:40:02 +00:00
|
|
|
* PURPOSE: Text-mode setup
|
2018-05-27 19:33:07 +00:00
|
|
|
* PROGRAMMER:
|
2002-10-29 18:40:02 +00:00
|
|
|
*/
|
2002-09-08 18:29:56 +00:00
|
|
|
|
2014-02-05 16:35:49 +00:00
|
|
|
#ifndef _USETUP_PCH_
|
|
|
|
#define _USETUP_PCH_
|
|
|
|
|
2005-07-27 00:54:07 +00:00
|
|
|
/* C Headers */
|
|
|
|
#include <stdio.h>
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <stdlib.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
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <winreg.h>
|
|
|
|
#include <winuser.h>
|
|
|
|
#include <wincon.h>
|
|
|
|
|
2005-06-20 22:49:45 +00:00
|
|
|
#define NTOS_MODE_USER
|
2011-08-17 13:59:47 +00:00
|
|
|
#include <ndk/cmfuncs.h>
|
|
|
|
#include <ndk/exfuncs.h>
|
|
|
|
#include <ndk/iofuncs.h>
|
|
|
|
#include <ndk/kefuncs.h>
|
|
|
|
#include <ndk/mmfuncs.h>
|
|
|
|
#include <ndk/obfuncs.h>
|
|
|
|
#include <ndk/psfuncs.h>
|
|
|
|
#include <ndk/rtlfuncs.h>
|
2014-08-30 07:04:57 +00:00
|
|
|
#include <ndk/setypes.h>
|
2003-08-02 16:49:36 +00:00
|
|
|
|
2017-05-13 16:13:49 +00:00
|
|
|
#include <ntstrsafe.h>
|
|
|
|
|
[SETUPLIB][USETUP] Introduce a 'SetupLib' library. CORE-13544
- Create the beginnings of a "setuplib" library, whose aim is to be shared between the (currently existing) 1st-stage text-mode installer, and the (future) 1st-stage GUI installer.
- Finish to split the GenList and PartList codes into their UI part, which remain in usetup, and their algorithmic part, which go into setuplib.
- Move SetMountedDeviceValue into the PartList module.
- Split the FileSystem list code into its UI and the algorithmic part (which goes into setuplib under the name fsutil.c).
* The algo part is meant to be able to manage the filesystems available on the running system, similarly to what is mostly done (in scattered form) in fmifs, format, chkdsk / autochk codes...
It also manages the partition filesystem recognition, using OS routines.
* The UI part manages the FS list as it appears on screen, showing only the possible FSes that can be used to format the selected partition (a bit similar to what we do in the shell32's drive.c, etc...).
- Adapt the calling code to these changes.
- Remove some "host" code that was dating back from the dark old times.
svn path=/branches/setup_improvements/; revision=74570
svn path=/branches/setup_improvements/; revision=74659
2017-05-17 23:37:41 +00:00
|
|
|
/* Setup library headers */
|
2016-02-02 01:55:05 +00:00
|
|
|
#include <reactos/rosioctl.h>
|
[SETUPLIB][USETUP] Introduce a 'SetupLib' library. CORE-13544
- Create the beginnings of a "setuplib" library, whose aim is to be shared between the (currently existing) 1st-stage text-mode installer, and the (future) 1st-stage GUI installer.
- Finish to split the GenList and PartList codes into their UI part, which remain in usetup, and their algorithmic part, which go into setuplib.
- Move SetMountedDeviceValue into the PartList module.
- Split the FileSystem list code into its UI and the algorithmic part (which goes into setuplib under the name fsutil.c).
* The algo part is meant to be able to manage the filesystems available on the running system, similarly to what is mostly done (in scattered form) in fmifs, format, chkdsk / autochk codes...
It also manages the partition filesystem recognition, using OS routines.
* The UI part manages the FS list as it appears on screen, showing only the possible FSes that can be used to format the selected partition (a bit similar to what we do in the shell32's drive.c, etc...).
- Adapt the calling code to these changes.
- Remove some "host" code that was dating back from the dark old times.
svn path=/branches/setup_improvements/; revision=74570
svn path=/branches/setup_improvements/; revision=74659
2017-05-17 23:37:41 +00:00
|
|
|
#include <../lib/setuplib.h>
|
|
|
|
// #include "errorcode.h"
|
2002-09-08 18:29:56 +00:00
|
|
|
|
2005-06-20 22:49:45 +00:00
|
|
|
/* Internal Headers */
|
2018-05-15 17:47:52 +00:00
|
|
|
#include "consup.h"
|
2006-08-31 09:13:03 +00:00
|
|
|
#include "inffile.h"
|
2005-06-20 22:49:45 +00:00
|
|
|
#include "progress.h"
|
2011-08-17 13:59:47 +00:00
|
|
|
#include "infros.h"
|
2006-09-01 12:58:56 +00:00
|
|
|
#include "filequeue.h"
|
2005-06-20 22:49:45 +00:00
|
|
|
#include "registry.h"
|
|
|
|
#include "fslist.h"
|
[USETUP]
- bootsup.c/.h, usetup.c: Save the old MBR sector in the system partition (this makes easier to restore the old one).
- fslist.c/.h, usetup.h: Fix header inclusion order.
- partlist.c/.h, usetup.c: On BIOS-PC architectures, the system partition can be formatted in any FS as long as it is the active partition (on the contrary, on architectures where such system partition is required, it is formatted in FAT). We currently do not have write support for all FSes out there (apart for FAT until now), so do a "clever" "trick" to work around this problem: on initialized disks, find the active partition and check its FS. If we support write access to this FS then we're OK, otherwise we change the (active) system partition for the one on which we are going to install ReactOS (which is, by construction, formatted with a FS on which we support write access).
The MBR (resp. the VBR) of the disk (resp. of the system partition) are always saved into files, making easy for people to boot on them (using FreeLdr) or restoring them.
CORE-10898
svn path=/trunk/; revision=70837
2016-03-01 15:00:56 +00:00
|
|
|
#include "partlist.h"
|
2005-06-20 22:49:45 +00:00
|
|
|
#include "cabinet.h"
|
|
|
|
#include "filesup.h"
|
|
|
|
#include "genlist.h"
|
2007-12-12 00:05:00 +00:00
|
|
|
#include "mui.h"
|
2005-06-20 22:49:45 +00:00
|
|
|
|
|
|
|
extern HANDLE ProcessHeap;
|
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
|
|
|
|
2011-02-20 16:50:38 +00:00
|
|
|
extern VOID InfSetHeap(PVOID Heap);
|
|
|
|
extern VOID InfCloseFile(HINF InfHandle);
|
|
|
|
extern BOOLEAN InfFindNextLine(PINFCONTEXT ContextIn,
|
|
|
|
PINFCONTEXT ContextOut);
|
|
|
|
extern BOOLEAN InfGetBinaryField(PINFCONTEXT Context,
|
|
|
|
ULONG FieldIndex,
|
|
|
|
PUCHAR ReturnBuffer,
|
|
|
|
ULONG ReturnBufferSize,
|
|
|
|
PULONG RequiredSize);
|
|
|
|
extern BOOLEAN InfGetMultiSzField(PINFCONTEXT Context,
|
|
|
|
ULONG FieldIndex,
|
|
|
|
PWSTR ReturnBuffer,
|
|
|
|
ULONG ReturnBufferSize,
|
|
|
|
PULONG RequiredSize);
|
|
|
|
extern BOOLEAN InfGetStringField(PINFCONTEXT Context,
|
|
|
|
ULONG FieldIndex,
|
|
|
|
PWSTR ReturnBuffer,
|
|
|
|
ULONG ReturnBufferSize,
|
|
|
|
PULONG RequiredSize);
|
|
|
|
|
|
|
|
#define SetupCloseInfFile InfCloseFile
|
|
|
|
#define SetupFindNextLine InfFindNextLine
|
|
|
|
#define SetupGetBinaryField InfGetBinaryField
|
|
|
|
#define SetupGetMultiSzFieldW InfGetMultiSzField
|
|
|
|
#define SetupGetStringFieldW InfGetStringField
|
|
|
|
|
2007-12-12 00:05:00 +00:00
|
|
|
typedef enum _PAGE_NUMBER
|
|
|
|
{
|
2014-05-12 16:14:19 +00:00
|
|
|
LANGUAGE_PAGE,
|
2017-05-15 01:48:19 +00:00
|
|
|
WELCOME_PAGE,
|
2014-05-12 16:14:19 +00:00
|
|
|
LICENSE_PAGE,
|
|
|
|
INSTALL_INTRO_PAGE,
|
|
|
|
|
|
|
|
// SCSI_CONTROLLER_PAGE,
|
2017-05-15 01:48:19 +00:00
|
|
|
// OEM_DRIVER_PAGE,
|
|
|
|
|
|
|
|
REPAIR_INTRO_PAGE,
|
2014-05-12 16:14:19 +00:00
|
|
|
|
|
|
|
DEVICE_SETTINGS_PAGE,
|
|
|
|
COMPUTER_SETTINGS_PAGE,
|
|
|
|
DISPLAY_SETTINGS_PAGE,
|
|
|
|
KEYBOARD_SETTINGS_PAGE,
|
|
|
|
LAYOUT_SETTINGS_PAGE,
|
|
|
|
|
|
|
|
SELECT_PARTITION_PAGE,
|
2014-05-20 23:48:36 +00:00
|
|
|
CREATE_PRIMARY_PARTITION_PAGE,
|
|
|
|
CREATE_EXTENDED_PARTITION_PAGE,
|
2014-06-08 19:05:03 +00:00
|
|
|
CREATE_LOGICAL_PARTITION_PAGE,
|
2015-08-09 13:14:00 +00:00
|
|
|
CONFIRM_DELETE_SYSTEM_PARTITION_PAGE,
|
2014-05-12 16:14:19 +00:00
|
|
|
DELETE_PARTITION_PAGE,
|
|
|
|
|
|
|
|
SELECT_FILE_SYSTEM_PAGE,
|
|
|
|
FORMAT_PARTITION_PAGE,
|
|
|
|
CHECK_FILE_SYSTEM_PAGE,
|
|
|
|
|
2015-01-03 15:33:22 +00:00
|
|
|
PREPARE_COPY_PAGE,
|
2015-01-04 13:53:45 +00:00
|
|
|
INSTALL_DIRECTORY_PAGE,
|
2014-05-12 16:14:19 +00:00
|
|
|
FILE_COPY_PAGE,
|
|
|
|
REGISTRY_PAGE,
|
|
|
|
BOOT_LOADER_PAGE,
|
|
|
|
BOOT_LOADER_FLOPPY_PAGE,
|
|
|
|
BOOT_LOADER_HARDDISK_MBR_PAGE,
|
|
|
|
BOOT_LOADER_HARDDISK_VBR_PAGE,
|
|
|
|
|
|
|
|
SUCCESS_PAGE,
|
|
|
|
QUIT_PAGE,
|
|
|
|
FLUSH_PAGE,
|
2017-05-15 01:48:19 +00:00
|
|
|
REBOOT_PAGE, /* Virtual page */
|
|
|
|
RECOVERY_PAGE, /* Virtual page */
|
2007-12-12 00:05:00 +00:00
|
|
|
} PAGE_NUMBER, *PPAGE_NUMBER;
|
|
|
|
|
|
|
|
#define POPUP_WAIT_NONE 0
|
|
|
|
#define POPUP_WAIT_ANY_KEY 1
|
|
|
|
#define POPUP_WAIT_ENTER 2
|
|
|
|
|
2014-02-05 16:35:49 +00:00
|
|
|
#endif /* _USETUP_PCH_ */
|