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