[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
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Setup Library
|
|
|
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
|
|
|
* PURPOSE: Public header
|
|
|
|
* COPYRIGHT: Copyright 2017-2018 Hermes Belusca-Maito
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-08-08 14:05:20 +00:00
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
|
[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
|
|
|
/* Needed PSDK headers when using this library */
|
|
|
|
#if 0
|
|
|
|
|
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#define _INC_WINDOWS
|
|
|
|
#define COM_NO_WINDOWS_H
|
|
|
|
|
2017-05-31 01:43:12 +00:00
|
|
|
#include <winxxx.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
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* NOTE: Please keep the header inclusion order! */
|
|
|
|
|
|
|
|
extern HANDLE ProcessHeap;
|
|
|
|
|
|
|
|
#include "errorcode.h"
|
2017-08-28 11:28:08 +00:00
|
|
|
#include "utils/linklist.h"
|
|
|
|
#include "utils/ntverrsrc.h"
|
|
|
|
// #include "utils/arcname.h"
|
|
|
|
#include "utils/bldrsup.h"
|
2017-08-26 11:42:32 +00:00
|
|
|
#include "bootsup.h"
|
2017-08-28 11:28:08 +00:00
|
|
|
#include "utils/filesup.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 "fsutil.h"
|
2017-08-28 11:28:08 +00:00
|
|
|
#include "utils/genlist.h"
|
|
|
|
#include "utils/infsupp.h"
|
|
|
|
#include "utils/inicache.h"
|
|
|
|
#include "utils/partlist.h"
|
|
|
|
#include "utils/arcname.h"
|
|
|
|
#include "utils/osdetect.h"
|
|
|
|
#include "utils/regutil.h"
|
2017-06-30 19:07:02 +00:00
|
|
|
#include "registry.h"
|
2017-08-28 14:46:49 +00:00
|
|
|
#include "settings.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
|
|
|
|
2017-08-08 14:05:20 +00:00
|
|
|
|
|
|
|
/* DEFINES ******************************************************************/
|
|
|
|
|
|
|
|
#define KB ((ULONGLONG)1024)
|
|
|
|
#define MB (KB*KB)
|
|
|
|
#define GB (KB*KB*KB)
|
|
|
|
// #define TB (KB*KB*KB*KB)
|
|
|
|
// #define PB (KB*KB*KB*KB*KB)
|
|
|
|
|
|
|
|
|
2017-08-09 20:39:45 +00:00
|
|
|
/* TYPEDEFS *****************************************************************/
|
|
|
|
|
|
|
|
typedef struct _USETUP_DATA
|
|
|
|
{
|
|
|
|
/* SOURCE Paths *****/
|
|
|
|
UNICODE_STRING SourceRootPath;
|
|
|
|
UNICODE_STRING SourceRootDir;
|
|
|
|
UNICODE_STRING SourcePath;
|
|
|
|
|
|
|
|
/* DESTINATION Paths *****/
|
|
|
|
/*
|
|
|
|
* Path to the system partition, where the boot manager resides.
|
|
|
|
* On x86 PCs, this is usually the active partition.
|
|
|
|
* On ARC, (u)EFI, ... platforms, this is a dedicated partition.
|
|
|
|
*
|
|
|
|
* For more information, see:
|
|
|
|
* https://en.wikipedia.org/wiki/System_partition_and_boot_partition
|
|
|
|
* http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/boot-and-system-volumes.html
|
|
|
|
* http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/arc-boot-process.html
|
|
|
|
* http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/efi-boot-process.html
|
|
|
|
* http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/determining-system-volume.html
|
|
|
|
* http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/determining-boot-volume.html
|
|
|
|
*/
|
|
|
|
UNICODE_STRING SystemRootPath;
|
|
|
|
|
|
|
|
/* Path to the installation directory inside the ReactOS boot partition */
|
|
|
|
UNICODE_STRING DestinationPath; /** Equivalent of 'NTOS_INSTALLATION::SystemNtPath' **/
|
|
|
|
UNICODE_STRING DestinationArcPath; /** Equivalent of 'NTOS_INSTALLATION::SystemArcPath' **/
|
|
|
|
UNICODE_STRING DestinationRootPath;
|
|
|
|
|
|
|
|
LONG DestinationDiskNumber;
|
|
|
|
LONG DestinationPartitionNumber;
|
|
|
|
LONG MBRInstallType;
|
|
|
|
|
|
|
|
LONG FormatPartition;
|
|
|
|
LONG AutoPartition;
|
|
|
|
|
|
|
|
WCHAR LocaleID[9];
|
|
|
|
LANGID LanguageId;
|
|
|
|
|
|
|
|
ULONG RequiredPartitionDiskSpace;
|
|
|
|
WCHAR InstallationDirectory[MAX_PATH];
|
|
|
|
} USETUP_DATA, *PUSETUP_DATA;
|
|
|
|
|
|
|
|
// HACK!!
|
|
|
|
extern BOOLEAN IsUnattendedSetup;
|
|
|
|
|
|
|
|
|
|
|
|
/* FUNCTIONS ****************************************************************/
|
|
|
|
|
|
|
|
VOID
|
|
|
|
CheckUnattendedSetup(
|
|
|
|
IN OUT PUSETUP_DATA pSetupData);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
InstallSetupInfFile(
|
|
|
|
IN OUT PUSETUP_DATA pSetupData);
|
|
|
|
|
|
|
|
NTSTATUS
|
|
|
|
GetSourcePaths(
|
|
|
|
OUT PUNICODE_STRING SourcePath,
|
|
|
|
OUT PUNICODE_STRING SourceRootPath,
|
|
|
|
OUT PUNICODE_STRING SourceRootDir);
|
|
|
|
|
|
|
|
ERROR_NUMBER
|
|
|
|
LoadSetupInf(
|
|
|
|
OUT HINF* SetupInf,
|
|
|
|
IN OUT PUSETUP_DATA pSetupData);
|
|
|
|
|
|
|
|
|
[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
|
|
|
/* EOF */
|