mirror of
https://github.com/reactos/reactos.git
synced 2025-05-03 21:00:15 +00:00
[SETUP] Add support for archtitcure specific inf sections and use it for x64 computer type
This commit is contained in:
parent
a71a6531ef
commit
85616bc8b2
2 changed files with 52 additions and 16 deletions
|
@ -433,16 +433,18 @@ DefaultProcessEntry(
|
|||
}
|
||||
|
||||
|
||||
PGENERIC_LIST
|
||||
CreateComputerTypeList(
|
||||
IN HINF InfFile)
|
||||
BOOLEAN
|
||||
AddComputerTypeEntries(
|
||||
_In_ HINF InfFile,
|
||||
PGENERIC_LIST List,
|
||||
_In_ PWSTR SectionName)
|
||||
{
|
||||
PGENERIC_LIST List;
|
||||
INFCONTEXT Context;
|
||||
PCWSTR KeyName;
|
||||
PCWSTR KeyValue;
|
||||
WCHAR ComputerIdentifier[128];
|
||||
WCHAR ComputerKey[32];
|
||||
ULONG Count1, Count2;
|
||||
|
||||
/* Get the computer identification */
|
||||
if (!GetComputerIdentifier(ComputerIdentifier, 128))
|
||||
|
@ -453,10 +455,10 @@ CreateComputerTypeList(
|
|||
DPRINT("Computer identifier: '%S'\n", ComputerIdentifier);
|
||||
|
||||
/* Search for matching device identifier */
|
||||
if (!SpInfFindFirstLine(InfFile, L"Map.Computer", NULL, &Context))
|
||||
if (!SpInfFindFirstLine(InfFile, SectionName, NULL, &Context))
|
||||
{
|
||||
/* FIXME: error message */
|
||||
return NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
do
|
||||
|
@ -467,7 +469,7 @@ CreateComputerTypeList(
|
|||
{
|
||||
/* FIXME: Handle error! */
|
||||
DPRINT("INF_GetDataField() failed\n");
|
||||
return NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DPRINT("KeyValue: %S\n", KeyValue);
|
||||
|
@ -481,7 +483,7 @@ CreateComputerTypeList(
|
|||
{
|
||||
/* FIXME: Handle error! */
|
||||
DPRINT("INF_GetDataField() failed\n");
|
||||
return NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DPRINT("Computer key: %S\n", KeyName);
|
||||
|
@ -489,16 +491,40 @@ CreateComputerTypeList(
|
|||
INF_FreeData(KeyName);
|
||||
} while (SpInfFindNextLine(&Context, &Context));
|
||||
|
||||
Count1 = AddEntriesFromInfSection(List,
|
||||
InfFile,
|
||||
L"Computer",
|
||||
&Context,
|
||||
DefaultProcessEntry,
|
||||
ComputerKey);
|
||||
Count2 = AddEntriesFromInfSection(List,
|
||||
InfFile,
|
||||
L"Computer.NT" INF_ARCH,
|
||||
&Context,
|
||||
DefaultProcessEntry,
|
||||
ComputerKey);
|
||||
if ((Count1 == -1) && (Count2 == -1))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
PGENERIC_LIST
|
||||
CreateComputerTypeList(
|
||||
IN HINF InfFile)
|
||||
{
|
||||
PGENERIC_LIST List;
|
||||
BOOLEAN Success;
|
||||
|
||||
List = CreateGenericList();
|
||||
if (List == NULL)
|
||||
return NULL;
|
||||
|
||||
if (AddEntriesFromInfSection(List,
|
||||
InfFile,
|
||||
L"Computer",
|
||||
&Context,
|
||||
DefaultProcessEntry,
|
||||
ComputerKey) == -1)
|
||||
Success = AddComputerTypeEntries(InfFile, List, L"Map.Computer");
|
||||
Success |= AddComputerTypeEntries(InfFile, List, L"Map.Computer.NT" INF_ARCH);
|
||||
if (!Success)
|
||||
{
|
||||
DestroyGenericList(List, TRUE);
|
||||
return NULL;
|
||||
|
|
|
@ -220,14 +220,17 @@ UnicodeCasetable = l_intl.nls
|
|||
DefaultLayout = 00000409
|
||||
DefaultLanguage = 00000409
|
||||
|
||||
[Computer]
|
||||
[Computer.NTx86]
|
||||
pci_up = "Standard PC Uniprocessor"
|
||||
;pci_mp = "Standard PC Multiprocessor"
|
||||
acpi_up = "ACPI PC Uniprocessor"
|
||||
;acpi_mp = "ACPI PC Multiprocessor"
|
||||
xbox = "Original Xbox"
|
||||
|
||||
[Map.Computer]
|
||||
[Computer.NTamd64]
|
||||
x64_up = "Standard x64 Uniprocessor"
|
||||
|
||||
[Map.Computer.NTx86]
|
||||
;<id> = <pnp id string>
|
||||
pci_up = "PC UP"
|
||||
;pci_mp = "PC MP"
|
||||
|
@ -235,6 +238,9 @@ acpi_up = "ACPI UP"
|
|||
;acpi_mp = "ACPI MP"
|
||||
xbox = "Xbox"
|
||||
|
||||
[Map.Computer.NTamd64]
|
||||
x64_up = "ACPI UP"
|
||||
|
||||
[Files.pci_up]
|
||||
ntoskrnl.exe = 1,,,,,,,2,,,,1,2
|
||||
hal.dll = 1,,,,,,,2,,,,1,2
|
||||
|
@ -255,6 +261,10 @@ halacpi.dll = 1,,,,,,,2,,,hal.dll,1,2
|
|||
ntoskrnl.exe = 1,,,,,,,2,,,,1,2
|
||||
halxbox.dll = 1,,,,,,,2,,,hal.dll,1,2
|
||||
|
||||
[Files.x64_up]
|
||||
ntoskrnl.exe = 1,,,,,,,2,,,,1,2
|
||||
hal.dll = 1,,,,,,,2,,,,1,2
|
||||
|
||||
[Display]
|
||||
;<id> = <user friendly name>,<spare>,<service key name>,<height>,<width>,<bpp>
|
||||
vga = "VGA Display (640x480x4)",,Vga,640,480,4
|
||||
|
|
Loading…
Reference in a new issue