mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 00:50:23 +00:00
Maciej Bialas <bjauy AT tlen DOT pl>
- Set LocaleID from unattend.inf - See issue #3943 for more details. svn path=/trunk/; revision=38146
This commit is contained in:
parent
84a5eed60e
commit
829b0c63d9
1 changed files with 56 additions and 9 deletions
|
@ -45,6 +45,7 @@ LONG UnattendFormatPartition = 0;
|
||||||
LONG AutoPartition = 0;
|
LONG AutoPartition = 0;
|
||||||
WCHAR UnattendInstallationDirectory[MAX_PATH];
|
WCHAR UnattendInstallationDirectory[MAX_PATH];
|
||||||
PWCHAR SelectedLanguageId;
|
PWCHAR SelectedLanguageId;
|
||||||
|
WCHAR LocaleID[9];
|
||||||
WCHAR DefaultLanguage[20];
|
WCHAR DefaultLanguage[20];
|
||||||
WCHAR DefaultKBLayout[20];
|
WCHAR DefaultKBLayout[20];
|
||||||
BOOLEAN RepairUpdateFlag = FALSE;
|
BOOLEAN RepairUpdateFlag = FALSE;
|
||||||
|
@ -555,6 +556,14 @@ CheckUnattendedSetup(VOID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* search for LocaleID in the 'Unattend' section*/
|
||||||
|
if (SetupFindFirstLineW (UnattendInf, L"Unattend", L"LocaleID", &Context)){
|
||||||
|
if (INF_GetData (&Context, NULL, &Value)){
|
||||||
|
LONG Id = wcstol(Value, NULL, 16);
|
||||||
|
swprintf(LocaleID,L"%08lx", Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SetupCloseInfFile(UnattendInf);
|
SetupCloseInfFile(UnattendInf);
|
||||||
|
|
||||||
DPRINT("Running unattended setup\n");
|
DPRINT("Running unattended setup\n");
|
||||||
|
@ -798,6 +807,42 @@ SetupStartPage(PINPUT_RECORD Ir)
|
||||||
LayoutList = CreateKeyboardLayoutList(SetupInf, DefaultKBLayout);
|
LayoutList = CreateKeyboardLayoutList(SetupInf, DefaultKBLayout);
|
||||||
LanguageList = CreateLanguageList(SetupInf, DefaultLanguage);
|
LanguageList = CreateLanguageList(SetupInf, DefaultLanguage);
|
||||||
|
|
||||||
|
/* new part */
|
||||||
|
|
||||||
|
wcscpy(SelectedLanguageId,LocaleID);
|
||||||
|
|
||||||
|
PGENERIC_LIST_ENTRY ListEntry;
|
||||||
|
|
||||||
|
/* first we hack LanguageList */
|
||||||
|
ListEntry = GetFirstListEntry(LanguageList);
|
||||||
|
|
||||||
|
while (ListEntry != NULL)
|
||||||
|
{
|
||||||
|
if (!wcscmp(LocaleID, GetListEntryUserData(ListEntry)))
|
||||||
|
{
|
||||||
|
DPRINT("found %S in LanguageList\n",GetListEntryUserData(ListEntry));
|
||||||
|
SetCurrentListEntry(LanguageList, ListEntry);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ListEntry = GetNextListEntry(ListEntry);
|
||||||
|
}
|
||||||
|
/* now LayoutList */
|
||||||
|
ListEntry = GetFirstListEntry(LayoutList);
|
||||||
|
|
||||||
|
while (ListEntry != NULL)
|
||||||
|
{
|
||||||
|
if (!wcscmp(LocaleID, GetListEntryUserData(ListEntry)))
|
||||||
|
{
|
||||||
|
DPRINT("found %S in LayoutList\n",GetListEntryUserData(ListEntry));
|
||||||
|
SetCurrentListEntry(LayoutList, ListEntry);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ListEntry = GetNextListEntry(ListEntry);
|
||||||
|
}
|
||||||
|
SetConsoleCodePage();
|
||||||
|
|
||||||
return INSTALL_INTRO_PAGE;
|
return INSTALL_INTRO_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3235,6 +3280,8 @@ RegistryPage(PINPUT_RECORD Ir)
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!IsUnattendedSetup){
|
||||||
|
|
||||||
/* Update keyboard layout settings */
|
/* Update keyboard layout settings */
|
||||||
CONSOLE_SetStatusText(MUIGetString(STRING_KEYBOARDSETTINGSUPDATE));
|
CONSOLE_SetStatusText(MUIGetString(STRING_KEYBOARDSETTINGSUPDATE));
|
||||||
if (!ProcessKeyboardLayoutRegistry(LayoutList))
|
if (!ProcessKeyboardLayoutRegistry(LayoutList))
|
||||||
|
@ -3242,7 +3289,7 @@ RegistryPage(PINPUT_RECORD Ir)
|
||||||
MUIDisplayError(ERROR_UPDATE_KBSETTINGS, Ir, POPUP_WAIT_ENTER);
|
MUIDisplayError(ERROR_UPDATE_KBSETTINGS, Ir, POPUP_WAIT_ENTER);
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* Add codepage information to registry */
|
/* Add codepage information to registry */
|
||||||
CONSOLE_SetStatusText(MUIGetString(STRING_CODEPAGEINFOUPDATE));
|
CONSOLE_SetStatusText(MUIGetString(STRING_CODEPAGEINFOUPDATE));
|
||||||
if (!AddCodePage())
|
if (!AddCodePage())
|
||||||
|
|
Loading…
Reference in a new issue