mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:35:47 +00:00
[USETUP]
- Use newinflib instead of inflib. - Pass the user-selected language to the inf parser. - Convert registry code from ANSI APIs to UNICODE APIs. ATTENTION: This commit might break the build bot because it was not tested on a Linux system. svn path=/trunk/; revision=47037
This commit is contained in:
parent
17557bfabd
commit
9721d8084b
6 changed files with 19 additions and 3 deletions
|
@ -132,6 +132,7 @@ InfpOpenInfFileW(
|
|||
IN PCWSTR FileName,
|
||||
IN PCWSTR InfClass,
|
||||
IN DWORD InfStyle,
|
||||
IN LCID LocaleId,
|
||||
OUT PUINT ErrorLine)
|
||||
{
|
||||
HINF hInf = NULL;
|
||||
|
@ -143,6 +144,7 @@ InfpOpenInfFileW(
|
|||
Status = InfOpenFile(
|
||||
&hInf,
|
||||
&FileNameU,
|
||||
LocaleId,
|
||||
&ErrorLineUL);
|
||||
*ErrorLine = (UINT)ErrorLineUL;
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
@ -252,6 +254,7 @@ INF_OpenBufferedFileA(
|
|||
IN ULONG FileSize,
|
||||
IN PCSTR InfClass,
|
||||
IN DWORD InfStyle,
|
||||
IN LCID LocaleId,
|
||||
OUT PUINT ErrorLine)
|
||||
{
|
||||
#ifdef __REACTOS__
|
||||
|
@ -263,6 +266,7 @@ INF_OpenBufferedFileA(
|
|||
&hInf,
|
||||
FileBuffer,
|
||||
FileSize,
|
||||
LocaleId,
|
||||
&ErrorLineUL);
|
||||
*ErrorLine = (UINT)ErrorLineUL;
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
|
@ -110,6 +110,7 @@ InfpOpenInfFileW(
|
|||
IN PCWSTR FileName,
|
||||
IN PCWSTR InfClass,
|
||||
IN DWORD InfStyle,
|
||||
IN LCID LocaleId,
|
||||
OUT PUINT ErrorLine);
|
||||
|
||||
#endif /* __REACTOS__ */
|
||||
|
@ -132,6 +133,7 @@ INF_OpenBufferedFileA(
|
|||
IN ULONG FileSize,
|
||||
IN PCSTR InfClass,
|
||||
IN DWORD InfStyle,
|
||||
IN LCID LocaleId,
|
||||
OUT PUINT ErrorLine);
|
||||
|
||||
VOID INF_SetHeap(
|
||||
|
|
|
@ -79,6 +79,8 @@ static PGENERIC_LIST KeyboardList = NULL;
|
|||
static PGENERIC_LIST LayoutList = NULL;
|
||||
static PGENERIC_LIST LanguageList = NULL;
|
||||
|
||||
static LANGID LanguageId = 0;
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
static VOID
|
||||
|
@ -422,6 +424,7 @@ CheckUnattendedSetup(VOID)
|
|||
UnattendInf = SetupOpenInfFileW(UnattendInfPath,
|
||||
NULL,
|
||||
INF_STYLE_WIN4,
|
||||
LanguageId,
|
||||
&ErrorLine);
|
||||
|
||||
if (UnattendInf == INVALID_HANDLE_VALUE)
|
||||
|
@ -678,6 +681,8 @@ LanguagePage(PINPUT_RECORD Ir)
|
|||
{
|
||||
SelectedLanguageId = (PWCHAR)GetListEntryUserData(GetCurrentListEntry(LanguageList));
|
||||
|
||||
LanguageId = (LANGID)(wcstol(SelectedLanguageId, NULL, 16) & 0xFFFF);
|
||||
|
||||
if (wcscmp(SelectedLanguageId, DefaultLanguage))
|
||||
{
|
||||
UpdateKBLayout();
|
||||
|
@ -765,6 +770,7 @@ SetupStartPage(PINPUT_RECORD Ir)
|
|||
SetupInf = SetupOpenInfFileW(FileNameBuffer,
|
||||
NULL,
|
||||
INF_STYLE_WIN4,
|
||||
LanguageId,
|
||||
&ErrorLine);
|
||||
|
||||
if (SetupInf == INVALID_HANDLE_VALUE)
|
||||
|
@ -3045,6 +3051,7 @@ PrepareCopyPage(PINPUT_RECORD Ir)
|
|||
InfFileSize,
|
||||
(const CHAR*) NULL,
|
||||
INF_STYLE_WIN4,
|
||||
LanguageId,
|
||||
&ErrorLine);
|
||||
|
||||
if (InfHandle == INVALID_HANDLE_VALUE)
|
||||
|
@ -3274,7 +3281,7 @@ RegistryPage(PINPUT_RECORD Ir)
|
|||
|
||||
CONSOLE_SetStatusText(MUIGetString(STRING_IMPORTFILE), File);
|
||||
|
||||
if (!ImportRegistryFile(File, Section, Delete))
|
||||
if (!ImportRegistryFile(File, Section, LanguageId, Delete))
|
||||
{
|
||||
DPRINT("Importing %S failed\n", File);
|
||||
|
||||
|
|
|
@ -617,6 +617,7 @@ registry_callback (HINF hInf, PCWSTR Section, BOOLEAN Delete)
|
|||
BOOLEAN
|
||||
ImportRegistryFile(PWSTR Filename,
|
||||
PWSTR Section,
|
||||
LCID LocaleId,
|
||||
BOOLEAN Delete)
|
||||
{
|
||||
WCHAR FileNameBuffer[MAX_PATH];
|
||||
|
@ -632,6 +633,7 @@ ImportRegistryFile(PWSTR Filename,
|
|||
FileNameBuffer,
|
||||
NULL,
|
||||
INF_STYLE_WIN4,
|
||||
LocaleId,
|
||||
&ErrorLine);
|
||||
if (hInf == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
BOOLEAN
|
||||
ImportRegistryFile(PWSTR Filename,
|
||||
PWSTR Section,
|
||||
LCID LocaleId,
|
||||
BOOLEAN Delete);
|
||||
|
||||
BOOLEAN
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<bootstrap installbase="$(CDOUTPUT)/system32" nameoncd="smss.exe" />
|
||||
<include base="usetup">.</include>
|
||||
<include base="zlib">.</include>
|
||||
<include base="inflib">.</include>
|
||||
<include base="newinflib">.</include>
|
||||
<include base="ReactOS">include/reactos/drivers</include>
|
||||
<library>zlib</library>
|
||||
<library>inflib</library>
|
||||
<library>newinflib</library>
|
||||
<library>ext2lib</library>
|
||||
<library>vfatlib</library>
|
||||
<library>ntdll</library>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue