2 * PROJECT: ReactOS Setup Library
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Public header
5 * COPYRIGHT: Copyright 2017-2018 Hermes Belusca-Maito
10 /* INCLUDES *****************************************************************/
12 /* Needed PSDK headers when using this library */
15 #define WIN32_NO_STATUS
17 #define COM_NO_WINDOWS_H
23 /* NOTE: Please keep the header inclusion order! */
25 extern HANDLE ProcessHeap
;
27 #include "errorcode.h"
28 #include "spapisup/fileqsup.h"
29 #include "spapisup/infsupp.h"
30 #include "utils/linklist.h"
31 #include "utils/ntverrsrc.h"
32 // #include "utils/arcname.h"
33 #include "utils/bldrsup.h"
35 #include "utils/filesup.h"
37 #include "utils/genlist.h"
38 #include "utils/inicache.h"
39 #include "utils/partlist.h"
40 #include "utils/arcname.h"
41 #include "utils/osdetect.h"
42 #include "utils/regutil.h"
48 /* DEFINES ******************************************************************/
50 #define KB ((ULONGLONG)1024)
53 // #define TB (KB*KB*KB*KB)
54 // #define PB (KB*KB*KB*KB*KB)
57 /* TYPEDEFS *****************************************************************/
61 typedef struct _USETUP_DATA
66 /* Installation *****/
67 PVOID SetupFileQueue
; // HSPFILEQ
69 /* SOURCE Paths *****/
70 UNICODE_STRING SourceRootPath
;
71 UNICODE_STRING SourceRootDir
;
72 UNICODE_STRING SourcePath
;
74 /* DESTINATION Paths *****/
76 * Path to the system partition, where the boot manager resides.
77 * On x86 PCs, this is usually the active partition.
78 * On ARC, (u)EFI, ... platforms, this is a dedicated partition.
80 * For more information, see:
81 * https://en.wikipedia.org/wiki/System_partition_and_boot_partition
82 * http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/boot-and-system-volumes.html
83 * http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/arc-boot-process.html
84 * http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/efi-boot-process.html
85 * http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/determining-system-volume.html
86 * http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/determining-boot-volume.html
88 UNICODE_STRING SystemRootPath
;
90 /* Path to the installation directory inside the ReactOS boot partition */
91 UNICODE_STRING DestinationArcPath
; /** Equivalent of 'NTOS_INSTALLATION::SystemArcPath' **/
92 UNICODE_STRING DestinationPath
; /** Equivalent of 'NTOS_INSTALLATION::SystemNtPath' **/
93 UNICODE_STRING DestinationRootPath
;
95 // FIXME: This is only temporary!! Must be removed later!
96 UNICODE_STRING InstallPath
;
98 LONG DestinationDiskNumber
;
99 LONG DestinationPartitionNumber
;
102 LONG FormatPartition
;
105 /* Settings lists *****/
106 PGENERIC_LIST ComputerList
;
107 PGENERIC_LIST DisplayList
;
108 PGENERIC_LIST KeyboardList
;
109 PGENERIC_LIST LayoutList
;
110 PGENERIC_LIST LanguageList
;
112 /* Other stuff *****/
116 ULONG RequiredPartitionDiskSpace
;
117 WCHAR InstallationDirectory
[MAX_PATH
];
118 } USETUP_DATA
, *PUSETUP_DATA
;
121 extern BOOLEAN IsUnattendedSetup
;
124 /* FUNCTIONS ****************************************************************/
127 CheckUnattendedSetup(
128 IN OUT PUSETUP_DATA pSetupData
);
132 IN OUT PUSETUP_DATA pSetupData
);
136 OUT PUNICODE_STRING SourcePath
,
137 OUT PUNICODE_STRING SourceRootPath
,
138 OUT PUNICODE_STRING SourceRootDir
);
142 IN OUT PUSETUP_DATA pSetupData
);
145 InitDestinationPaths(
146 IN OUT PUSETUP_DATA pSetupData
,
147 IN PCWSTR InstallationDir
,
148 IN PDISKENTRY DiskEntry
, // FIXME: HACK!
149 IN PPARTENTRY PartEntry
); // FIXME: HACK!
154 IN OUT PUSETUP_DATA pSetupData
,
159 IN OUT PUSETUP_DATA pSetupData
);
162 typedef enum _REGISTRY_STATUS
167 DisplaySettingsUpdate
,
168 LocaleSettingsUpdate
,
175 (__cdecl
*PREGISTRY_STATUS_ROUTINE
)(IN REGISTRY_STATUS
, ...);
179 IN OUT PUSETUP_DATA pSetupData
,
180 /**/IN BOOLEAN RepairUpdateFlag
, /* HACK HACK! */
181 /**/IN PPARTLIST PartitionList
, /* HACK HACK! */
182 /**/IN WCHAR DestinationDriveLetter
, /* HACK HACK! */
183 /**/IN PCWSTR SelectedLanguageId
, /* HACK HACK! */
184 IN PREGISTRY_STATUS_ROUTINE StatusRoutine OPTIONAL
);