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>
|
|
|
|
|
2017-09-03 20:05:11 +00:00
|
|
|
|
[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>
|
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"
|
2005-06-20 22:49:45 +00:00
|
|
|
#include "progress.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 "genlist.h"
|
2007-12-12 00:05:00 +00:00
|
|
|
#include "mui.h"
|
2005-06-20 22:49:45 +00:00
|
|
|
|
2018-01-06 15:47:37 +00:00
|
|
|
#include "spapisup/inffile.h"
|
|
|
|
#include "spapisup/cabinet.h"
|
|
|
|
|
|
|
|
|
2005-06-20 22:49:45 +00:00
|
|
|
extern HANDLE ProcessHeap;
|
2006-10-30 12:41:17 +00:00
|
|
|
extern BOOLEAN IsUnattendedSetup;
|
2017-12-29 18:09:56 +00:00
|
|
|
extern PCWSTR SelectedLanguageId;
|
2006-10-30 12:41:17 +00:00
|
|
|
|
2007-12-12 00:05:00 +00:00
|
|
|
typedef enum _PAGE_NUMBER
|
|
|
|
{
|
2018-12-23 20:00:56 +00:00
|
|
|
SETUP_INIT_PAGE, /* Virtual page */
|
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,
|
2017-05-15 01:48:19 +00:00
|
|
|
UPGRADE_REPAIR_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,
|
[USETUP] Simplify partition creation UI code (#5837)
Unify CREATE_{PRIMARY,EXTENDED,LOGICAL}_PARTITION_PAGE
(i.e. Create{Primary,Extended,Logical}PartitionPage() functions)
into a single CREATE_PARTITION_PAGE (i.e. CreatePartitionPage()).
A lot of code was duplicated there (display, size input, etc.) just
for calling ultimately the Create{Primary,Extended,Logical}Partition()
helper functions.
This will also help in the future for supporting other platforms, where
the concept of "primary", "extended" and "logical" partitions do not
exist (basically all platforms except BIOS-based PC-AT).
2023-10-24 20:01:45 +00:00
|
|
|
CREATE_PARTITION_PAGE,
|
2019-08-25 00:08:23 +00:00
|
|
|
CHANGE_SYSTEM_PARTITION,
|
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,
|
2023-10-11 20:05:56 +00:00
|
|
|
BOOTLOADER_SELECT_PAGE,
|
2014-05-12 16:14:19 +00:00
|
|
|
|
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,
|
2023-10-11 20:05:56 +00:00
|
|
|
BOOTLOADER_INSTALL_PAGE,
|
|
|
|
BOOTLOADER_REMOVABLE_DISK_PAGE,
|
2014-05-12 16:14:19 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
[SETUPLIB][USETUP][INPUT.CPL] MUI integration with setuplib.
[SETUPLIB] Copy the mui* files from usetup into the setuplib for later usage, and add mui.c to build.
svn path=/branches/setup_improvements/; revision=75711
[SETUPLIB][USETUP] Start massaging the MUI files and split up what concerns only the usetup "resources",
and what concerns general language parameters (in the setuplib).
It may be interesting to retrieve the language parameters
from INF file (e.g. intl.inf) (suggested by Giannis).
svn path=/branches/setup_improvements/; revision=75715
[SETUPLIB] Add the necessary headers to mui.c to be able to compile.
[USETUP] Comment out the languages that don't have any resources.
svn path=/branches/setup_improvements/; revision=75716
[SETUPLIB][USETUP] Adjust MUI and settings code.
- Re-enable settings code concerning language, keyboards & layout
in the setuplib, and remove the old code in usetup.
- Remove useless code in setuplib's mui.c.
- Rename usetup's MUI "LanguageList" into "ResourceList" so as to
avoid colliding with the "LanguageList" of setuplib.
- Add the magic CMakeLists line "add_definitions(${I18N_DEFS})" that
I forgot previously, that caused the "LanguageList" of setuplib to be empty!
The code compiles and works during my tests.
svn path=/branches/setup_improvements/; revision=75717
[SETUPLIB] Change some string pointer types & function prototypes so that the usetup-specific
"SelectedLanguageId" variable is not used in the library.
svn path=/branches/setup_improvements/; revision=75719
[SETUPLIB] Change some function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library.
Also, make AddEntriesFromInfSection(), DefaultProcessEntry() and the typedef PPROCESS_ENTRY_ROUTINE private again.
svn path=/branches/setup_improvements/; revision=75720
svn path=/branches/setup_improvements/; revision=75724
[USETUP] Code adaptations.
- Transform some do{}while() loops into while(){} ones, since the lists on which we work may only contain one single {NULL} element.
- Modify MUIGetOEMCodePage() call after r75719.
- Use PCWSTR where needed.
svn path=/branches/setup_improvements/; revision=75722
[USETUP] Adjust some MUI & settings calls, following the commits r75719, r75720 and r75721.
svn path=/branches/setup_improvements/; revision=75723
[INPUT.CPL] Adjust inclusion of "muifonts.h" (commit 3dbd44f) due to changes introduced in r75711 and r75715.
2017-08-30 11:28:52 +00:00
|
|
|
VOID
|
|
|
|
PopupError(IN PCCH Text,
|
|
|
|
IN PCCH Status,
|
|
|
|
IN PINPUT_RECORD Ir,
|
|
|
|
IN ULONG WaitEvent);
|
|
|
|
|
2014-02-05 16:35:49 +00:00
|
|
|
#endif /* _USETUP_PCH_ */
|