ReactOS 0.4.15-dev-7670-g69b08be
setuplib.h
Go to the documentation of this file.
1/*
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
6 */
7
8#pragma once
9
10/* INCLUDES *****************************************************************/
11
12/* Needed PSDK headers when using this library */
13#if 0
14
15#define WIN32_NO_STATUS
16#define _INC_WINDOWS
17#define COM_NO_WINDOWS_H
18
19#include <winxxx.h>
20
21#endif
22
23/* NOTE: Please keep the header inclusion order! */
24
25extern HANDLE ProcessHeap;
26
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"
34#include "utils/filesup.h"
35#include "utils/fsrec.h"
36#include "utils/genlist.h"
37#include "utils/inicache.h"
38#include "utils/partinfo.h"
39#include "utils/partlist.h"
40#include "utils/arcname.h"
41#include "utils/osdetect.h"
42#include "utils/regutil.h"
43#include "bootcode.h"
44#include "fsutil.h"
45#include "bootsup.h"
46#include "registry.h"
47#include "mui.h"
48#include "settings.h"
49
50// #include "install.h" // See at the end...
51
52
53/* DEFINES ******************************************************************/
54
55#define KB ((ULONGLONG)1024)
56#define MB (KB*KB)
57#define GB (KB*KB*KB)
58// #define TB (KB*KB*KB*KB)
59// #define PB (KB*KB*KB*KB*KB)
60
61
62/* TYPEDEFS *****************************************************************/
63
64struct _USETUP_DATA;
65
66typedef VOID
68
69typedef struct _USETUP_DATA
70{
71/* Error handling *****/
74
75/* Setup INFs *****/
77
78/* Installation *****/
79 PVOID SetupFileQueue; // HSPFILEQ
80
81/* SOURCE Paths *****/
85
86/* DESTINATION Paths *****/
87 /*
88 * Path to the system partition, where the boot manager resides.
89 * On x86 PCs, this is usually the active partition.
90 * On ARC, (u)EFI, ... platforms, this is a dedicated partition.
91 *
92 * For more information, see:
93 * https://en.wikipedia.org/wiki/System_partition_and_boot_partition
94 * http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/boot-and-system-volumes.html
95 * http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/arc-boot-process.html
96 * http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/efi-boot-process.html
97 * http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/determining-system-volume.html
98 * http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/determining-boot-volume.html
99 */
101
102 /* Path to the installation directory inside the ReactOS boot partition */
106
107 // FIXME: This is only temporary!! Must be removed later!
109
112
117
118/* Settings lists *****/
124
125/* Settings *****/
128 // PCWSTR KeyboardDriver;
129 // PCWSTR MouseDriver;
130 PCWSTR LayoutId; // DefaultKBLayout
131
132/* Other stuff *****/
135
139
140
141#include "install.h"
142
143
144// HACK!!
146
147
148/* FUNCTIONS ****************************************************************/
149
150#include "substset.h"
151
152VOID
154 IN OUT PUSETUP_DATA pSetupData);
155
156VOID
158 IN OUT PUSETUP_DATA pSetupData);
159
162 OUT PUNICODE_STRING SourcePath,
163 OUT PUNICODE_STRING SourceRootPath,
164 OUT PUNICODE_STRING SourceRootDir);
165
168 IN OUT PUSETUP_DATA pSetupData);
169
172 IN OUT PUSETUP_DATA pSetupData,
173 IN PCWSTR InstallationDir,
174 IN PPARTENTRY PartEntry); // FIXME: HACK!
175
176// NTSTATUS
179 IN OUT PUSETUP_DATA pSetupData,
180 IN ULONG InitPhase);
181
182VOID
184 IN OUT PUSETUP_DATA pSetupData);
185
186
188{
198
199typedef VOID
201
204 IN OUT PUSETUP_DATA pSetupData,
205 IN BOOLEAN RepairUpdateFlag, /* HACK HACK! */
206 IN PPARTLIST PartitionList, /* HACK HACK! */
207 IN WCHAR DestinationDriveLetter, /* HACK HACK! */
208 IN PCWSTR SelectedLanguageId, /* HACK HACK! */
210 IN PFONTSUBSTSETTINGS SubstSettings OPTIONAL);
211
212/* EOF */
unsigned char BOOLEAN
#define __cdecl
Definition: accygwin.h:79
#define VOID
Definition: acefi.h:82
LONG NTSTATUS
Definition: precomp.h:26
#define MAX_PATH
Definition: compat.h:34
enum _ERROR_NUMBER ERROR_NUMBER
USHORT LANGID
Definition: mui.h:9
static const char const char const char PIMAGEHLP_STATUS_ROUTINE StatusRoutine
Definition: image.c:35
long LONG
Definition: pedump.c:60
ERROR_NUMBER LoadSetupInf(IN OUT PUSETUP_DATA pSetupData)
Definition: setuplib.c:515
VOID FinishSetup(IN OUT PUSETUP_DATA pSetupData)
Definition: setuplib.c:861
VOID CheckUnattendedSetup(IN OUT PUSETUP_DATA pSetupData)
Definition: setuplib.c:28
HANDLE ProcessHeap
Definition: servman.c:15
_REGISTRY_STATUS
Definition: setuplib.h:188
@ KeybLayouts
Definition: setuplib.h:194
@ DisplaySettingsUpdate
Definition: setuplib.h:192
@ CodePageInfoUpdate
Definition: setuplib.h:196
@ LocaleSettingsUpdate
Definition: setuplib.h:193
@ RegHiveUpdate
Definition: setuplib.h:190
@ ImportRegHive
Definition: setuplib.h:191
@ KeybSettingsUpdate
Definition: setuplib.h:195
@ Success
Definition: setuplib.h:189
VOID(__cdecl * PREGISTRY_STATUS_ROUTINE)(IN REGISTRY_STATUS,...)
Definition: setuplib.h:200
ERROR_NUMBER UpdateRegistry(IN OUT PUSETUP_DATA pSetupData, IN BOOLEAN RepairUpdateFlag, IN PPARTLIST PartitionList, IN WCHAR DestinationDriveLetter, IN PCWSTR SelectedLanguageId, IN PREGISTRY_STATUS_ROUTINE StatusRoutine OPTIONAL, IN PFONTSUBSTSETTINGS SubstSettings OPTIONAL)
Definition: setuplib.c:911
NTSTATUS GetSourcePaths(OUT PUNICODE_STRING SourcePath, OUT PUNICODE_STRING SourceRootPath, OUT PUNICODE_STRING SourceRootDir)
Definition: setuplib.c:398
enum _REGISTRY_STATUS REGISTRY_STATUS
struct _USETUP_DATA * PUSETUP_DATA
VOID InstallSetupInfFile(IN OUT PUSETUP_DATA pSetupData)
Definition: setuplib.c:214
NTSTATUS InitDestinationPaths(IN OUT PUSETUP_DATA pSetupData, IN PCWSTR InstallationDir, IN PPARTENTRY PartEntry)
Definition: setuplib.c:627
BOOLEAN IsUnattendedSetup
Definition: reactos.c:40
struct _USETUP_DATA USETUP_DATA
VOID(__cdecl * PSETUP_ERROR_ROUTINE)(IN struct _USETUP_DATA *,...)
Definition: setuplib.h:67
ERROR_NUMBER InitializeSetup(IN OUT PUSETUP_DATA pSetupData, IN ULONG InitPhase)
Definition: setuplib.c:784
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
PGENERIC_LIST DisplayList
Definition: setuplib.h:120
LONG DestinationPartitionNumber
Definition: setuplib.h:111
UNICODE_STRING DestinationRootPath
Definition: setuplib.h:105
PGENERIC_LIST LanguageList
Definition: setuplib.h:123
LONG MBRInstallType
Definition: setuplib.h:113
UNICODE_STRING SourcePath
Definition: setuplib.h:84
PGENERIC_LIST LayoutList
Definition: setuplib.h:122
PVOID SetupFileQueue
Definition: setuplib.h:79
PGENERIC_LIST ComputerList
Definition: setuplib.h:119
UNICODE_STRING SourceRootDir
Definition: setuplib.h:83
PSETUP_ERROR_ROUTINE ErrorRoutine
Definition: setuplib.h:73
HINF SetupInf
Definition: setuplib.h:76
UNICODE_STRING SystemRootPath
Definition: setuplib.h:100
LONG FsType
Definition: setuplib.h:116
LONG AutoPartition
Definition: setuplib.h:115
UNICODE_STRING SourceRootPath
Definition: setuplib.h:82
WCHAR InstallationDirectory[MAX_PATH]
Definition: setuplib.h:137
UNICODE_STRING InstallPath
Definition: setuplib.h:108
UNICODE_STRING DestinationPath
Definition: setuplib.h:104
PCWSTR DisplayType
Definition: setuplib.h:127
PGENERIC_LIST KeyboardList
Definition: setuplib.h:121
LANGID LanguageId
Definition: setuplib.h:134
UNICODE_STRING DestinationArcPath
Definition: setuplib.h:103
PCWSTR ComputerType
Definition: setuplib.h:126
WCHAR LocaleID[9]
Definition: setuplib.h:133
ULONG RequiredPartitionDiskSpace
Definition: setuplib.h:136
ERROR_NUMBER LastErrorNumber
Definition: setuplib.h:72
PCWSTR LayoutId
Definition: setuplib.h:130
LONG DestinationDiskNumber
Definition: setuplib.h:110
LONG FormatPartition
Definition: setuplib.h:114
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
static PPARTLIST PartitionList
Definition: usetup.c:73
static BOOLEAN RepairUpdateFlag
Definition: usetup.c:70
PCWSTR SelectedLanguageId
Definition: usetup.c:66
__wchar_t WCHAR
Definition: xmlstorage.h:180