mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
- Implement NLS data loading.
svn path=/trunk/; revision=40030
This commit is contained in:
parent
d77cb9ea17
commit
12a0ddf46e
1 changed files with 55 additions and 3 deletions
|
@ -36,6 +36,12 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
PCHAR SystemPath,
|
PCHAR SystemPath,
|
||||||
PCHAR BootPath,
|
PCHAR BootPath,
|
||||||
USHORT VersionToBoot);
|
USHORT VersionToBoot);
|
||||||
|
BOOLEAN
|
||||||
|
WinLdrLoadNLSData(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
|
IN LPCSTR DirectoryPath,
|
||||||
|
IN LPCSTR AnsiFileName,
|
||||||
|
IN LPCSTR OemFileName,
|
||||||
|
IN LPCSTR LanguageFileName);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,6 +53,53 @@ extern char reactos_arc_strings[32][256];
|
||||||
extern BOOLEAN UseRealHeap;
|
extern BOOLEAN UseRealHeap;
|
||||||
extern ULONG LoaderPagesSpanned;
|
extern ULONG LoaderPagesSpanned;
|
||||||
|
|
||||||
|
|
||||||
|
VOID
|
||||||
|
SetupLdrLoadNlsData(PLOADER_PARAMETER_BLOCK LoaderBlock, HINF InfHandle, LPCSTR SearchPath)
|
||||||
|
{
|
||||||
|
INFCONTEXT InfContext;
|
||||||
|
BOOLEAN Status;
|
||||||
|
LPCSTR AnsiName, OemName, LangName;
|
||||||
|
|
||||||
|
/* Get ANSI codepage file */
|
||||||
|
if (!InfFindFirstLine(InfHandle, "NLS", "AnsiCodepage", &InfContext))
|
||||||
|
{
|
||||||
|
printf("Failed to find 'NLS/AnsiCodepage'\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!InfGetDataField(&InfContext, 1, &AnsiName))
|
||||||
|
{
|
||||||
|
printf("Failed to get load options\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Get OEM codepage file */
|
||||||
|
if (!InfFindFirstLine(InfHandle, "NLS", "OemCodepage", &InfContext))
|
||||||
|
{
|
||||||
|
printf("Failed to find 'NLS/AnsiCodepage'\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!InfGetDataField(&InfContext, 1, &OemName))
|
||||||
|
{
|
||||||
|
printf("Failed to get load options\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!InfFindFirstLine(InfHandle, "NLS", "UnicodeCasetable", &InfContext))
|
||||||
|
{
|
||||||
|
printf("Failed to find 'NLS/AnsiCodepage'\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!InfGetDataField(&InfContext, 1, &LangName))
|
||||||
|
{
|
||||||
|
printf("Failed to get load options\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = WinLdrLoadNLSData(LoaderBlock, SearchPath, AnsiName, OemName, LangName);
|
||||||
|
DPRINTM(DPRINT_WINDOWS, "NLS data loaded with status %d\n", Status);
|
||||||
|
}
|
||||||
|
|
||||||
VOID LoadReactOSSetup2(VOID)
|
VOID LoadReactOSSetup2(VOID)
|
||||||
{
|
{
|
||||||
CHAR SystemPath[512], SearchPath[512];
|
CHAR SystemPath[512], SearchPath[512];
|
||||||
|
@ -183,9 +236,8 @@ VOID LoadReactOSSetup2(VOID)
|
||||||
if (KdComDTE)
|
if (KdComDTE)
|
||||||
WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KdComDTE);
|
WinLdrScanImportDescriptorTable(LoaderBlock, SearchPath, KdComDTE);
|
||||||
|
|
||||||
/* Load Hive, and then NLS data, OEM font, and prepare boot drivers list */
|
/* Load NLS data */
|
||||||
//Status = WinLdrLoadAndScanSystemHive(LoaderBlock, BootPath);
|
SetupLdrLoadNlsData(LoaderBlock, InfHandle, BootPath);
|
||||||
DPRINTM(DPRINT_WINDOWS, "SYSTEM hive loaded and scanned with status %d\n", Status);
|
|
||||||
|
|
||||||
/* Load boot drivers */
|
/* Load boot drivers */
|
||||||
//Status = WinLdrLoadBootDrivers(LoaderBlock, BootPath);
|
//Status = WinLdrLoadBootDrivers(LoaderBlock, BootPath);
|
||||||
|
|
Loading…
Reference in a new issue