mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 04:26:32 +00:00
[SETUPLIB][REACTOS][USETUP] Turn setuplib into a DLL shared between TUI and GUI 1st-stage setups (#7523)
CORE-13525 Notes: - Most of the exported functions have been turned from default cdecl to explicit stdcall / "NTAPI". - The two InitializeSetup() phases have been collapsed to make the initialization simpler. Average reductions (percentages; see PR #7523 for actual numbers): x86 Debug builds: reactos.exe: 35.1% smss.exe : 39.8% Total (including setuplib.dll): 17.9% x86 Release builds: reactos.exe: 22.3% smss.exe : 25.0% Total (including setuplib.dll): 10.6% x64 Debug builds: reactos.exe: 40.6% smss.exe : 41.6% Total (including setuplib.dll): 20.0% x64 Release builds: reactos.exe: 22.8% smss.exe : 22.3% Total (including setuplib.dll): 10.1%
This commit is contained in:
parent
e51e5de1f8
commit
d7c1d220b5
35 changed files with 462 additions and 262 deletions
|
@ -3,9 +3,12 @@ add_definitions(${I18N_DEFS})
|
|||
if(_WINKD_)
|
||||
add_definitions(-D_WINKD_)
|
||||
endif()
|
||||
add_definitions(-D_SETUPLIB_)
|
||||
|
||||
include_directories(spapisup utils)
|
||||
|
||||
spec2def(setuplib.dll setuplib.spec ADD_IMPORTLIB)
|
||||
|
||||
list(APPEND SOURCE
|
||||
spapisup/fileqsup.c
|
||||
spapisup/infsupp.c
|
||||
|
@ -32,6 +35,15 @@ list(APPEND SOURCE
|
|||
setuplib.c
|
||||
precomp.h)
|
||||
|
||||
add_library(setuplib ${SOURCE})
|
||||
add_library(setuplib SHARED
|
||||
${SOURCE}
|
||||
setuplib.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/setuplib.def)
|
||||
|
||||
add_pch(setuplib precomp.h SOURCE)
|
||||
add_dependencies(setuplib xdk) # psdk
|
||||
|
||||
set_module_type(setuplib nativedll)
|
||||
target_link_libraries(setuplib ext2lib vfatlib btrfslib ${PSEH_LIB})
|
||||
add_importlibs(setuplib ntdll)
|
||||
add_cd_file(TARGET setuplib DESTINATION reactos/system32 NO_CAB FOR bootcd regtest)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "bootcode.h"
|
||||
#include "fsutil.h"
|
||||
|
||||
#include "setuplib.h" // HAXX for IsUnattendedSetup!!
|
||||
#include "setuplib.h" // HACK for IsUnattendedSetup
|
||||
|
||||
#include "bootsup.h"
|
||||
|
||||
|
@ -1658,6 +1658,7 @@ GetDeviceInfo(
|
|||
* @return An NTSTATUS code indicating success or failure.
|
||||
**/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
InstallBootManagerAndBootEntries(
|
||||
_In_ ARCHITECTURE_TYPE ArchType,
|
||||
_In_ PCUNICODE_STRING SystemRootPath,
|
||||
|
@ -1813,6 +1814,7 @@ Quit:
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
InstallBootcodeToRemovable(
|
||||
_In_ ARCHITECTURE_TYPE ArchType,
|
||||
_In_ PCUNICODE_STRING RemovableRootPath,
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#pragma once
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
InstallBootManagerAndBootEntries(
|
||||
_In_ ARCHITECTURE_TYPE ArchType,
|
||||
_In_ PCUNICODE_STRING SystemRootPath,
|
||||
|
@ -16,6 +17,7 @@ InstallBootManagerAndBootEntries(
|
|||
_In_ ULONG_PTR Options);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
InstallBootcodeToRemovable(
|
||||
_In_ ARCHITECTURE_TYPE ArchType,
|
||||
_In_ PCUNICODE_STRING RemovableRootPath,
|
||||
|
|
|
@ -179,6 +179,7 @@ static FILE_SYSTEM RegisteredFileSystems[] =
|
|||
|
||||
/** QueryAvailableFileSystemFormat() **/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
GetRegisteredFileSystems(
|
||||
IN ULONG Index,
|
||||
OUT PCWSTR* FileSystemName)
|
||||
|
@ -241,6 +242,7 @@ GetFileSystemByName(
|
|||
|
||||
/** ChkdskEx() **/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ChkdskFileSystem_UStr(
|
||||
_In_ PUNICODE_STRING DriveRoot,
|
||||
_In_ PCWSTR FileSystemName,
|
||||
|
@ -284,6 +286,7 @@ ChkdskFileSystem_UStr(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ChkdskFileSystem(
|
||||
_In_ PCWSTR DriveRoot,
|
||||
_In_ PCWSTR FileSystemName,
|
||||
|
@ -308,6 +311,7 @@ ChkdskFileSystem(
|
|||
|
||||
/** FormatEx() **/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
FormatFileSystem_UStr(
|
||||
_In_ PUNICODE_STRING DriveRoot,
|
||||
_In_ PCWSTR FileSystemName,
|
||||
|
@ -373,6 +377,7 @@ FormatFileSystem_UStr(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
FormatFileSystem(
|
||||
_In_ PCWSTR DriveRoot,
|
||||
_In_ PCWSTR FileSystemName,
|
||||
|
@ -754,6 +759,7 @@ Quit:
|
|||
//
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ChkdskVolume(
|
||||
_In_ PVOLINFO Volume,
|
||||
_In_ BOOLEAN FixErrors,
|
||||
|
@ -778,6 +784,7 @@ ChkdskVolume(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ChkdskPartition(
|
||||
_In_ PPARTENTRY PartEntry,
|
||||
_In_ BOOLEAN FixErrors,
|
||||
|
@ -801,6 +808,7 @@ ChkdskPartition(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
FormatVolume(
|
||||
_In_ PVOLINFO Volume,
|
||||
_In_ PCWSTR FileSystemName,
|
||||
|
@ -839,6 +847,7 @@ FormatVolume(
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
FormatPartition(
|
||||
_In_ PPARTENTRY PartEntry,
|
||||
_In_ PCWSTR FileSystemName,
|
||||
|
@ -1084,6 +1093,7 @@ GetNextUnformattedVolume(
|
|||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
FsVolCommitOpsQueue(
|
||||
_In_ PPARTLIST PartitionList,
|
||||
_In_ PVOLENTRY SystemVolume,
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
/** QueryAvailableFileSystemFormat() **/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
GetRegisteredFileSystems(
|
||||
IN ULONG Index,
|
||||
OUT PCWSTR* FileSystemName);
|
||||
|
@ -19,6 +20,7 @@ GetRegisteredFileSystems(
|
|||
|
||||
/** ChkdskEx() **/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ChkdskFileSystem_UStr(
|
||||
_In_ PUNICODE_STRING DriveRoot,
|
||||
_In_ PCWSTR FileSystemName,
|
||||
|
@ -29,6 +31,7 @@ ChkdskFileSystem_UStr(
|
|||
_In_opt_ PFMIFSCALLBACK Callback);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ChkdskFileSystem(
|
||||
_In_ PCWSTR DriveRoot,
|
||||
_In_ PCWSTR FileSystemName,
|
||||
|
@ -41,6 +44,7 @@ ChkdskFileSystem(
|
|||
|
||||
/** FormatEx() **/
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
FormatFileSystem_UStr(
|
||||
_In_ PUNICODE_STRING DriveRoot,
|
||||
_In_ PCWSTR FileSystemName,
|
||||
|
@ -51,6 +55,7 @@ FormatFileSystem_UStr(
|
|||
_In_opt_ PFMIFSCALLBACK Callback);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
FormatFileSystem(
|
||||
_In_ PCWSTR DriveRoot,
|
||||
_In_ PCWSTR FileSystemName,
|
||||
|
@ -109,6 +114,7 @@ InstallNtfsBootCode(
|
|||
//
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
ChkdskPartition(
|
||||
_In_ PPARTENTRY PartEntry,
|
||||
_In_ BOOLEAN FixErrors,
|
||||
|
@ -118,6 +124,7 @@ ChkdskPartition(
|
|||
_In_opt_ PFMIFSCALLBACK Callback);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
FormatPartition(
|
||||
_In_ PPARTENTRY PartEntry,
|
||||
_In_ PCWSTR FileSystemName,
|
||||
|
@ -200,6 +207,7 @@ typedef FSVOL_OP
|
|||
_In_ ULONG_PTR Param2);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
FsVolCommitOpsQueue(
|
||||
_In_ PPARTLIST PartitionList,
|
||||
_In_ PVOLENTRY SystemVolume,
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "filesup.h"
|
||||
#include "infsupp.h"
|
||||
|
||||
#include "setuplib.h" // HAXX for USETUP_DATA!!
|
||||
#include "setuplib.h" // HACK for USETUP_DATA
|
||||
|
||||
#include "install.h"
|
||||
|
||||
|
@ -681,6 +681,7 @@ PrepareCopyInfFile(
|
|||
// #define USE_CABINET_INF
|
||||
|
||||
BOOLEAN // ERROR_NUMBER
|
||||
NTAPI
|
||||
PrepareFileCopy(
|
||||
IN OUT PUSETUP_DATA pSetupData,
|
||||
IN PFILE_COPY_STATUS_ROUTINE StatusRoutine OPTIONAL)
|
||||
|
@ -823,6 +824,7 @@ PrepareFileCopy(
|
|||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
DoFileCopy(
|
||||
IN OUT PUSETUP_DATA pSetupData,
|
||||
IN PSP_FILE_CALLBACK_W MsgHandler,
|
||||
|
|
|
@ -27,11 +27,13 @@ PrepareCopyInfFile(
|
|||
#endif
|
||||
|
||||
BOOLEAN // ERROR_NUMBER
|
||||
NTAPI
|
||||
PrepareFileCopy(
|
||||
IN OUT PUSETUP_DATA pSetupData,
|
||||
IN PFILE_COPY_STATUS_ROUTINE StatusRoutine OPTIONAL);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
DoFileCopy(
|
||||
IN OUT PUSETUP_DATA pSetupData,
|
||||
IN PSP_FILE_CALLBACK_W MsgHandler,
|
||||
|
|
|
@ -29,10 +29,14 @@
|
|||
|
||||
#include <ntstrsafe.h>
|
||||
|
||||
|
||||
/* Filesystem headers */
|
||||
#include <reactos/rosioctl.h> // For extra partition IDs
|
||||
|
||||
|
||||
#ifndef SPLIBAPI
|
||||
#define SPLIBAPI
|
||||
#endif
|
||||
|
||||
//
|
||||
///* Internal Headers */
|
||||
//#include "interface/consup.h"
|
||||
|
@ -51,7 +55,6 @@
|
|||
//#include "filesup.h"
|
||||
//#include "genlist.h"
|
||||
|
||||
|
||||
extern HANDLE ProcessHeap;
|
||||
|
||||
#include "errorcode.h"
|
||||
|
|
|
@ -22,9 +22,13 @@
|
|||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
HANDLE ProcessHeap;
|
||||
BOOLEAN IsUnattendedSetup = FALSE;
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
CheckUnattendedSetup(
|
||||
IN OUT PUSETUP_DATA pSetupData)
|
||||
{
|
||||
|
@ -199,6 +203,7 @@ Quit:
|
|||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
InstallSetupInfFile(
|
||||
IN OUT PUSETUP_DATA pSetupData)
|
||||
{
|
||||
|
@ -669,6 +674,7 @@ LoadSetupInf(
|
|||
* @brief Find or set the active system partition.
|
||||
**/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
InitSystemPartition(
|
||||
/**/_In_ PPARTLIST PartitionList, /* HACK HACK! */
|
||||
/**/_In_ PPARTENTRY InstallPartition, /* HACK HACK! */
|
||||
|
@ -768,6 +774,7 @@ InitSystemPartition(
|
|||
* Each path component must be a valid 8.3 name.
|
||||
**/
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
IsValidInstallDirectory(
|
||||
_In_ PCWSTR InstallDir)
|
||||
{
|
||||
|
@ -852,6 +859,7 @@ IsValidInstallDirectory(
|
|||
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
InitDestinationPaths(
|
||||
_Inout_ PUSETUP_DATA pSetupData,
|
||||
_In_ PCWSTR InstallationDir,
|
||||
|
@ -1007,92 +1015,91 @@ InitDestinationPaths(
|
|||
|
||||
// NTSTATUS
|
||||
ERROR_NUMBER
|
||||
NTAPI
|
||||
InitializeSetup(
|
||||
IN OUT PUSETUP_DATA pSetupData,
|
||||
IN ULONG InitPhase)
|
||||
_Inout_ PUSETUP_DATA pSetupData,
|
||||
_In_opt_ PSETUP_ERROR_ROUTINE ErrorRoutine,
|
||||
_In_ PSPFILE_EXPORTS pSpFileExports,
|
||||
_In_ PSPINF_EXPORTS pSpInfExports)
|
||||
{
|
||||
if (InitPhase == 0)
|
||||
ERROR_NUMBER Error;
|
||||
NTSTATUS Status;
|
||||
|
||||
IsUnattendedSetup = FALSE;
|
||||
RtlZeroMemory(pSetupData, sizeof(*pSetupData));
|
||||
|
||||
/* Initialize error handling */
|
||||
pSetupData->LastErrorNumber = ERROR_SUCCESS;
|
||||
pSetupData->ErrorRoutine = ErrorRoutine;
|
||||
|
||||
/* Initialize global unicode strings */
|
||||
RtlInitUnicodeString(&pSetupData->SourcePath, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->SourceRootPath, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->SourceRootDir, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->DestinationArcPath, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->DestinationPath, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->DestinationRootPath, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->SystemRootPath, NULL);
|
||||
|
||||
// FIXME: This is only temporary!! Must be removed later!
|
||||
/***/RtlInitUnicodeString(&pSetupData->InstallPath, NULL);/***/
|
||||
|
||||
/* Initialize SpFile and SpInf support */
|
||||
RtlCopyMemory(&SpFileExports, pSpFileExports, sizeof(SpFileExports));
|
||||
RtlCopyMemory(&SpInfExports, pSpInfExports, sizeof(SpInfExports));
|
||||
|
||||
//
|
||||
// TODO: Load and start SetupDD, and ask it for the information
|
||||
//
|
||||
|
||||
/* Get the source path and source root path */
|
||||
Status = GetSourcePaths(&pSetupData->SourcePath,
|
||||
&pSetupData->SourceRootPath,
|
||||
&pSetupData->SourceRootDir);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
RtlZeroMemory(pSetupData, sizeof(*pSetupData));
|
||||
|
||||
/* Initialize error handling */
|
||||
pSetupData->LastErrorNumber = ERROR_SUCCESS;
|
||||
pSetupData->ErrorRoutine = NULL;
|
||||
|
||||
/* Initialize global unicode strings */
|
||||
RtlInitUnicodeString(&pSetupData->SourcePath, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->SourceRootPath, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->SourceRootDir, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->DestinationArcPath, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->DestinationPath, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->DestinationRootPath, NULL);
|
||||
RtlInitUnicodeString(&pSetupData->SystemRootPath, NULL);
|
||||
|
||||
// FIXME: This is only temporary!! Must be removed later!
|
||||
/***/RtlInitUnicodeString(&pSetupData->InstallPath, NULL);/***/
|
||||
|
||||
//
|
||||
// TODO: Load and start SetupDD, and ask it for the information
|
||||
//
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
DPRINT1("GetSourcePaths() failed (Status 0x%08lx)\n", Status);
|
||||
return ERROR_NO_SOURCE_DRIVE;
|
||||
}
|
||||
else
|
||||
if (InitPhase == 1)
|
||||
DPRINT1("SourcePath (1): '%wZ'\n", &pSetupData->SourcePath);
|
||||
DPRINT1("SourceRootPath (1): '%wZ'\n", &pSetupData->SourceRootPath);
|
||||
DPRINT1("SourceRootDir (1): '%wZ'\n", &pSetupData->SourceRootDir);
|
||||
|
||||
/* Set up default values */
|
||||
pSetupData->DestinationDiskNumber = 0;
|
||||
pSetupData->DestinationPartitionNumber = 1;
|
||||
pSetupData->BootLoaderLocation = 2; // Default to "System partition"
|
||||
pSetupData->FormatPartition = 0;
|
||||
pSetupData->AutoPartition = 0;
|
||||
pSetupData->FsType = 0;
|
||||
|
||||
/* Load 'txtsetup.sif' from the installation media */
|
||||
Error = LoadSetupInf(pSetupData);
|
||||
if (Error != ERROR_SUCCESS)
|
||||
{
|
||||
ERROR_NUMBER Error;
|
||||
NTSTATUS Status;
|
||||
DPRINT1("LoadSetupInf() failed (Error 0x%lx)\n", Error);
|
||||
return Error;
|
||||
}
|
||||
DPRINT1("SourcePath (2): '%wZ'\n", &pSetupData->SourcePath);
|
||||
DPRINT1("SourceRootPath (2): '%wZ'\n", &pSetupData->SourceRootPath);
|
||||
DPRINT1("SourceRootDir (2): '%wZ'\n", &pSetupData->SourceRootDir);
|
||||
|
||||
/* Get the source path and source root path */
|
||||
Status = GetSourcePaths(&pSetupData->SourcePath,
|
||||
&pSetupData->SourceRootPath,
|
||||
&pSetupData->SourceRootDir);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("GetSourcePaths() failed (Status 0x%08lx)\n", Status);
|
||||
return ERROR_NO_SOURCE_DRIVE;
|
||||
}
|
||||
DPRINT1("SourcePath (1): '%wZ'\n", &pSetupData->SourcePath);
|
||||
DPRINT1("SourceRootPath (1): '%wZ'\n", &pSetupData->SourceRootPath);
|
||||
DPRINT1("SourceRootDir (1): '%wZ'\n", &pSetupData->SourceRootDir);
|
||||
|
||||
/* Set up default values */
|
||||
pSetupData->DestinationDiskNumber = 0;
|
||||
pSetupData->DestinationPartitionNumber = 1;
|
||||
pSetupData->BootLoaderLocation = 2; // Default to "System partition"
|
||||
pSetupData->FormatPartition = 0;
|
||||
pSetupData->AutoPartition = 0;
|
||||
pSetupData->FsType = 0;
|
||||
|
||||
/* Load 'txtsetup.sif' from the installation media */
|
||||
Error = LoadSetupInf(pSetupData);
|
||||
if (Error != ERROR_SUCCESS)
|
||||
{
|
||||
DPRINT1("LoadSetupInf() failed (Error 0x%lx)\n", Error);
|
||||
return Error;
|
||||
}
|
||||
DPRINT1("SourcePath (2): '%wZ'\n", &pSetupData->SourcePath);
|
||||
DPRINT1("SourceRootPath (2): '%wZ'\n", &pSetupData->SourceRootPath);
|
||||
DPRINT1("SourceRootDir (2): '%wZ'\n", &pSetupData->SourceRootDir);
|
||||
|
||||
/* Retrieve the target machine architecture type */
|
||||
// FIXME: This should be determined at runtime!!
|
||||
// FIXME: Allow for (pre-)installing on an architecture
|
||||
// different from the current one?
|
||||
/* Retrieve the target machine architecture type */
|
||||
// FIXME: This should be determined at runtime!!
|
||||
// FIXME: Allow for (pre-)installing on an architecture
|
||||
// different from the current one?
|
||||
#if defined(SARCH_XBOX)
|
||||
pSetupData->ArchType = ARCH_Xbox;
|
||||
pSetupData->ArchType = ARCH_Xbox;
|
||||
// #elif defined(SARCH_PC98)
|
||||
#else // TODO: Arc, UEFI
|
||||
pSetupData->ArchType = (IsNEC_98 ? ARCH_NEC98x86 : ARCH_PcAT);
|
||||
pSetupData->ArchType = (IsNEC_98 ? ARCH_NEC98x86 : ARCH_PcAT);
|
||||
#endif
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
FinishSetup(
|
||||
IN OUT PUSETUP_DATA pSetupData)
|
||||
{
|
||||
|
@ -1143,6 +1150,7 @@ FinishSetup(
|
|||
* Calls SetMountedDeviceValues
|
||||
*/
|
||||
ERROR_NUMBER
|
||||
NTAPI
|
||||
UpdateRegistry(
|
||||
IN OUT PUSETUP_DATA pSetupData,
|
||||
/**/IN BOOLEAN RepairUpdateFlag, /* HACK HACK! */
|
||||
|
@ -1396,4 +1404,31 @@ Cleanup:
|
|||
return ErrorNumber;
|
||||
}
|
||||
|
||||
|
||||
/* ENTRY-POINT ***************************************************************/
|
||||
|
||||
/* Declared in ndk/umfuncs.h */
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
LdrDisableThreadCalloutsForDll(
|
||||
_In_ PVOID BaseAddress);
|
||||
|
||||
BOOL
|
||||
NTAPI
|
||||
DllMain(
|
||||
_In_ HINSTANCE hDll,
|
||||
_In_ ULONG dwReason,
|
||||
_In_opt_ PVOID pReserved)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(pReserved);
|
||||
|
||||
if (dwReason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
LdrDisableThreadCalloutsForDll(hDll);
|
||||
ProcessHeap = RtlGetProcessHeap();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -7,6 +7,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _SETUPLIB_
|
||||
#define SPLIBAPI DECLSPEC_IMPORT
|
||||
#else
|
||||
#define SPLIBAPI
|
||||
#endif
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
/* Needed PSDK headers when using this library */
|
||||
|
@ -20,9 +30,9 @@
|
|||
|
||||
#endif
|
||||
|
||||
/* NOTE: Please keep the header inclusion order! */
|
||||
extern SPLIBAPI BOOLEAN IsUnattendedSetup; // HACK
|
||||
|
||||
extern HANDLE ProcessHeap;
|
||||
/* NOTE: Please keep the header inclusion order! */
|
||||
|
||||
#include "errorcode.h"
|
||||
#include "spapisup/fileqsup.h"
|
||||
|
@ -153,19 +163,17 @@ typedef struct _USETUP_DATA
|
|||
#include "install.h"
|
||||
|
||||
|
||||
// HACK!!
|
||||
extern BOOLEAN IsUnattendedSetup;
|
||||
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
#include "substset.h"
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
CheckUnattendedSetup(
|
||||
IN OUT PUSETUP_DATA pSetupData);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
InstallSetupInfFile(
|
||||
IN OUT PUSETUP_DATA pSetupData);
|
||||
|
||||
|
@ -182,6 +190,7 @@ LoadSetupInf(
|
|||
#define ERROR_SYSTEM_PARTITION_NOT_FOUND (ERROR_LAST_ERROR_CODE + 1)
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
InitSystemPartition(
|
||||
/**/_In_ PPARTLIST PartitionList, /* HACK HACK! */
|
||||
/**/_In_ PPARTENTRY InstallPartition, /* HACK HACK! */
|
||||
|
@ -200,10 +209,12 @@ InitSystemPartition(
|
|||
(isalnum(c) || (c) == L'.' || (c) == L'\\' || (c) == L'-' || (c) == L'_')
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
IsValidInstallDirectory(
|
||||
_In_ PCWSTR InstallDir);
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
InitDestinationPaths(
|
||||
_Inout_ PUSETUP_DATA pSetupData,
|
||||
_In_ PCWSTR InstallationDir,
|
||||
|
@ -211,11 +222,15 @@ InitDestinationPaths(
|
|||
|
||||
// NTSTATUS
|
||||
ERROR_NUMBER
|
||||
NTAPI
|
||||
InitializeSetup(
|
||||
IN OUT PUSETUP_DATA pSetupData,
|
||||
IN ULONG InitPhase);
|
||||
_Inout_ PUSETUP_DATA pSetupData,
|
||||
_In_opt_ PSETUP_ERROR_ROUTINE ErrorRoutine,
|
||||
_In_ PSPFILE_EXPORTS pSpFileExports,
|
||||
_In_ PSPINF_EXPORTS pSpInfExports);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
FinishSetup(
|
||||
IN OUT PUSETUP_DATA pSetupData);
|
||||
|
||||
|
@ -236,6 +251,7 @@ typedef VOID
|
|||
(__cdecl *PREGISTRY_STATUS_ROUTINE)(IN REGISTRY_STATUS, ...);
|
||||
|
||||
ERROR_NUMBER
|
||||
NTAPI
|
||||
UpdateRegistry(
|
||||
IN OUT PUSETUP_DATA pSetupData,
|
||||
/**/IN BOOLEAN RepairUpdateFlag, /* HACK HACK! */
|
||||
|
@ -245,4 +261,8 @@ UpdateRegistry(
|
|||
IN PREGISTRY_STATUS_ROUTINE StatusRoutine OPTIONAL,
|
||||
IN PFONTSUBSTSETTINGS SubstSettings OPTIONAL);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* EOF */
|
||||
|
|
16
base/setup/lib/setuplib.rc
Normal file
16
base/setup/lib/setuplib.rc
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Setup Library
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Resources
|
||||
* COPYRIGHT: Copyright 2003-2024 ReactOS Team
|
||||
*/
|
||||
|
||||
#include <windef.h>
|
||||
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
|
||||
#define REACTOS_VERSION_DLL
|
||||
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Setup Library DLL"
|
||||
#define REACTOS_STR_INTERNAL_NAME "setuplib"
|
||||
#define REACTOS_STR_ORIGINAL_FILENAME "setuplib.dll"
|
||||
#include <reactos/version.rc>
|
83
base/setup/lib/setuplib.spec
Normal file
83
base/setup/lib/setuplib.spec
Normal file
|
@ -0,0 +1,83 @@
|
|||
|
||||
@ extern IsUnattendedSetup
|
||||
@ extern MbrPartitionTypes
|
||||
@ extern GptPartitionTypes
|
||||
|
||||
;; fileqsup and infsupp function pointers to be initialized by the user of this library
|
||||
;;@ extern SpFileExports
|
||||
;;@ extern SpInfExports
|
||||
|
||||
;; infsupp
|
||||
@ cdecl INF_GetDataField(ptr long ptr) ## -private
|
||||
|
||||
|
||||
;; filesup
|
||||
@ cdecl ConcatPathsV(ptr long long ptr)
|
||||
@ cdecl CombinePathsV(ptr long long ptr)
|
||||
@ varargs ConcatPaths(ptr long long)
|
||||
@ varargs CombinePaths(ptr long long)
|
||||
@ cdecl SetupCopyFile(wstr wstr long)
|
||||
@ cdecl SetupDeleteFile(wstr long)
|
||||
@ cdecl SetupMoveFile(wstr wstr long)
|
||||
|
||||
;; genlist
|
||||
@ stdcall CreateGenericList()
|
||||
@ stdcall DestroyGenericList(ptr long)
|
||||
@ stdcall GetCurrentListEntry(ptr)
|
||||
@ stdcall GetFirstListEntry(ptr)
|
||||
@ stdcall GetNextListEntry(ptr)
|
||||
@ stdcall GetListEntryData(ptr)
|
||||
@ stdcall GetNumberOfListEntries(ptr)
|
||||
@ stdcall SetCurrentListEntry(ptr ptr)
|
||||
|
||||
;; partlist
|
||||
@ stdcall CreatePartitionList()
|
||||
@ stdcall CreatePartition(ptr ptr int64 ptr)
|
||||
@ stdcall DeletePartition(ptr ptr ptr)
|
||||
@ stdcall DestroyPartitionList(ptr)
|
||||
@ stdcall GetNextPartition(ptr ptr)
|
||||
@ stdcall GetPrevPartition(ptr ptr)
|
||||
@ stdcall GetAdjUnpartitionedEntry(ptr long)
|
||||
@ stdcall PartitionCreateChecks(ptr int64 ptr)
|
||||
@ cdecl -ret64 RoundingDivide(int64 int64)
|
||||
;;;;
|
||||
@ cdecl IsPartitionActive(ptr) ## -private
|
||||
@ cdecl SelectPartition(ptr long long)
|
||||
|
||||
;; osdetect
|
||||
@ stdcall CreateNTOSInstallationsList(ptr)
|
||||
@ stdcall FindSubStrI(wstr wstr)
|
||||
|
||||
;; settings
|
||||
@ cdecl CreateComputerTypeList(ptr)
|
||||
@ cdecl CreateDisplayDriverList(ptr)
|
||||
@ cdecl CreateKeyboardDriverList(ptr)
|
||||
@ cdecl CreateKeyboardLayoutList(ptr wstr ptr)
|
||||
@ cdecl CreateLanguageList(ptr ptr)
|
||||
@ cdecl GetDefaultLanguageIndex()
|
||||
|
||||
;; mui
|
||||
@ cdecl MUIDefaultKeyboardLayout(wstr)
|
||||
@ cdecl MUIGetOEMCodePage(wstr) ## -private
|
||||
|
||||
;; setuplib
|
||||
@ stdcall CheckUnattendedSetup(ptr)
|
||||
@ stdcall FinishSetup(ptr)
|
||||
@ stdcall IsValidInstallDirectory(wstr)
|
||||
@ stdcall InitDestinationPaths(ptr wstr ptr)
|
||||
@ stdcall InitializeSetup(ptr ptr ptr ptr)
|
||||
@ stdcall InitSystemPartition(ptr ptr ptr ptr ptr)
|
||||
@ stdcall InstallSetupInfFile(ptr)
|
||||
@ stdcall UpdateRegistry(ptr long ptr long wstr ptr ptr)
|
||||
|
||||
;; fsutil
|
||||
@ stdcall FsVolCommitOpsQueue(ptr ptr ptr ptr ptr)
|
||||
@ stdcall GetRegisteredFileSystems(long ptr)
|
||||
|
||||
;; install
|
||||
@ stdcall PrepareFileCopy(ptr ptr)
|
||||
@ stdcall DoFileCopy(ptr ptr ptr)
|
||||
|
||||
;; bootsup
|
||||
@ stdcall InstallBootManagerAndBootEntries(long ptr ptr ptr ptr)
|
||||
@ stdcall InstallBootcodeToRemovable(long ptr ptr ptr)
|
|
@ -20,15 +20,6 @@
|
|||
* These externs should be defined by the user of this library.
|
||||
* They are kept there for reference and ease of usage.
|
||||
*/
|
||||
#if 0
|
||||
|
||||
pSpFileQueueOpen SpFileQueueOpen = NULL;
|
||||
pSpFileQueueClose SpFileQueueClose = NULL;
|
||||
pSpFileQueueCopy SpFileQueueCopy = NULL;
|
||||
pSpFileQueueDelete SpFileQueueDelete = NULL;
|
||||
pSpFileQueueRename SpFileQueueRename = NULL;
|
||||
pSpFileQueueCommit SpFileQueueCommit = NULL;
|
||||
|
||||
#endif
|
||||
SPFILE_EXPORTS SpFileExports = {NULL};
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
#define FILEOP_NEWPATH 4
|
||||
|
||||
|
||||
/* TYPES ********************************************************************/
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
typedef PVOID HSPFILEQ;
|
||||
|
||||
|
@ -72,21 +72,17 @@ typedef UINT (CALLBACK* PSP_FILE_CALLBACK_W)(
|
|||
#endif
|
||||
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
// #define SetupOpenFileQueue
|
||||
typedef HSPFILEQ
|
||||
(WINAPI* pSpFileQueueOpen)(VOID);
|
||||
|
||||
extern pSpFileQueueOpen SpFileQueueOpen;
|
||||
|
||||
// #define SetupCloseFileQueue
|
||||
typedef BOOL
|
||||
(WINAPI* pSpFileQueueClose)(
|
||||
IN HSPFILEQ QueueHandle);
|
||||
|
||||
extern pSpFileQueueClose SpFileQueueClose;
|
||||
|
||||
// #define SetupQueueCopyW
|
||||
typedef BOOL
|
||||
(WINAPI* pSpFileQueueCopy)(
|
||||
|
@ -101,8 +97,6 @@ typedef BOOL
|
|||
IN PCWSTR TargetFileName OPTIONAL,
|
||||
IN ULONG CopyStyle);
|
||||
|
||||
extern pSpFileQueueCopy SpFileQueueCopy;
|
||||
|
||||
// #define SetupQueueDeleteW
|
||||
typedef BOOL
|
||||
(WINAPI* pSpFileQueueDelete)(
|
||||
|
@ -110,8 +104,6 @@ typedef BOOL
|
|||
IN PCWSTR PathPart1,
|
||||
IN PCWSTR PathPart2 OPTIONAL);
|
||||
|
||||
extern pSpFileQueueDelete SpFileQueueDelete;
|
||||
|
||||
// #define SetupQueueRenameW
|
||||
typedef BOOL
|
||||
(WINAPI* pSpFileQueueRename)(
|
||||
|
@ -121,8 +113,6 @@ typedef BOOL
|
|||
IN PCWSTR TargetPath OPTIONAL,
|
||||
IN PCWSTR TargetFileName);
|
||||
|
||||
extern pSpFileQueueRename SpFileQueueRename;
|
||||
|
||||
// #define SetupCommitFileQueueW
|
||||
typedef BOOL
|
||||
(WINAPI* pSpFileQueueCommit)(
|
||||
|
@ -131,6 +121,23 @@ typedef BOOL
|
|||
IN PSP_FILE_CALLBACK_W MsgHandler,
|
||||
IN PVOID Context OPTIONAL);
|
||||
|
||||
extern pSpFileQueueCommit SpFileQueueCommit;
|
||||
typedef struct _SPFILE_EXPORTS
|
||||
{
|
||||
pSpFileQueueOpen SpFileQueueOpen;
|
||||
pSpFileQueueClose SpFileQueueClose;
|
||||
pSpFileQueueCopy SpFileQueueCopy;
|
||||
pSpFileQueueDelete SpFileQueueDelete;
|
||||
pSpFileQueueRename SpFileQueueRename;
|
||||
pSpFileQueueCommit SpFileQueueCommit;
|
||||
} SPFILE_EXPORTS, *PSPFILE_EXPORTS;
|
||||
|
||||
extern /*SPLIBAPI*/ SPFILE_EXPORTS SpFileExports;
|
||||
|
||||
#define SpFileQueueOpen (SpFileExports.SpFileQueueOpen)
|
||||
#define SpFileQueueClose (SpFileExports.SpFileQueueClose)
|
||||
#define SpFileQueueCopy (SpFileExports.SpFileQueueCopy)
|
||||
#define SpFileQueueDelete (SpFileExports.SpFileQueueDelete)
|
||||
#define SpFileQueueRename (SpFileExports.SpFileQueueRename)
|
||||
#define SpFileQueueCommit (SpFileExports.SpFileQueueCommit)
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -21,20 +21,7 @@
|
|||
* These externs should be defined by the user of this library.
|
||||
* They are kept there for reference and ease of usage.
|
||||
*/
|
||||
#if 0
|
||||
|
||||
pSpInfCloseInfFile SpInfCloseInfFile = NULL;
|
||||
pSpInfFindFirstLine SpInfFindFirstLine = NULL;
|
||||
pSpInfFindNextLine SpInfFindNextLine = NULL;
|
||||
pSpInfGetFieldCount SpInfGetFieldCount = NULL;
|
||||
pSpInfGetBinaryField SpInfGetBinaryField = NULL;
|
||||
pSpInfGetIntField SpInfGetIntField = NULL;
|
||||
pSpInfGetMultiSzField SpInfGetMultiSzField = NULL;
|
||||
pSpInfGetStringField SpInfGetStringField = NULL;
|
||||
pSpInfGetField SpInfGetField = NULL;
|
||||
pSpInfOpenInfFile SpInfOpenInfFile = NULL;
|
||||
|
||||
#endif
|
||||
SPINF_EXPORTS SpInfExports = {NULL};
|
||||
|
||||
/* HELPER FUNCTIONS **********************************************************/
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ typedef struct _INFCONTEXT
|
|||
|
||||
#endif
|
||||
|
||||
C_ASSERT(sizeof(INFCONTEXT) == 2 * sizeof(HINF) + 2 * sizeof(UINT));
|
||||
|
||||
/* Lower the MAX_INF_STRING_LENGTH value in order to avoid too much stack usage */
|
||||
#undef MAX_INF_STRING_LENGTH
|
||||
#define MAX_INF_STRING_LENGTH 1024 // Still larger than in infcommon.h
|
||||
|
@ -41,27 +43,14 @@ typedef struct _INFCONTEXT
|
|||
#define INF_STYLE_WIN4 0x00000002
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
typedef PVOID HINF;
|
||||
typedef struct _INFCONTEXT
|
||||
{
|
||||
HINF Inf;
|
||||
HINF CurrentInf;
|
||||
UINT Section;
|
||||
UINT Line;
|
||||
} INFCONTEXT, *PINFCONTEXT;
|
||||
#endif
|
||||
|
||||
C_ASSERT(sizeof(INFCONTEXT) == 2 * sizeof(HINF) + 2 * sizeof(UINT));
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
// #define SetupCloseInfFile InfCloseFile
|
||||
typedef VOID
|
||||
(WINAPI* pSpInfCloseInfFile)(
|
||||
IN HINF InfHandle);
|
||||
|
||||
extern pSpInfCloseInfFile SpInfCloseInfFile;
|
||||
|
||||
// #define SetupFindFirstLineW InfpFindFirstLineW
|
||||
typedef BOOL
|
||||
(WINAPI* pSpInfFindFirstLine)(
|
||||
|
@ -70,23 +59,17 @@ typedef BOOL
|
|||
IN PCWSTR Key,
|
||||
IN OUT PINFCONTEXT Context);
|
||||
|
||||
extern pSpInfFindFirstLine SpInfFindFirstLine;
|
||||
|
||||
// #define SetupFindNextLine InfFindNextLine
|
||||
typedef BOOL
|
||||
(WINAPI* pSpInfFindNextLine)(
|
||||
IN PINFCONTEXT ContextIn,
|
||||
OUT PINFCONTEXT ContextOut);
|
||||
|
||||
extern pSpInfFindNextLine SpInfFindNextLine;
|
||||
|
||||
// #define SetupGetFieldCount InfGetFieldCount
|
||||
typedef ULONG
|
||||
(WINAPI* pSpInfGetFieldCount)(
|
||||
IN PINFCONTEXT Context);
|
||||
|
||||
extern pSpInfGetFieldCount SpInfGetFieldCount;
|
||||
|
||||
// #define SetupGetBinaryField InfGetBinaryField
|
||||
typedef BOOL
|
||||
(WINAPI* pSpInfGetBinaryField)(
|
||||
|
@ -96,8 +79,6 @@ typedef BOOL
|
|||
IN ULONG ReturnBufferSize,
|
||||
OUT PULONG RequiredSize);
|
||||
|
||||
extern pSpInfGetBinaryField SpInfGetBinaryField;
|
||||
|
||||
// #define SetupGetIntField InfGetIntField
|
||||
typedef BOOL
|
||||
(WINAPI* pSpInfGetIntField)(
|
||||
|
@ -105,8 +86,6 @@ typedef BOOL
|
|||
IN ULONG FieldIndex,
|
||||
OUT INT *IntegerValue); // PINT
|
||||
|
||||
extern pSpInfGetIntField SpInfGetIntField;
|
||||
|
||||
// #define SetupGetMultiSzFieldW InfGetMultiSzField
|
||||
typedef BOOL
|
||||
(WINAPI* pSpInfGetMultiSzField)(
|
||||
|
@ -116,8 +95,6 @@ typedef BOOL
|
|||
IN ULONG ReturnBufferSize,
|
||||
OUT PULONG RequiredSize);
|
||||
|
||||
extern pSpInfGetMultiSzField SpInfGetMultiSzField;
|
||||
|
||||
// #define SetupGetStringFieldW InfGetStringField
|
||||
typedef BOOL
|
||||
(WINAPI* pSpInfGetStringField)(
|
||||
|
@ -127,16 +104,12 @@ typedef BOOL
|
|||
IN ULONG ReturnBufferSize,
|
||||
OUT PULONG RequiredSize);
|
||||
|
||||
extern pSpInfGetStringField SpInfGetStringField;
|
||||
|
||||
// #define pSetupGetField
|
||||
typedef PCWSTR
|
||||
(WINAPI* pSpInfGetField)(
|
||||
IN PINFCONTEXT Context,
|
||||
IN ULONG FieldIndex);
|
||||
|
||||
extern pSpInfGetField SpInfGetField;
|
||||
|
||||
/* A version of SetupOpenInfFileW with support for a user-provided LCID */
|
||||
// #define SetupOpenInfFileExW InfpOpenInfFileW
|
||||
typedef HINF
|
||||
|
@ -147,8 +120,32 @@ typedef HINF
|
|||
IN LCID LocaleId,
|
||||
OUT PUINT ErrorLine);
|
||||
|
||||
extern pSpInfOpenInfFile SpInfOpenInfFile;
|
||||
typedef struct _SPINF_EXPORTS
|
||||
{
|
||||
pSpInfCloseInfFile SpInfCloseInfFile;
|
||||
pSpInfFindFirstLine SpInfFindFirstLine;
|
||||
pSpInfFindNextLine SpInfFindNextLine;
|
||||
pSpInfGetFieldCount SpInfGetFieldCount;
|
||||
pSpInfGetBinaryField SpInfGetBinaryField;
|
||||
pSpInfGetIntField SpInfGetIntField;
|
||||
pSpInfGetMultiSzField SpInfGetMultiSzField;
|
||||
pSpInfGetStringField SpInfGetStringField;
|
||||
pSpInfGetField SpInfGetField;
|
||||
pSpInfOpenInfFile SpInfOpenInfFile;
|
||||
} SPINF_EXPORTS, *PSPINF_EXPORTS;
|
||||
|
||||
extern /*SPLIBAPI*/ SPINF_EXPORTS SpInfExports;
|
||||
|
||||
#define SpInfCloseInfFile (SpInfExports.SpInfCloseInfFile)
|
||||
#define SpInfFindFirstLine (SpInfExports.SpInfFindFirstLine)
|
||||
#define SpInfFindNextLine (SpInfExports.SpInfFindNextLine)
|
||||
#define SpInfGetFieldCount (SpInfExports.SpInfGetFieldCount)
|
||||
#define SpInfGetBinaryField (SpInfExports.SpInfGetBinaryField)
|
||||
#define SpInfGetIntField (SpInfExports.SpInfGetIntField)
|
||||
#define SpInfGetMultiSzField (SpInfExports.SpInfGetMultiSzField)
|
||||
#define SpInfGetStringField (SpInfExports.SpInfGetStringField)
|
||||
#define SpInfGetField (SpInfExports.SpInfGetField)
|
||||
#define SpInfOpenInfFile (SpInfExports.SpInfOpenInfFile)
|
||||
|
||||
/* HELPER FUNCTIONS **********************************************************/
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
PGENERIC_LIST
|
||||
NTAPI
|
||||
CreateGenericList(VOID)
|
||||
{
|
||||
PGENERIC_LIST List;
|
||||
|
@ -33,6 +34,7 @@ CreateGenericList(VOID)
|
|||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
DestroyGenericList(
|
||||
IN OUT PGENERIC_LIST List,
|
||||
IN BOOLEAN FreeData)
|
||||
|
@ -59,6 +61,7 @@ DestroyGenericList(
|
|||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
AppendGenericListEntry(
|
||||
IN OUT PGENERIC_LIST List,
|
||||
IN PVOID Data,
|
||||
|
@ -84,6 +87,7 @@ AppendGenericListEntry(
|
|||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
SetCurrentListEntry(
|
||||
IN PGENERIC_LIST List,
|
||||
IN PGENERIC_LIST_ENTRY Entry)
|
||||
|
@ -94,6 +98,7 @@ SetCurrentListEntry(
|
|||
}
|
||||
|
||||
PGENERIC_LIST_ENTRY
|
||||
NTAPI
|
||||
GetCurrentListEntry(
|
||||
IN PGENERIC_LIST List)
|
||||
{
|
||||
|
@ -101,6 +106,7 @@ GetCurrentListEntry(
|
|||
}
|
||||
|
||||
PGENERIC_LIST_ENTRY
|
||||
NTAPI
|
||||
GetFirstListEntry(
|
||||
IN PGENERIC_LIST List)
|
||||
{
|
||||
|
@ -111,6 +117,7 @@ GetFirstListEntry(
|
|||
}
|
||||
|
||||
PGENERIC_LIST_ENTRY
|
||||
NTAPI
|
||||
GetNextListEntry(
|
||||
IN PGENERIC_LIST_ENTRY Entry)
|
||||
{
|
||||
|
@ -123,6 +130,7 @@ GetNextListEntry(
|
|||
}
|
||||
|
||||
PVOID
|
||||
NTAPI
|
||||
GetListEntryData(
|
||||
IN PGENERIC_LIST_ENTRY Entry)
|
||||
{
|
||||
|
@ -137,6 +145,7 @@ GetListEntryUiData(
|
|||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
GetNumberOfListEntries(
|
||||
IN PGENERIC_LIST List)
|
||||
{
|
||||
|
|
|
@ -24,37 +24,45 @@ typedef struct _GENERIC_LIST
|
|||
|
||||
|
||||
PGENERIC_LIST
|
||||
NTAPI
|
||||
CreateGenericList(VOID);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
DestroyGenericList(
|
||||
IN OUT PGENERIC_LIST List,
|
||||
IN BOOLEAN FreeData);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
AppendGenericListEntry(
|
||||
IN OUT PGENERIC_LIST List,
|
||||
IN PVOID Data,
|
||||
IN BOOLEAN Current);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
SetCurrentListEntry(
|
||||
IN PGENERIC_LIST List,
|
||||
IN PGENERIC_LIST_ENTRY Entry);
|
||||
|
||||
PGENERIC_LIST_ENTRY
|
||||
NTAPI
|
||||
GetCurrentListEntry(
|
||||
IN PGENERIC_LIST List);
|
||||
|
||||
PGENERIC_LIST_ENTRY
|
||||
NTAPI
|
||||
GetFirstListEntry(
|
||||
IN PGENERIC_LIST List);
|
||||
|
||||
PGENERIC_LIST_ENTRY
|
||||
NTAPI
|
||||
GetNextListEntry(
|
||||
IN PGENERIC_LIST_ENTRY Entry);
|
||||
|
||||
PVOID
|
||||
NTAPI
|
||||
GetListEntryData(
|
||||
IN PGENERIC_LIST_ENTRY Entry);
|
||||
|
||||
|
@ -63,6 +71,7 @@ GetListEntryUiData(
|
|||
IN PGENERIC_LIST_ENTRY Entry);
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
GetNumberOfListEntries(
|
||||
IN PGENERIC_LIST List);
|
||||
|
||||
|
|
|
@ -209,12 +209,16 @@ EnumerateInstallations(
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* FindSubStrI(PCWSTR str, PCWSTR strSearch) :
|
||||
* Searches for a sub-string 'strSearch' inside 'str', similarly to what
|
||||
* wcsstr(str, strSearch) does, but ignores the case during the comparisons.
|
||||
*/
|
||||
PCWSTR FindSubStrI(PCWSTR str, PCWSTR strSearch)
|
||||
/**
|
||||
* @brief
|
||||
* Finds the first occurrence of a sub-string 'strSearch' inside 'str',
|
||||
* using case-insensitive comparisons.
|
||||
**/
|
||||
PCWSTR
|
||||
NTAPI
|
||||
FindSubStrI(
|
||||
_In_ PCWSTR str,
|
||||
_In_ PCWSTR strSearch)
|
||||
{
|
||||
PCWSTR cp = str;
|
||||
PCWSTR s1, s2;
|
||||
|
@ -760,6 +764,7 @@ FindNTOSInstallations(
|
|||
**/
|
||||
// EnumerateNTOSInstallations
|
||||
PGENERIC_LIST
|
||||
NTAPI
|
||||
CreateNTOSInstallationsList(
|
||||
_In_ PPARTLIST PartList)
|
||||
{
|
||||
|
|
|
@ -30,14 +30,14 @@ typedef struct _NTOS_INSTALLATION
|
|||
|
||||
// EnumerateNTOSInstallations
|
||||
PGENERIC_LIST
|
||||
NTAPI
|
||||
CreateNTOSInstallationsList(
|
||||
_In_ PPARTLIST PartList);
|
||||
|
||||
/*
|
||||
* FindSubStrI(PCWSTR str, PCWSTR strSearch) :
|
||||
* Searches for a sub-string 'strSearch' inside 'str', similarly to what
|
||||
* wcsstr(str, strSearch) does, but ignores the case during the comparisons.
|
||||
*/
|
||||
PCWSTR FindSubStrI(PCWSTR str, PCWSTR strSearch);
|
||||
PCWSTR
|
||||
NTAPI
|
||||
FindSubStrI(
|
||||
_In_ PCWSTR str,
|
||||
_In_ PCWSTR strSearch);
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -16,7 +16,7 @@ typedef struct _MBR_PARTITION_TYPE
|
|||
} MBR_PARTITION_TYPE, *PMBR_PARTITION_TYPE;
|
||||
|
||||
#define NUM_MBR_PARTITION_TYPES 153
|
||||
extern const MBR_PARTITION_TYPE MbrPartitionTypes[NUM_MBR_PARTITION_TYPES];
|
||||
extern SPLIBAPI const MBR_PARTITION_TYPE MbrPartitionTypes[NUM_MBR_PARTITION_TYPES];
|
||||
|
||||
/* GPT PARTITION TYPES ******************************************************/
|
||||
|
||||
|
@ -27,6 +27,6 @@ typedef struct _GPT_PARTITION_TYPE
|
|||
} GPT_PARTITION_TYPE, *PGPT_PARTITION_TYPE;
|
||||
|
||||
#define NUM_GPT_PARTITION_TYPES 177
|
||||
extern const GPT_PARTITION_TYPE GptPartitionTypes[NUM_GPT_PARTITION_TYPES];
|
||||
extern SPLIBAPI const GPT_PARTITION_TYPE GptPartitionTypes[NUM_GPT_PARTITION_TYPES];
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1984,6 +1984,7 @@ GetActiveDiskPartition(
|
|||
}
|
||||
|
||||
PPARTLIST
|
||||
NTAPI
|
||||
CreatePartitionList(VOID)
|
||||
{
|
||||
PPARTLIST List;
|
||||
|
@ -2069,6 +2070,7 @@ CreatePartitionList(VOID)
|
|||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
DestroyPartitionList(
|
||||
IN PPARTLIST List)
|
||||
{
|
||||
|
@ -2288,6 +2290,7 @@ SelectPartition(
|
|||
}
|
||||
|
||||
PPARTENTRY
|
||||
NTAPI
|
||||
GetNextPartition(
|
||||
IN PPARTLIST List,
|
||||
IN PPARTENTRY CurrentPart OPTIONAL)
|
||||
|
@ -2380,6 +2383,7 @@ GetNextPartition(
|
|||
}
|
||||
|
||||
PPARTENTRY
|
||||
NTAPI
|
||||
GetPrevPartition(
|
||||
IN PPARTLIST List,
|
||||
IN PPARTENTRY CurrentPart OPTIONAL)
|
||||
|
@ -2783,6 +2787,7 @@ UpdateDiskLayout(
|
|||
* @return The adjacent unpartitioned region, if it exists, or NULL.
|
||||
**/
|
||||
PPARTENTRY
|
||||
NTAPI
|
||||
GetAdjUnpartitionedEntry(
|
||||
_In_ PPARTENTRY PartEntry,
|
||||
_In_ BOOLEAN Direction)
|
||||
|
@ -2872,6 +2877,7 @@ MBRPartitionCreateChecks(
|
|||
}
|
||||
|
||||
ERROR_NUMBER
|
||||
NTAPI
|
||||
PartitionCreateChecks(
|
||||
_In_ PPARTENTRY PartEntry,
|
||||
_In_opt_ ULONGLONG SizeBytes,
|
||||
|
@ -2900,6 +2906,7 @@ PartitionCreateChecks(
|
|||
// (see VDS::CREATE_PARTITION_PARAMETERS and PPARTITION_INFORMATION_MBR/GPT for example)
|
||||
// So far we only use it as the optional type of the partition to create.
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
CreatePartition(
|
||||
_In_ PPARTLIST List,
|
||||
_Inout_ PPARTENTRY PartEntry,
|
||||
|
@ -2990,6 +2997,7 @@ DismountPartition(
|
|||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
DeletePartition(
|
||||
_In_ PPARTLIST List,
|
||||
_In_ PPARTENTRY PartEntry,
|
||||
|
|
|
@ -283,9 +283,11 @@ IsPartitionActive(
|
|||
IN PPARTENTRY PartEntry);
|
||||
|
||||
PPARTLIST
|
||||
NTAPI
|
||||
CreatePartitionList(VOID);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
DestroyPartitionList(
|
||||
IN PPARTLIST List);
|
||||
|
||||
|
@ -323,27 +325,32 @@ SelectPartition(
|
|||
_In_ ULONG PartitionNumber);
|
||||
|
||||
PPARTENTRY
|
||||
NTAPI
|
||||
GetNextPartition(
|
||||
IN PPARTLIST List,
|
||||
IN PPARTENTRY CurrentPart OPTIONAL);
|
||||
|
||||
PPARTENTRY
|
||||
NTAPI
|
||||
GetPrevPartition(
|
||||
IN PPARTLIST List,
|
||||
IN PPARTENTRY CurrentPart OPTIONAL);
|
||||
|
||||
PPARTENTRY
|
||||
NTAPI
|
||||
GetAdjUnpartitionedEntry(
|
||||
_In_ PPARTENTRY PartEntry,
|
||||
_In_ BOOLEAN Direction);
|
||||
|
||||
ERROR_NUMBER
|
||||
NTAPI
|
||||
PartitionCreateChecks(
|
||||
_In_ PPARTENTRY PartEntry,
|
||||
_In_opt_ ULONGLONG SizeBytes,
|
||||
_In_opt_ ULONG_PTR PartitionInfo);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
CreatePartition(
|
||||
_In_ PPARTLIST List,
|
||||
_Inout_ PPARTENTRY PartEntry,
|
||||
|
@ -351,6 +358,7 @@ CreatePartition(
|
|||
_In_opt_ ULONG_PTR PartitionInfo);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
DeletePartition(
|
||||
_In_ PPARTLIST List,
|
||||
_In_ PPARTENTRY PartEntry,
|
||||
|
|
|
@ -17,9 +17,10 @@ list(APPEND SOURCE
|
|||
file(GLOB reactos_rc_deps res/*.*)
|
||||
add_rc_deps(reactos.rc ${reactos_rc_deps})
|
||||
add_executable(reactos ${SOURCE} reactos.rc)
|
||||
|
||||
add_pch(reactos reactos.h SOURCE)
|
||||
set_module_type(reactos win32gui UNICODE)
|
||||
target_link_libraries(reactos uuid setuplib ext2lib vfatlib btrfslib ${PSEH_LIB})
|
||||
target_link_libraries(reactos uuid)
|
||||
target_link_libraries(reactos zlib_solo) ## We use USETUP's cabinet implementation
|
||||
add_importlibs(reactos advapi32 gdi32 user32 comctl32 shlwapi setupapi msvcrt kernel32 ntdll)
|
||||
add_importlibs(reactos advapi32 gdi32 user32 comctl32 shlwapi setupapi setuplib msvcrt kernel32 ntdll)
|
||||
add_cd_file(TARGET reactos DESTINATION reactos NO_CAB FOR bootcd)
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
/* GLOBALS ******************************************************************/
|
||||
|
||||
HANDLE ProcessHeap;
|
||||
BOOLEAN IsUnattendedSetup = FALSE;
|
||||
SETUPDATA SetupData;
|
||||
|
||||
/* The partition where to perform the installation */
|
||||
|
@ -2826,11 +2825,9 @@ _tWinMain(HINSTANCE hInst,
|
|||
/* Initialize the NT to Win32 path prefix mapping list */
|
||||
InitNtToWin32PathMappingList(&SetupData.MappingList);
|
||||
|
||||
/* Initialize Setup, phase 0 */
|
||||
InitializeSetup(&SetupData.USetupData, 0);
|
||||
|
||||
/* Initialize Setup, phase 1 */
|
||||
Error = InitializeSetup(&SetupData.USetupData, 1);
|
||||
/* Initialize Setup */
|
||||
Error = InitializeSetup(&SetupData.USetupData, NULL,
|
||||
&SpFileExports, &SpInfExports);
|
||||
if (Error != ERROR_SUCCESS)
|
||||
{
|
||||
//
|
||||
|
|
|
@ -163,8 +163,6 @@ typedef struct _SETUPDATA
|
|||
} SETUPDATA, *PSETUPDATA;
|
||||
|
||||
extern HANDLE ProcessHeap;
|
||||
extern BOOLEAN IsUnattendedSetup;
|
||||
|
||||
extern SETUPDATA SetupData;
|
||||
|
||||
extern PPARTENTRY InstallPartition;
|
||||
|
|
|
@ -173,12 +173,15 @@ SpFileQueueRename_NtToWin32(
|
|||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
pSpFileQueueOpen SpFileQueueOpen = SetupOpenFileQueue;
|
||||
pSpFileQueueClose SpFileQueueClose = SetupCloseFileQueue;
|
||||
pSpFileQueueCopy SpFileQueueCopy = SpFileQueueCopy_NtToWin32;
|
||||
pSpFileQueueDelete SpFileQueueDelete = SpFileQueueDelete_NtToWin32;
|
||||
pSpFileQueueRename SpFileQueueRename = SpFileQueueRename_NtToWin32;
|
||||
pSpFileQueueCommit SpFileQueueCommit = SetupCommitFileQueueW;
|
||||
SPFILE_EXPORTS SpFileExports =
|
||||
{
|
||||
SetupOpenFileQueue,
|
||||
SetupCloseFileQueue,
|
||||
SpFileQueueCopy_NtToWin32,
|
||||
SpFileQueueDelete_NtToWin32,
|
||||
SpFileQueueRename_NtToWin32,
|
||||
SetupCommitFileQueueW
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -83,16 +83,19 @@ SetupOpenInfFileExW(
|
|||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
pSpInfCloseInfFile SpInfCloseInfFile = SetupCloseInfFile;
|
||||
pSpInfFindFirstLine SpInfFindFirstLine = SetupFindFirstLineW;
|
||||
pSpInfFindNextLine SpInfFindNextLine = SetupFindNextLine;
|
||||
pSpInfGetFieldCount SpInfGetFieldCount = SetupGetFieldCount;
|
||||
pSpInfGetBinaryField SpInfGetBinaryField = SetupGetBinaryField;
|
||||
pSpInfGetIntField SpInfGetIntField = SetupGetIntField;
|
||||
pSpInfGetMultiSzField SpInfGetMultiSzField = SetupGetMultiSzFieldW;
|
||||
pSpInfGetStringField SpInfGetStringField = SetupGetStringFieldW;
|
||||
pSpInfGetField SpInfGetField = pSetupGetField;
|
||||
pSpInfOpenInfFile SpInfOpenInfFile = SetupOpenInfFileExW;
|
||||
SPINF_EXPORTS SpInfExports =
|
||||
{
|
||||
SetupCloseInfFile,
|
||||
SetupFindFirstLineW,
|
||||
SetupFindNextLine,
|
||||
SetupGetFieldCount,
|
||||
SetupGetBinaryField,
|
||||
SetupGetIntField,
|
||||
SetupGetMultiSzFieldW,
|
||||
SetupGetStringFieldW,
|
||||
pSetupGetField,
|
||||
SetupOpenInfFileExW
|
||||
};
|
||||
|
||||
|
||||
/* HELPER FUNCTIONS **********************************************************/
|
||||
|
|
|
@ -35,6 +35,6 @@ endif()
|
|||
|
||||
add_pch(usetup usetup.h SOURCE)
|
||||
set_module_type(usetup nativecui)
|
||||
target_link_libraries(usetup inflib setuplib zlib_solo ext2lib vfatlib btrfslib chkstk ${PSEH_LIB})
|
||||
add_importlibs(usetup ntdll)
|
||||
target_link_libraries(usetup inflib zlib_solo chkstk)
|
||||
add_importlibs(usetup setuplib ntdll)
|
||||
add_cd_file(TARGET usetup DESTINATION reactos/system32 NO_CAB NAME_ON_CD smss.exe FOR bootcd regtest)
|
||||
|
|
|
@ -997,11 +997,14 @@ Quit:
|
|||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
pSpFileQueueOpen SpFileQueueOpen = SetupOpenFileQueue;
|
||||
pSpFileQueueClose SpFileQueueClose = SetupCloseFileQueue;
|
||||
pSpFileQueueCopy SpFileQueueCopy = SetupQueueCopyWithCab;
|
||||
pSpFileQueueDelete SpFileQueueDelete = SetupQueueDeleteW;
|
||||
pSpFileQueueRename SpFileQueueRename = SetupQueueRenameW;
|
||||
pSpFileQueueCommit SpFileQueueCommit = SetupCommitFileQueueW;
|
||||
SPFILE_EXPORTS SpFileExports =
|
||||
{
|
||||
SetupOpenFileQueue,
|
||||
SetupCloseFileQueue,
|
||||
SetupQueueCopyWithCab,
|
||||
SetupQueueDeleteW,
|
||||
SetupQueueRenameW,
|
||||
SetupCommitFileQueueW
|
||||
};
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -228,16 +228,19 @@ SetupOpenInfFileExW(
|
|||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
pSpInfCloseInfFile SpInfCloseInfFile = SetupCloseInfFile;
|
||||
pSpInfFindFirstLine SpInfFindFirstLine = SetupFindFirstLineW;
|
||||
pSpInfFindNextLine SpInfFindNextLine = SetupFindNextLine;
|
||||
pSpInfGetFieldCount SpInfGetFieldCount = SetupGetFieldCount;
|
||||
pSpInfGetBinaryField SpInfGetBinaryField = SetupGetBinaryField;
|
||||
pSpInfGetIntField SpInfGetIntField = SetupGetIntField;
|
||||
pSpInfGetMultiSzField SpInfGetMultiSzField = SetupGetMultiSzFieldW;
|
||||
pSpInfGetStringField SpInfGetStringField = SetupGetStringFieldW;
|
||||
pSpInfGetField SpInfGetField = pSetupGetField;
|
||||
pSpInfOpenInfFile SpInfOpenInfFile = SetupOpenInfFileExW;
|
||||
SPINF_EXPORTS SpInfExports =
|
||||
{
|
||||
SetupCloseInfFile,
|
||||
SetupFindFirstLineW,
|
||||
SetupFindNextLine,
|
||||
SetupGetFieldCount,
|
||||
SetupGetBinaryField,
|
||||
SetupGetIntField,
|
||||
SetupGetMultiSzFieldW,
|
||||
SetupGetStringFieldW,
|
||||
pSetupGetField,
|
||||
SetupOpenInfFileExW
|
||||
};
|
||||
|
||||
|
||||
/* HELPER FUNCTIONS **********************************************************/
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
/* GLOBALS & LOCALS *********************************************************/
|
||||
|
||||
HANDLE ProcessHeap;
|
||||
BOOLEAN IsUnattendedSetup = FALSE;
|
||||
|
||||
static USETUP_DATA USetupData;
|
||||
|
||||
|
@ -534,6 +533,28 @@ GetNTOSInstallationName(
|
|||
}
|
||||
|
||||
|
||||
// PSETUP_ERROR_ROUTINE
|
||||
static VOID
|
||||
__cdecl
|
||||
USetupErrorRoutine(
|
||||
IN PUSETUP_DATA pSetupData,
|
||||
...)
|
||||
{
|
||||
INPUT_RECORD Ir;
|
||||
va_list arg_ptr;
|
||||
|
||||
va_start(arg_ptr, pSetupData);
|
||||
|
||||
if (pSetupData->LastErrorNumber >= ERROR_SUCCESS &&
|
||||
pSetupData->LastErrorNumber < ERROR_LAST_ERROR_CODE)
|
||||
{
|
||||
// Note: the "POPUP_WAIT_ENTER" actually depends on the LastErrorNumber...
|
||||
MUIDisplayErrorV(pSetupData->LastErrorNumber, &Ir, POPUP_WAIT_ENTER, arg_ptr);
|
||||
}
|
||||
|
||||
va_end(arg_ptr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Start page
|
||||
*
|
||||
|
@ -566,8 +587,9 @@ SetupStartPage(PINPUT_RECORD Ir)
|
|||
|
||||
MUIDisplayPage(SETUP_INIT_PAGE);
|
||||
|
||||
/* Initialize Setup, phase 1 */
|
||||
Error = InitializeSetup(&USetupData, 1);
|
||||
/* Initialize Setup */
|
||||
Error = InitializeSetup(&USetupData, USetupErrorRoutine,
|
||||
&SpFileExports, &SpInfExports);
|
||||
if (Error != ERROR_SUCCESS)
|
||||
{
|
||||
MUIDisplayError(Error, Ir, POPUP_WAIT_ENTER);
|
||||
|
@ -3037,28 +3059,6 @@ InitInstallDir:
|
|||
}
|
||||
|
||||
|
||||
// PSETUP_ERROR_ROUTINE
|
||||
static VOID
|
||||
__cdecl
|
||||
USetupErrorRoutine(
|
||||
IN PUSETUP_DATA pSetupData,
|
||||
...)
|
||||
{
|
||||
INPUT_RECORD Ir;
|
||||
va_list arg_ptr;
|
||||
|
||||
va_start(arg_ptr, pSetupData);
|
||||
|
||||
if (pSetupData->LastErrorNumber >= ERROR_SUCCESS &&
|
||||
pSetupData->LastErrorNumber < ERROR_LAST_ERROR_CODE)
|
||||
{
|
||||
// Note: the "POPUP_WAIT_ENTER" actually depends on the LastErrorNumber...
|
||||
MUIDisplayErrorV(pSetupData->LastErrorNumber, &Ir, POPUP_WAIT_ENTER, arg_ptr);
|
||||
}
|
||||
|
||||
va_end(arg_ptr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Displays the PrepareCopyPage.
|
||||
*
|
||||
|
@ -4034,10 +4034,6 @@ RunUSetup(VOID)
|
|||
return STATUS_APP_INIT_FAILURE;
|
||||
}
|
||||
|
||||
/* Initialize Setup, phase 0 */
|
||||
InitializeSetup(&USetupData, 0);
|
||||
USetupData.ErrorRoutine = USetupErrorRoutine;
|
||||
|
||||
/* Hide the cursor and clear the screen and keyboard buffer */
|
||||
CONSOLE_SetCursorType(TRUE, FALSE);
|
||||
CONSOLE_ClearScreen();
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
|
||||
|
||||
extern HANDLE ProcessHeap;
|
||||
extern BOOLEAN IsUnattendedSetup;
|
||||
extern PCWSTR SelectedLanguageId;
|
||||
|
||||
typedef enum _PAGE_NUMBER
|
||||
|
|
|
@ -11,8 +11,7 @@ list(APPEND SOURCE
|
|||
precomp.h)
|
||||
|
||||
add_executable(setuplib_unittest ${SOURCE})
|
||||
target_link_libraries(setuplib_unittest setuplib ${PSEH_LIB})
|
||||
set_module_type(setuplib_unittest win32cui)
|
||||
add_importlibs(setuplib_unittest msvcrt kernel32 ntdll)
|
||||
add_importlibs(setuplib_unittest setuplib msvcrt kernel32)
|
||||
#add_pch(setuplib_unittest precomp.h SOURCE)
|
||||
add_rostests_file(TARGET setuplib_unittest)
|
||||
|
|
|
@ -7,24 +7,8 @@
|
|||
|
||||
#include "precomp.h"
|
||||
|
||||
//
|
||||
// FIXME: Temporary symbols defined to make linking work.
|
||||
// They will be defined to something once INF file testing is implemented.
|
||||
//
|
||||
pSpInfCloseInfFile SpInfCloseInfFile = NULL;
|
||||
pSpInfFindFirstLine SpInfFindFirstLine = NULL;
|
||||
pSpInfFindNextLine SpInfFindNextLine = NULL;
|
||||
pSpInfGetFieldCount SpInfGetFieldCount = NULL;
|
||||
pSpInfGetBinaryField SpInfGetBinaryField = NULL;
|
||||
pSpInfGetIntField SpInfGetIntField = NULL;
|
||||
pSpInfGetMultiSzField SpInfGetMultiSzField = NULL;
|
||||
pSpInfGetStringField SpInfGetStringField = NULL;
|
||||
pSpInfGetField SpInfGetField = NULL;
|
||||
pSpInfOpenInfFile SpInfOpenInfFile = NULL;
|
||||
|
||||
BOOLEAN IsUnattendedSetup = FALSE;
|
||||
HANDLE ProcessHeap;
|
||||
|
||||
// SPFILE_EXPORTS SpFileExports = {NULL};
|
||||
// SPINF_EXPORTS SpInfExports = {NULL};
|
||||
|
||||
START_TEST(IsValidInstallDirectory)
|
||||
{
|
||||
|
@ -93,8 +77,6 @@ START_TEST(IsValidInstallDirectory)
|
|||
|
||||
#define BOOL_TO_STR(b) ((b) ? "TRUE" : "FALSE")
|
||||
|
||||
ProcessHeap = GetProcessHeap();
|
||||
|
||||
UINT i;
|
||||
for (i = 0; i < _countof(tests); ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue