[SETUPLIB][USETUP][INPUT.CPL] MUI integration with setuplib.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 30 Aug 2017 11:28:52 +0000 (11:28 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 27 Oct 2018 22:13:07 +0000 (00:13 +0200)
[SETUPLIB] Copy the mui* files from usetup into the setuplib for later usage, and add mui.c to build.

svn path=/branches/setup_improvements/; revision=75711

[SETUPLIB][USETUP] Start massaging the MUI files and split up what concerns only the usetup "resources",
and what concerns general language parameters (in the setuplib).

It may be interesting to retrieve the language parameters
from INF file (e.g. intl.inf) (suggested by Giannis).

svn path=/branches/setup_improvements/; revision=75715

[SETUPLIB] Add the necessary headers to mui.c to be able to compile.
[USETUP] Comment out the languages that don't have any resources.

svn path=/branches/setup_improvements/; revision=75716

[SETUPLIB][USETUP] Adjust MUI and settings code.

- Re-enable settings code concerning language, keyboards & layout
  in the setuplib, and remove the old code in usetup.

- Remove useless code in setuplib's mui.c.

- Rename usetup's MUI "LanguageList" into "ResourceList" so as to
  avoid colliding with the "LanguageList" of setuplib.

- Add the magic CMakeLists line "add_definitions(${I18N_DEFS})" that
  I forgot previously, that caused the "LanguageList" of setuplib to be empty!

The code compiles and works during my tests.

svn path=/branches/setup_improvements/; revision=75717

[SETUPLIB] Change some string pointer types & function prototypes so that the usetup-specific
"SelectedLanguageId" variable is not used in the library.

svn path=/branches/setup_improvements/; revision=75719

[SETUPLIB] Change some function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library.
Also, make AddEntriesFromInfSection(), DefaultProcessEntry() and the typedef PPROCESS_ENTRY_ROUTINE private again.

svn path=/branches/setup_improvements/; revision=75720
svn path=/branches/setup_improvements/; revision=75724

[USETUP] Code adaptations.

- Transform some do{}while() loops into while(){} ones, since the lists on which we work may only contain one single {NULL} element.
- Modify MUIGetOEMCodePage() call after r75719.
- Use PCWSTR where needed.

svn path=/branches/setup_improvements/; revision=75722

[USETUP] Adjust some MUI & settings calls, following the commits r75719, r75720 and r75721.

svn path=/branches/setup_improvements/; revision=75723

[INPUT.CPL] Adjust inclusion of "muifonts.h" (commit 3dbd44f) due to changes introduced in r75711 and r75715.

178 files changed:
base/setup/lib/CMakeLists.txt
base/setup/lib/lang/af-ZA.h [moved from base/setup/usetup/lang/af-ZA.h with 100% similarity]
base/setup/lib/lang/ar-AE.h [moved from base/setup/usetup/lang/ar-AE.h with 100% similarity]
base/setup/lib/lang/ar-BH.h [moved from base/setup/usetup/lang/ar-BH.h with 100% similarity]
base/setup/lib/lang/ar-DZ.h [moved from base/setup/usetup/lang/ar-DZ.h with 100% similarity]
base/setup/lib/lang/ar-EG.h [moved from base/setup/usetup/lang/ar-EG.h with 100% similarity]
base/setup/lib/lang/ar-IQ.h [moved from base/setup/usetup/lang/ar-IQ.h with 100% similarity]
base/setup/lib/lang/ar-JO.h [moved from base/setup/usetup/lang/ar-JO.h with 100% similarity]
base/setup/lib/lang/ar-KW.h [moved from base/setup/usetup/lang/ar-KW.h with 100% similarity]
base/setup/lib/lang/ar-LB.h [moved from base/setup/usetup/lang/ar-LB.h with 100% similarity]
base/setup/lib/lang/ar-LY.h [moved from base/setup/usetup/lang/ar-LY.h with 100% similarity]
base/setup/lib/lang/ar-MA.h [moved from base/setup/usetup/lang/ar-MA.h with 100% similarity]
base/setup/lib/lang/ar-OM.h [moved from base/setup/usetup/lang/ar-OM.h with 100% similarity]
base/setup/lib/lang/ar-QA.h [moved from base/setup/usetup/lang/ar-QA.h with 100% similarity]
base/setup/lib/lang/ar-SA.h [moved from base/setup/usetup/lang/ar-SA.h with 100% similarity]
base/setup/lib/lang/ar-SY.h [moved from base/setup/usetup/lang/ar-SY.h with 100% similarity]
base/setup/lib/lang/ar-TN.h [moved from base/setup/usetup/lang/ar-TN.h with 100% similarity]
base/setup/lib/lang/ar-YE.h [moved from base/setup/usetup/lang/ar-YE.h with 100% similarity]
base/setup/lib/lang/az-AZ.h [moved from base/setup/usetup/lang/az-AZ.h with 100% similarity]
base/setup/lib/lang/be-BY.h [moved from base/setup/usetup/lang/be-BY.h with 100% similarity]
base/setup/lib/lang/bg-BG.h [new file with mode: 0644]
base/setup/lib/lang/bn-BD.h [new file with mode: 0644]
base/setup/lib/lang/bn-IN.h [moved from base/setup/usetup/lang/bn-IN.h with 100% similarity]
base/setup/lib/lang/ca-ES.h [moved from base/setup/usetup/lang/ca-ES.h with 100% similarity]
base/setup/lib/lang/cs-CZ.h [new file with mode: 0644]
base/setup/lib/lang/da-DK.h [new file with mode: 0644]
base/setup/lib/lang/de-AT.h [moved from base/setup/usetup/lang/de-AT.h with 100% similarity]
base/setup/lib/lang/de-CH.h [moved from base/setup/usetup/lang/de-CH.h with 100% similarity]
base/setup/lib/lang/de-DE.h [new file with mode: 0644]
base/setup/lib/lang/de-LI.h [moved from base/setup/usetup/lang/de-LI.h with 100% similarity]
base/setup/lib/lang/de-LU.h [moved from base/setup/usetup/lang/de-LU.h with 100% similarity]
base/setup/lib/lang/dv-MV.h [moved from base/setup/usetup/lang/dv-MV.h with 100% similarity]
base/setup/lib/lang/el-GR.h [new file with mode: 0644]
base/setup/lib/lang/en-AU.h [moved from base/setup/usetup/lang/en-AU.h with 100% similarity]
base/setup/lib/lang/en-BZ.h [moved from base/setup/usetup/lang/en-BZ.h with 100% similarity]
base/setup/lib/lang/en-CA.h [moved from base/setup/usetup/lang/en-CA.h with 100% similarity]
base/setup/lib/lang/en-CB.h [moved from base/setup/usetup/lang/en-CB.h with 100% similarity]
base/setup/lib/lang/en-GB.h [moved from base/setup/usetup/lang/en-GB.h with 100% similarity]
base/setup/lib/lang/en-IE.h [moved from base/setup/usetup/lang/en-IE.h with 100% similarity]
base/setup/lib/lang/en-JM.h [moved from base/setup/usetup/lang/en-JM.h with 100% similarity]
base/setup/lib/lang/en-NZ.h [moved from base/setup/usetup/lang/en-NZ.h with 100% similarity]
base/setup/lib/lang/en-PH.h [moved from base/setup/usetup/lang/en-PH.h with 100% similarity]
base/setup/lib/lang/en-TT.h [moved from base/setup/usetup/lang/en-TT.h with 100% similarity]
base/setup/lib/lang/en-US.h [new file with mode: 0644]
base/setup/lib/lang/en-ZA.h [moved from base/setup/usetup/lang/en-ZA.h with 100% similarity]
base/setup/lib/lang/en-ZW.h [moved from base/setup/usetup/lang/en-ZW.h with 100% similarity]
base/setup/lib/lang/eo-AA.h [moved from base/setup/usetup/lang/eo-AA.h with 100% similarity]
base/setup/lib/lang/es-AR.h [moved from base/setup/usetup/lang/es-AR.h with 100% similarity]
base/setup/lib/lang/es-BO.h [moved from base/setup/usetup/lang/es-BO.h with 100% similarity]
base/setup/lib/lang/es-CL.h [moved from base/setup/usetup/lang/es-CL.h with 100% similarity]
base/setup/lib/lang/es-CO.h [moved from base/setup/usetup/lang/es-CO.h with 100% similarity]
base/setup/lib/lang/es-CR.h [moved from base/setup/usetup/lang/es-CR.h with 100% similarity]
base/setup/lib/lang/es-DO.h [moved from base/setup/usetup/lang/es-DO.h with 100% similarity]
base/setup/lib/lang/es-EC.h [moved from base/setup/usetup/lang/es-EC.h with 100% similarity]
base/setup/lib/lang/es-ES.h [new file with mode: 0644]
base/setup/lib/lang/es-GT.h [moved from base/setup/usetup/lang/es-GT.h with 100% similarity]
base/setup/lib/lang/es-HN.h [moved from base/setup/usetup/lang/es-HN.h with 100% similarity]
base/setup/lib/lang/es-MX.h [moved from base/setup/usetup/lang/es-MX.h with 100% similarity]
base/setup/lib/lang/es-NI.h [moved from base/setup/usetup/lang/es-NI.h with 100% similarity]
base/setup/lib/lang/es-PA.h [moved from base/setup/usetup/lang/es-PA.h with 100% similarity]
base/setup/lib/lang/es-PE.h [moved from base/setup/usetup/lang/es-PE.h with 100% similarity]
base/setup/lib/lang/es-PR.h [moved from base/setup/usetup/lang/es-PR.h with 100% similarity]
base/setup/lib/lang/es-PY.h [moved from base/setup/usetup/lang/es-PY.h with 100% similarity]
base/setup/lib/lang/es-SV.h [moved from base/setup/usetup/lang/es-SV.h with 100% similarity]
base/setup/lib/lang/es-UY.h [moved from base/setup/usetup/lang/es-UY.h with 100% similarity]
base/setup/lib/lang/es-VE.h [moved from base/setup/usetup/lang/es-VE.h with 100% similarity]
base/setup/lib/lang/et-EE.h [new file with mode: 0644]
base/setup/lib/lang/eu-ES.h [moved from base/setup/usetup/lang/eu-ES.h with 100% similarity]
base/setup/lib/lang/fa-IR.h [moved from base/setup/usetup/lang/fa-IR.h with 100% similarity]
base/setup/lib/lang/fi-FI.h [moved from base/setup/usetup/lang/fi-FI.h with 100% similarity]
base/setup/lib/lang/fo-FO.h [moved from base/setup/usetup/lang/fo-FO.h with 100% similarity]
base/setup/lib/lang/fr-BE.h [moved from base/setup/usetup/lang/fr-BE.h with 100% similarity]
base/setup/lib/lang/fr-CA.h [moved from base/setup/usetup/lang/fr-CA.h with 100% similarity]
base/setup/lib/lang/fr-CH.h [moved from base/setup/usetup/lang/fr-CH.h with 100% similarity]
base/setup/lib/lang/fr-FR.h [new file with mode: 0644]
base/setup/lib/lang/fr-LU.h [moved from base/setup/usetup/lang/fr-LU.h with 100% similarity]
base/setup/lib/lang/fr-MC.h [moved from base/setup/usetup/lang/fr-MC.h with 100% similarity]
base/setup/lib/lang/gl-ES.h [moved from base/setup/usetup/lang/gl-ES.h with 100% similarity]
base/setup/lib/lang/gu-IN.h [moved from base/setup/usetup/lang/gu-IN.h with 100% similarity]
base/setup/lib/lang/he-IL.h [new file with mode: 0644]
base/setup/lib/lang/hi-IN.h [moved from base/setup/usetup/lang/hi-IN.h with 100% similarity]
base/setup/lib/lang/hr-HR.h [moved from base/setup/usetup/lang/hr-HR.h with 100% similarity]
base/setup/lib/lang/hu-HU.h [moved from base/setup/usetup/lang/hu-HU.h with 100% similarity]
base/setup/lib/lang/hy-AM.h [moved from base/setup/usetup/lang/hy-AM.h with 100% similarity]
base/setup/lib/lang/id-ID.h [moved from base/setup/usetup/lang/id-ID.h with 100% similarity]
base/setup/lib/lang/is-IS.h [moved from base/setup/usetup/lang/is-IS.h with 100% similarity]
base/setup/lib/lang/it-CH.h [moved from base/setup/usetup/lang/it-CH.h with 100% similarity]
base/setup/lib/lang/it-IT.h [new file with mode: 0644]
base/setup/lib/lang/ja-JP.h [new file with mode: 0644]
base/setup/lib/lang/ka-GE.h [moved from base/setup/usetup/lang/ka-GE.h with 100% similarity]
base/setup/lib/lang/kk-KZ.h [moved from base/setup/usetup/lang/kk-KZ.h with 100% similarity]
base/setup/lib/lang/kn-IN.h [moved from base/setup/usetup/lang/kn-IN.h with 100% similarity]
base/setup/lib/lang/ko-KR.h [moved from base/setup/usetup/lang/ko-KR.h with 100% similarity]
base/setup/lib/lang/kok-IN.h [moved from base/setup/usetup/lang/kok-IN.h with 100% similarity]
base/setup/lib/lang/ky-KG.h [moved from base/setup/usetup/lang/ky-KG.h with 100% similarity]
base/setup/lib/lang/lt-LT.h [new file with mode: 0644]
base/setup/lib/lang/lv-LV.h [moved from base/setup/usetup/lang/lv-LV.h with 100% similarity]
base/setup/lib/lang/mk-MK.h [moved from base/setup/usetup/lang/mk-MK.h with 100% similarity]
base/setup/lib/lang/mn-MN.h [moved from base/setup/usetup/lang/mn-MN.h with 100% similarity]
base/setup/lib/lang/mr-IN.h [moved from base/setup/usetup/lang/mr-IN.h with 100% similarity]
base/setup/lib/lang/ms-BN.h [moved from base/setup/usetup/lang/ms-BN.h with 100% similarity]
base/setup/lib/lang/ms-MY.h [new file with mode: 0644]
base/setup/lib/lang/my-MM.h [moved from base/setup/usetup/lang/my-MM.h with 100% similarity]
base/setup/lib/lang/nl-BE.h [moved from base/setup/usetup/lang/nl-BE.h with 100% similarity]
base/setup/lib/lang/nl-NL.h [new file with mode: 0644]
base/setup/lib/lang/nn-NO.h [moved from base/setup/usetup/lang/nn-NO.h with 100% similarity]
base/setup/lib/lang/pa-IN.h [moved from base/setup/usetup/lang/pa-IN.h with 100% similarity]
base/setup/lib/lang/pl-PL.h [new file with mode: 0644]
base/setup/lib/lang/pt-BR.h [new file with mode: 0644]
base/setup/lib/lang/pt-PT.h [moved from base/setup/usetup/lang/pt-PT.h with 100% similarity]
base/setup/lib/lang/rm-CH.h [moved from base/setup/usetup/lang/rm-CH.h with 100% similarity]
base/setup/lib/lang/ro-RO.h [new file with mode: 0644]
base/setup/lib/lang/ru-RU.h [new file with mode: 0644]
base/setup/lib/lang/sa-IN.h [moved from base/setup/usetup/lang/sa-IN.h with 100% similarity]
base/setup/lib/lang/sk-SK.h [new file with mode: 0644]
base/setup/lib/lang/sl-SI.h [moved from base/setup/usetup/lang/sl-SI.h with 100% similarity]
base/setup/lib/lang/sq-AL.h [new file with mode: 0644]
base/setup/lib/lang/sr-SP.h [moved from base/setup/usetup/lang/sr-SP.h with 100% similarity]
base/setup/lib/lang/sv-FI.h [moved from base/setup/usetup/lang/sv-FI.h with 100% similarity]
base/setup/lib/lang/sv-SE.h [new file with mode: 0644]
base/setup/lib/lang/sw-KE.h [moved from base/setup/usetup/lang/sw-KE.h with 100% similarity]
base/setup/lib/lang/syr-SY.h [moved from base/setup/usetup/lang/syr-SY.h with 100% similarity]
base/setup/lib/lang/ta-IN.h [moved from base/setup/usetup/lang/ta-IN.h with 100% similarity]
base/setup/lib/lang/te-IN.h [moved from base/setup/usetup/lang/te-IN.h with 100% similarity]
base/setup/lib/lang/th-TH.h [moved from base/setup/usetup/lang/th-TH.h with 100% similarity]
base/setup/lib/lang/tr-TR.h [new file with mode: 0644]
base/setup/lib/lang/tt-TA.h [moved from base/setup/usetup/lang/tt-TA.h with 100% similarity]
base/setup/lib/lang/uk-UA.h [new file with mode: 0644]
base/setup/lib/lang/ur-PK.h [moved from base/setup/usetup/lang/ur-PK.h with 100% similarity]
base/setup/lib/lang/uz-UZ.h [moved from base/setup/usetup/lang/uz-UZ.h with 100% similarity]
base/setup/lib/lang/vi-VN.h [moved from base/setup/usetup/lang/vi-VN.h with 100% similarity]
base/setup/lib/lang/wa-BE.h [moved from base/setup/usetup/lang/wa-BE.h with 100% similarity]
base/setup/lib/lang/zh-CN.h [moved from base/setup/usetup/lang/zh-CN.h with 100% similarity]
base/setup/lib/lang/zh-HK.h [moved from base/setup/usetup/lang/zh-HK.h with 100% similarity]
base/setup/lib/lang/zh-MO.h [moved from base/setup/usetup/lang/zh-MO.h with 100% similarity]
base/setup/lib/lang/zh-SG.h [moved from base/setup/usetup/lang/zh-SG.h with 100% similarity]
base/setup/lib/lang/zh-TW.h [moved from base/setup/usetup/lang/zh-TW.h with 100% similarity]
base/setup/lib/mui.c [new file with mode: 0644]
base/setup/lib/mui.h [new file with mode: 0644]
base/setup/lib/muifonts.h [moved from base/setup/usetup/muifonts.h with 100% similarity]
base/setup/lib/muilanguages.h [new file with mode: 0644]
base/setup/lib/settings.c
base/setup/lib/settings.h
base/setup/lib/setuplib.h
base/setup/usetup/CMakeLists.txt
base/setup/usetup/lang/bg-BG.h
base/setup/usetup/lang/bn-BD.h
base/setup/usetup/lang/cs-CZ.h
base/setup/usetup/lang/da-DK.h
base/setup/usetup/lang/de-DE.h
base/setup/usetup/lang/el-GR.h
base/setup/usetup/lang/en-US.h
base/setup/usetup/lang/es-ES.h
base/setup/usetup/lang/et-EE.h
base/setup/usetup/lang/fr-FR.h
base/setup/usetup/lang/he-IL.h
base/setup/usetup/lang/it-IT.h
base/setup/usetup/lang/ja-JP.h
base/setup/usetup/lang/lt-LT.h
base/setup/usetup/lang/ms-MY.h
base/setup/usetup/lang/nl-NL.h
base/setup/usetup/lang/pl-PL.h
base/setup/usetup/lang/pt-BR.h
base/setup/usetup/lang/ro-RO.h
base/setup/usetup/lang/ru-RU.h
base/setup/usetup/lang/sk-SK.h
base/setup/usetup/lang/sq-AL.h
base/setup/usetup/lang/sv-SE.h
base/setup/usetup/lang/tr-TR.h
base/setup/usetup/lang/uk-UA.h
base/setup/usetup/mui.c
base/setup/usetup/mui.h
base/setup/usetup/muilanguages.h
base/setup/usetup/settings.c [deleted file]
base/setup/usetup/settings.h [deleted file]
base/setup/usetup/usetup.c
base/setup/usetup/usetup.h
dll/cpl/input/input_list.c

index 965dd1f..199dffd 100644 (file)
@@ -1,4 +1,6 @@
 
+add_definitions(${I18N_DEFS})
+
 include_directories(utils)
 
 list(APPEND SOURCE
@@ -14,6 +16,7 @@ list(APPEND SOURCE
     utils/regutil.c
     bootsup.c
     fsutil.c
+    mui.c
     registry.c
     settings.c
     setuplib.c
diff --git a/base/setup/lib/lang/bg-BG.h b/base/setup/lib/lang/bg-BG.h
new file mode 100644 (file)
index 0000000..8b6b788
--- /dev/null
@@ -0,0 +1,10 @@
+#pragma once
+
+MUI_LAYOUTS bgBGLayouts[] =
+{
+    { L"0402", L"00000402" },
+    { L"0402", L"00020402" },
+    { L"0402", L"00030402" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/bn-BD.h b/base/setup/lib/lang/bn-BD.h
new file mode 100644 (file)
index 0000000..2d2c510
--- /dev/null
@@ -0,0 +1,7 @@
+#pragma once
+
+MUI_LAYOUTS bnBDLayouts[] =
+{
+    { L"0845", L"00000845" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/cs-CZ.h b/base/setup/lib/lang/cs-CZ.h
new file mode 100644 (file)
index 0000000..ef5eb7a
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+MUI_LAYOUTS csCZLayouts[] =
+{
+    { L"0405", L"00000405" },
+    { L"0405", L"00010405" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/da-DK.h b/base/setup/lib/lang/da-DK.h
new file mode 100644 (file)
index 0000000..cce5930
--- /dev/null
@@ -0,0 +1,7 @@
+#pragma once
+
+MUI_LAYOUTS daDKLayouts[] =
+{
+    { L"0406", L"00000406" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/de-DE.h b/base/setup/lib/lang/de-DE.h
new file mode 100644 (file)
index 0000000..a1c1d25
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS deDELayouts[] =
+{
+    { L"0407", L"00000407" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/el-GR.h b/base/setup/lib/lang/el-GR.h
new file mode 100644 (file)
index 0000000..2718d43
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS elGRLayouts[] =
+{
+    { L"0408", L"00000408" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/en-US.h b/base/setup/lib/lang/en-US.h
new file mode 100644 (file)
index 0000000..b175c6d
--- /dev/null
@@ -0,0 +1,7 @@
+#pragma once
+
+MUI_LAYOUTS enUSLayouts[] =
+{
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/es-ES.h b/base/setup/lib/lang/es-ES.h
new file mode 100644 (file)
index 0000000..756e724
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS esESLayouts[] =
+{
+    { L"040A", L"0000040A" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/et-EE.h b/base/setup/lib/lang/et-EE.h
new file mode 100644 (file)
index 0000000..bed36d4
--- /dev/null
@@ -0,0 +1,7 @@
+#pragma once
+
+MUI_LAYOUTS etEELayouts[] =
+{
+    { L"0425", L"00000425" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/fr-FR.h b/base/setup/lib/lang/fr-FR.h
new file mode 100644 (file)
index 0000000..771cabb
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS frFRLayouts[] =
+{
+    { L"040C", L"0000040C" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/he-IL.h b/base/setup/lib/lang/he-IL.h
new file mode 100644 (file)
index 0000000..9c18824
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS heILLayouts[] =
+{
+    { L"0409", L"00000409" },
+    { L"040D", L"0000040D" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/it-IT.h b/base/setup/lib/lang/it-IT.h
new file mode 100644 (file)
index 0000000..6add5ca
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS itITLayouts[] =
+{
+    { L"0410", L"00000410" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/ja-JP.h b/base/setup/lib/lang/ja-JP.h
new file mode 100644 (file)
index 0000000..2d8a6eb
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS jaJPLayouts[] =
+{
+//    { L"0411", L"e0010411" },
+    { L"0411", L"00000411" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/lt-LT.h b/base/setup/lib/lang/lt-LT.h
new file mode 100644 (file)
index 0000000..1c1207e
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS ltLTLayouts[] =
+{
+    { L"0427", L"00010427" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/ms-MY.h b/base/setup/lib/lang/ms-MY.h
new file mode 100644 (file)
index 0000000..646eb6a
--- /dev/null
@@ -0,0 +1,7 @@
+#pragma once
+
+MUI_LAYOUTS msMYLayouts[] =
+{
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/nl-NL.h b/base/setup/lib/lang/nl-NL.h
new file mode 100644 (file)
index 0000000..ead630c
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+MUI_LAYOUTS nlNLLayouts[] =
+{
+    { L"0413", L"00020409" },
+    { L"0413", L"00000413" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/pl-PL.h b/base/setup/lib/lang/pl-PL.h
new file mode 100644 (file)
index 0000000..1e720e7
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+MUI_LAYOUTS plPLLayouts[] =
+{
+    { L"0415", L"00000415" },
+    { L"0415", L"00010415" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/pt-BR.h b/base/setup/lib/lang/pt-BR.h
new file mode 100644 (file)
index 0000000..6c545ad
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS ptBRLayouts[] =
+{
+    { L"0416", L"00000416" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/ro-RO.h b/base/setup/lib/lang/ro-RO.h
new file mode 100644 (file)
index 0000000..f8f1744
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS roROLayouts[] =
+{
+    { L"0418", L"00000418" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/ru-RU.h b/base/setup/lib/lang/ru-RU.h
new file mode 100644 (file)
index 0000000..c9c502c
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS ruRULayouts[] =
+{
+    { L"0419", L"00000419" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/sk-SK.h b/base/setup/lib/lang/sk-SK.h
new file mode 100644 (file)
index 0000000..005dcd3
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+MUI_LAYOUTS skSKLayouts[] =
+{
+    { L"041B", L"0000041B" },
+    { L"041B", L"0001041B" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/sq-AL.h b/base/setup/lib/lang/sq-AL.h
new file mode 100644 (file)
index 0000000..195368a
--- /dev/null
@@ -0,0 +1,7 @@
+#pragma once
+
+MUI_LAYOUTS sqALLayouts[] =
+{
+    { L"041C", L"0000041C" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/sv-SE.h b/base/setup/lib/lang/sv-SE.h
new file mode 100644 (file)
index 0000000..6672804
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS svSELayouts[] =
+{
+    { L"041D", L"0000041D" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/tr-TR.h b/base/setup/lib/lang/tr-TR.h
new file mode 100644 (file)
index 0000000..cedb76c
--- /dev/null
@@ -0,0 +1,9 @@
+#pragma once
+
+MUI_LAYOUTS trTRLayouts[] =
+{
+    { L"041F", L"0000041F" },
+    { L"041F", L"0001041F" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/lang/uk-UA.h b/base/setup/lib/lang/uk-UA.h
new file mode 100644 (file)
index 0000000..a5d98c1
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+MUI_LAYOUTS ukUALayouts[] =
+{
+    { L"0422", L"00000422" },
+    { L"0409", L"00000409" },
+    { NULL, NULL }
+};
diff --git a/base/setup/lib/mui.c b/base/setup/lib/mui.c
new file mode 100644 (file)
index 0000000..1e7eb9d
--- /dev/null
@@ -0,0 +1,551 @@
+/*
+ *  ReactOS kernel
+ *  Copyright (C) 2008 ReactOS Team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+/*
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS text-mode setup
+ * FILE:            base/setup/usetup/mui.c
+ * PURPOSE:         Text-mode setup
+ * PROGRAMMER:
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include "precomp.h"
+#include "mui.h"
+#include "muifonts.h"
+#include "muilanguages.h"
+#include "registry.h"
+
+#define NDEBUG
+#include <debug.h>
+
+
+/* FUNCTIONS ****************************************************************/
+
+static
+ULONG
+FindLanguageIndex(
+    IN PCWSTR LanguageId)
+{
+    ULONG lngIndex = 0;
+
+    if (LanguageId == NULL)
+    {
+        /* Default to en-US */
+        // return 0;   // FIXME!!
+        LanguageId = L"00000409";
+    }
+
+    while (MUILanguageList[lngIndex].LanguageID != NULL)
+    {
+        if (_wcsicmp(MUILanguageList[lngIndex].LanguageID, LanguageId) == 0)
+        {
+            return lngIndex;
+        }
+
+        lngIndex++;
+    }
+
+    return 0;
+}
+
+BOOLEAN
+IsLanguageAvailable(
+    IN PCWSTR LanguageId)
+{
+    ULONG lngIndex = 0;
+
+    while (MUILanguageList[lngIndex].LanguageID != NULL)
+    {
+        if (_wcsicmp(MUILanguageList[lngIndex].LanguageID, LanguageId) == 0)
+            return TRUE;
+
+        lngIndex++;
+    }
+
+    return FALSE;
+}
+
+
+PCWSTR
+MUIDefaultKeyboardLayout(
+    IN PCWSTR LanguageId)
+{
+    ULONG lngIndex = max(FindLanguageIndex(LanguageId), 0);
+    return MUILanguageList[lngIndex].MuiLayouts[0].LayoutID;
+}
+
+PCWSTR
+MUIGetOEMCodePage(
+    IN PCWSTR LanguageId)
+{
+    ULONG lngIndex = max(FindLanguageIndex(LanguageId), 0);
+    return MUILanguageList[lngIndex].OEMCPage;
+}
+
+PCWSTR
+MUIGetGeoID(
+    IN PCWSTR LanguageId)
+{
+    ULONG lngIndex = max(FindLanguageIndex(LanguageId), 0);
+    return MUILanguageList[lngIndex].GeoID;
+}
+
+const MUI_LAYOUTS*
+MUIGetLayoutsList(
+    IN PCWSTR LanguageId)
+{
+    ULONG lngIndex = max(FindLanguageIndex(LanguageId), 0);
+    return MUILanguageList[lngIndex].MuiLayouts;
+}
+
+
+static
+BOOLEAN
+AddHotkeySettings(
+    IN PCWSTR Hotkey,
+    IN PCWSTR LangHotkey,
+    IN PCWSTR LayoutHotkey)
+{
+    OBJECT_ATTRIBUTES ObjectAttributes;
+    UNICODE_STRING KeyName;
+    UNICODE_STRING ValueName;
+    HANDLE KeyHandle;
+    ULONG Disposition;
+    NTSTATUS Status;
+
+    RtlInitUnicodeString(&KeyName,
+                         L".DEFAULT\\Keyboard Layout\\Toggle");
+    InitializeObjectAttributes(&ObjectAttributes,
+                               &KeyName,
+                               OBJ_CASE_INSENSITIVE,
+                               GetRootKeyByPredefKey(HKEY_USERS, NULL),
+                               NULL);
+
+    Status =  NtCreateKey(&KeyHandle,
+                          KEY_SET_VALUE,
+                          &ObjectAttributes,
+                          0,
+                          NULL,
+                          REG_OPTION_NON_VOLATILE,
+                          &Disposition);
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
+        return FALSE;
+    }
+
+    RtlInitUnicodeString(&ValueName,
+                         L"Hotkey");
+
+    Status = NtSetValueKey(KeyHandle,
+                           &ValueName,
+                           0,
+                           REG_SZ,
+                           (PVOID)Hotkey,
+                           (1 + 1) * sizeof(WCHAR));
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+        NtClose(KeyHandle);
+        return FALSE;
+    }
+
+    RtlInitUnicodeString(&ValueName,
+                         L"Language Hotkey");
+
+    Status = NtSetValueKey(KeyHandle,
+                           &ValueName,
+                           0,
+                           REG_SZ,
+                           (PVOID)LangHotkey,
+                           (1 + 1) * sizeof(WCHAR));
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+        NtClose(KeyHandle);
+        return FALSE;
+    }
+
+    RtlInitUnicodeString(&ValueName,
+                         L"Layout Hotkey");
+
+    Status = NtSetValueKey(KeyHandle,
+                           &ValueName,
+                           0,
+                           REG_SZ,
+                           (PVOID)LayoutHotkey,
+                           (1 + 1) * sizeof(WCHAR));
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+        NtClose(KeyHandle);
+        return FALSE;
+    }
+
+    NtClose(KeyHandle);
+    return TRUE;
+}
+
+BOOLEAN
+AddKbLayoutsToRegistry(
+    IN const MUI_LAYOUTS *MuiLayouts)
+{
+    OBJECT_ATTRIBUTES ObjectAttributes;
+    UNICODE_STRING KeyName;
+    UNICODE_STRING ValueName;
+    HANDLE KeyHandle;
+    HANDLE SubKeyHandle;
+    NTSTATUS Status;
+    ULONG Disposition;
+    ULONG uIndex = 0;
+    ULONG uCount = 0;
+    WCHAR szKeyName[48] = L".DEFAULT\\Keyboard Layout";
+    WCHAR szValueName[3 + 1];
+    WCHAR szLangID[8 + 1];
+
+    // Open the keyboard layout key
+    RtlInitUnicodeString(&KeyName, szKeyName);
+    InitializeObjectAttributes(&ObjectAttributes,
+                               &KeyName,
+                               OBJ_CASE_INSENSITIVE,
+                               GetRootKeyByPredefKey(HKEY_USERS, NULL),
+                               NULL);
+
+    Status =  NtCreateKey(&KeyHandle,
+                          KEY_CREATE_SUB_KEY,
+                          &ObjectAttributes,
+                          0,
+                          NULL,
+                          REG_OPTION_NON_VOLATILE,
+                          &Disposition);
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
+        return FALSE;
+    }
+
+    NtClose(KeyHandle);
+
+    KeyName.MaximumLength = sizeof(szKeyName);
+    Status = RtlAppendUnicodeToString(&KeyName, L"\\Preload");
+
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("RtlAppend failed! (%lx)\n", Status);
+        DPRINT1("String is %wZ\n", &KeyName);
+        return FALSE;
+    }
+
+    InitializeObjectAttributes(&ObjectAttributes,
+                               &KeyName,
+                               OBJ_CASE_INSENSITIVE,
+                               GetRootKeyByPredefKey(HKEY_USERS, NULL),
+                               NULL);
+
+    Status = NtCreateKey(&KeyHandle,
+                         KEY_SET_VALUE,
+                         &ObjectAttributes,
+                         0,
+                         NULL,
+                         REG_OPTION_NON_VOLATILE,
+                         &Disposition);
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
+        return FALSE;
+    }
+
+    RtlInitUnicodeString(&KeyName, L".DEFAULT\\Keyboard Layout\\Substitutes");
+    InitializeObjectAttributes(&ObjectAttributes,
+                               &KeyName,
+                               OBJ_CASE_INSENSITIVE,
+                               GetRootKeyByPredefKey(HKEY_USERS, NULL),
+                               NULL);
+
+    Status =  NtCreateKey(&SubKeyHandle,
+                          KEY_SET_VALUE,
+                          &ObjectAttributes,
+                          0,
+                          NULL,
+                          REG_OPTION_NON_VOLATILE,
+                          &Disposition);
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
+        NtClose(SubKeyHandle);
+        NtClose(KeyHandle);
+        return FALSE;
+    }
+
+    while (MuiLayouts[uIndex].LangID != NULL)
+    {
+        if (uIndex > 19) break;
+
+        swprintf(szValueName, L"%u", uIndex + 1);
+        RtlInitUnicodeString(&ValueName, szValueName);
+
+        swprintf(szLangID, L"0000%s", MuiLayouts[uIndex].LangID);
+
+        if (_wcsicmp(szLangID, MuiLayouts[uIndex].LayoutID) == 0)
+        {
+            Status = NtSetValueKey(KeyHandle,
+                                   &ValueName,
+                                   0,
+                                   REG_SZ,
+                                   (PVOID)MuiLayouts[uIndex].LayoutID,
+                                   (wcslen(MuiLayouts[uIndex].LayoutID)+1) * sizeof(WCHAR));
+            if (!NT_SUCCESS(Status))
+            {
+                DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n", Status, uIndex);
+                NtClose(SubKeyHandle);
+                NtClose(KeyHandle);
+                return FALSE;
+            }
+        }
+        else
+        {
+            swprintf(szLangID, L"d%03lu%s", uCount, MuiLayouts[uIndex].LangID);
+            Status = NtSetValueKey(KeyHandle,
+                                   &ValueName,
+                                   0,
+                                   REG_SZ,
+                                   (PVOID)szLangID,
+                                   (wcslen(szLangID)+1) * sizeof(WCHAR));
+            if (!NT_SUCCESS(Status))
+            {
+                DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n", Status, uIndex);
+                NtClose(SubKeyHandle);
+                NtClose(KeyHandle);
+                return FALSE;
+            }
+
+            RtlInitUnicodeString(&ValueName, szLangID);
+
+            Status = NtSetValueKey(SubKeyHandle,
+                                   &ValueName,
+                                   0,
+                                   REG_SZ,
+                                   (PVOID)MuiLayouts[uIndex].LayoutID,
+                                   (wcslen(MuiLayouts[uIndex].LayoutID)+1) * sizeof(WCHAR));
+            if (!NT_SUCCESS(Status))
+            {
+                DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %u)\n", Status, uIndex);
+                NtClose(SubKeyHandle);
+                NtClose(KeyHandle);
+                return FALSE;
+            }
+
+            uCount++;
+        }
+
+        uIndex++;
+    }
+
+    if (uIndex > 1)
+        AddHotkeySettings(L"2", L"2", L"1");
+    else
+        AddHotkeySettings(L"3", L"3", L"3");
+
+    NtClose(SubKeyHandle);
+    NtClose(KeyHandle);
+    return TRUE;
+}
+
+BOOLEAN
+AddKeyboardLayouts(
+    IN PCWSTR LanguageId)
+{
+    ULONG lngIndex = 0;
+
+    while (MUILanguageList[lngIndex].LanguageID != NULL)
+    {
+        if (_wcsicmp(MUILanguageList[lngIndex].LanguageID, LanguageId) == 0)
+        {
+            return AddKbLayoutsToRegistry(MUILanguageList[lngIndex].MuiLayouts);
+        }
+
+        lngIndex++;
+    }
+
+    return FALSE;
+}
+
+static
+BOOLEAN
+AddCodepageToRegistry(
+    IN PCWSTR ACPage,
+    IN PCWSTR OEMCPage,
+    IN PCWSTR MACCPage)
+{
+    OBJECT_ATTRIBUTES ObjectAttributes;
+    UNICODE_STRING KeyName;
+    UNICODE_STRING ValueName;
+    HANDLE KeyHandle;
+    NTSTATUS Status;
+
+    // Open the nls codepage key
+    RtlInitUnicodeString(&KeyName,
+                         L"SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage");
+    InitializeObjectAttributes(&ObjectAttributes,
+                               &KeyName,
+                               OBJ_CASE_INSENSITIVE,
+                               GetRootKeyByPredefKey(HKEY_LOCAL_MACHINE, NULL),
+                               NULL);
+    Status = NtOpenKey(&KeyHandle,
+                       KEY_WRITE,
+                       &ObjectAttributes);
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtOpenKey() failed (Status %lx)\n", Status);
+        return FALSE;
+    }
+
+    // Set ANSI codepage
+    RtlInitUnicodeString(&ValueName, L"ACP");
+    Status = NtSetValueKey(KeyHandle,
+                           &ValueName,
+                           0,
+                           REG_SZ,
+                           (PVOID)ACPage,
+                           (wcslen(ACPage)+1) * sizeof(WCHAR));
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+        NtClose(KeyHandle);
+        return FALSE;
+    }
+
+    // Set OEM codepage
+    RtlInitUnicodeString(&ValueName, L"OEMCP");
+    Status = NtSetValueKey(KeyHandle,
+                           &ValueName,
+                           0,
+                           REG_SZ,
+                           (PVOID)OEMCPage,
+                           (wcslen(OEMCPage)+1) * sizeof(WCHAR));
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+        NtClose(KeyHandle);
+        return FALSE;
+    }
+
+    // Set MAC codepage
+    RtlInitUnicodeString(&ValueName, L"MACCP");
+    Status = NtSetValueKey(KeyHandle,
+                           &ValueName,
+                           0,
+                           REG_SZ,
+                           (PVOID)MACCPage,
+                           (wcslen(MACCPage)+1) * sizeof(WCHAR));
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
+        NtClose(KeyHandle);
+        return FALSE;
+    }
+
+    NtClose(KeyHandle);
+
+    return TRUE;
+}
+
+static
+BOOLEAN
+AddFontsSettingsToRegistry(
+    IN const MUI_SUBFONT * MuiSubFonts)
+{
+    OBJECT_ATTRIBUTES ObjectAttributes;
+    UNICODE_STRING KeyName;
+    UNICODE_STRING ValueName;
+    HANDLE KeyHandle;
+    NTSTATUS Status;
+    ULONG uIndex = 0;
+
+    RtlInitUnicodeString(&KeyName,
+                         L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes");
+    InitializeObjectAttributes(&ObjectAttributes,
+                               &KeyName,
+                               OBJ_CASE_INSENSITIVE,
+                               GetRootKeyByPredefKey(HKEY_LOCAL_MACHINE, NULL),
+                               NULL);
+    Status = NtOpenKey(&KeyHandle,
+                       KEY_WRITE,
+                       &ObjectAttributes);
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT1("NtOpenKey() failed (Status %lx)\n", Status);
+        return FALSE;
+    }
+
+    while (MuiSubFonts[uIndex].FontName != NULL)
+    {
+        RtlInitUnicodeString(&ValueName, MuiSubFonts[uIndex].FontName);
+        Status = NtSetValueKey(KeyHandle,
+                               &ValueName,
+                               0,
+                               REG_SZ,
+                               (PVOID)MuiSubFonts[uIndex].SubFontName,
+                               (wcslen(MuiSubFonts[uIndex].SubFontName)+1) * sizeof(WCHAR));
+        if (!NT_SUCCESS(Status))
+        {
+            DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n", Status, uIndex);
+            NtClose(KeyHandle);
+            return FALSE;
+        }
+
+        uIndex++;
+    }
+
+    NtClose(KeyHandle);
+
+    return TRUE;
+}
+
+BOOLEAN
+AddCodePage(
+    IN PCWSTR LanguageId)
+{
+    ULONG lngIndex = 0;
+
+    while (MUILanguageList[lngIndex].LanguageID != NULL)
+    {
+        if (_wcsicmp(MUILanguageList[lngIndex].LanguageID, LanguageId) == 0)
+        {
+            if (AddCodepageToRegistry(MUILanguageList[lngIndex].ACPage,
+                                      MUILanguageList[lngIndex].OEMCPage,
+                                      MUILanguageList[lngIndex].MACCPage) &&
+                AddFontsSettingsToRegistry(MUILanguageList[lngIndex].MuiSubFonts))
+            {
+                return TRUE;
+            }
+            else
+            {
+                return FALSE;
+            }
+        }
+
+        lngIndex++;
+    }
+
+    return FALSE;
+}
+
+/* EOF */
diff --git a/base/setup/lib/mui.h b/base/setup/lib/mui.h
new file mode 100644 (file)
index 0000000..f48d94c
--- /dev/null
@@ -0,0 +1,58 @@
+#pragma once
+
+typedef struct
+{
+    PCWSTR FontName;
+    PCWSTR SubFontName;
+} MUI_SUBFONT;
+
+typedef struct
+{
+    PCWSTR LangID; // Language ID (like "0409")
+    PCWSTR LayoutID; // Layout ID (like "00000409")
+} MUI_LAYOUTS;
+
+typedef struct
+{
+    PCWSTR LanguageID;
+    PCWSTR ACPage;
+    PCWSTR OEMCPage;
+    PCWSTR MACCPage;
+    PCWSTR LanguageDescriptor;
+    PCWSTR GeoID;
+    const MUI_SUBFONT * MuiSubFonts;
+    const MUI_LAYOUTS * MuiLayouts;
+} MUI_LANGUAGE;
+
+
+BOOLEAN
+IsLanguageAvailable(
+    IN PCWSTR LanguageId);
+
+PCWSTR
+MUIDefaultKeyboardLayout(
+    IN PCWSTR LanguageId);
+
+PCWSTR
+MUIGetOEMCodePage(
+    IN PCWSTR LanguageId);
+
+PCWSTR
+MUIGetGeoID(
+    IN PCWSTR LanguageId);
+
+const MUI_LAYOUTS*
+MUIGetLayoutsList(
+    IN PCWSTR LanguageId);
+
+BOOLEAN
+AddKbLayoutsToRegistry(
+    IN const MUI_LAYOUTS *MuiLayouts);
+
+BOOLEAN
+AddKeyboardLayouts(
+    IN PCWSTR LanguageId);
+
+BOOLEAN
+AddCodePage(
+    IN PCWSTR LanguageId);
diff --git a/base/setup/lib/muilanguages.h b/base/setup/lib/muilanguages.h
new file mode 100644 (file)
index 0000000..503d9c2
--- /dev/null
@@ -0,0 +1,842 @@
+#pragma once
+
+#ifdef LANGUAGE_AF_ZA
+    #include "lang/af-ZA.h"
+#endif
+#ifdef LANGUAGE_AR_AE
+    #include "lang/ar-AE.h"
+#endif
+#ifdef LANGUAGE_AR_BH
+    #include "lang/ar-BH.h"
+#endif
+#ifdef LANGUAGE_AR_DZ
+    #include "lang/ar-DZ.h"
+#endif
+#ifdef LANGUAGE_AR_EG
+    #include "lang/ar-EG.h"
+#endif
+#ifdef LANGUAGE_AR_IQ
+    #include "lang/ar-IQ.h"
+#endif
+#ifdef LANGUAGE_AR_JO
+    #include "lang/ar-JO.h"
+#endif
+#ifdef LANGUAGE_AR_KW
+    #include "lang/ar-KW.h"
+#endif
+#ifdef LANGUAGE_AR_LB
+    #include "lang/ar-LB.h"
+#endif
+#ifdef LANGUAGE_AR_LY
+    #include "lang/ar-LY.h"
+#endif
+#ifdef LANGUAGE_AR_MA
+    #include "lang/ar-MA.h"
+#endif
+#ifdef LANGUAGE_AR_OM
+    #include "lang/ar-OM.h"
+#endif
+#ifdef LANGUAGE_AR_QA
+    #include "lang/ar-QA.h"
+#endif
+#ifdef LANGUAGE_AR_SA
+    #include "lang/ar-SA.h"
+#endif
+#ifdef LANGUAGE_AR_SY
+    #include "lang/ar-SY.h"
+#endif
+#ifdef LANGUAGE_AR_TN
+    #include "lang/ar-TN.h"
+#endif
+#ifdef LANGUAGE_AR_YE
+    #include "lang/ar-YE.h"
+#endif
+#ifdef LANGUAGE_AZ_AZ
+    #include "lang/az-AZ.h"
+#endif
+#ifdef LANGUAGE_BE_BY
+    #include "lang/be-BY.h"
+#endif
+#ifdef LANGUAGE_BG_BG
+    #include "lang/bg-BG.h"
+#endif
+#ifdef LANGUAGE_BN_BD
+    #include "lang/bn-BD.h"
+#endif
+#ifdef LANGUAGE_BN_IN
+    #include "lang/bn-IN.h"
+#endif
+#ifdef LANGUAGE_CA_ES
+    #include "lang/ca-ES.h"
+#endif
+#ifdef LANGUAGE_CS_CZ
+    #include "lang/cs-CZ.h"
+#endif
+#ifdef LANGUAGE_DA_DK
+    #include "lang/da-DK.h"
+#endif
+#ifdef LANGUAGE_DE_AT
+    #include "lang/de-AT.h"
+#endif
+#ifdef LANGUAGE_DE_CH
+    #include "lang/de-CH.h"
+#endif
+#ifdef LANGUAGE_DE_DE
+    #include "lang/de-DE.h"
+#endif
+#ifdef LANGUAGE_DE_LI
+    #include "lang/de-LI.h"
+#endif
+#ifdef LANGUAGE_DE_LU
+    #include "lang/de-LU.h"
+#endif
+#ifdef LANGUAGE_DV_MV
+    #include "lang/dv-MV.h"
+#endif
+#ifdef LANGUAGE_EL_GR
+    #include "lang/el-GR.h"
+#endif
+#ifdef LANGUAGE_EN_AU
+    #include "lang/en-AU.h"
+#endif
+#ifdef LANGUAGE_EN_BZ
+    #include "lang/en-BZ.h"
+#endif
+#ifdef LANGUAGE_EN_CA
+    #include "lang/en-CA.h"
+#endif
+#ifdef LANGUAGE_EN_CB
+    #include "lang/en-CB.h"
+#endif
+#ifdef LANGUAGE_EN_GB
+    #include "lang/en-GB.h"
+#endif
+#ifdef LANGUAGE_EN_IE
+    #include "lang/en-IE.h"
+#endif
+#ifdef LANGUAGE_EN_JM
+    #include "lang/en-JM.h"
+#endif
+#ifdef LANGUAGE_EN_NZ
+    #include "lang/en-NZ.h"
+#endif
+#ifdef LANGUAGE_EN_PH
+    #include "lang/en-PH.h"
+#endif
+#ifdef LANGUAGE_EN_TT
+    #include "lang/en-TT.h"
+#endif
+#ifdef LANGUAGE_EN_US
+    #include "lang/en-US.h"
+#endif
+#ifdef LANGUAGE_EN_ZA
+    #include "lang/en-ZA.h"
+#endif
+#ifdef LANGUAGE_EN_ZW
+    #include "lang/en-ZW.h"
+#endif
+#ifdef LANGUAGE_EO_AA
+    #include "lang/eo-AA.h"
+#endif
+#ifdef LANGUAGE_ES_AR
+    #include "lang/es-AR.h"
+#endif
+#ifdef LANGUAGE_ES_BO
+    #include "lang/es-BO.h"
+#endif
+#ifdef LANGUAGE_ES_CL
+    #include "lang/es-CL.h"
+#endif
+#ifdef LANGUAGE_ES_CO
+    #include "lang/es-CO.h"
+#endif
+#ifdef LANGUAGE_ES_CR
+    #include "lang/es-CR.h"
+#endif
+#ifdef LANGUAGE_ES_DO
+    #include "lang/es-DO.h"
+#endif
+#ifdef LANGUAGE_ES_EC
+    #include "lang/es-EC.h"
+#endif
+#ifdef LANGUAGE_ES_ES
+    #include "lang/es-ES.h"
+#endif
+#ifdef LANGUAGE_ES_GT
+    #include "lang/es-GT.h"
+#endif
+#ifdef LANGUAGE_ES_HN
+    #include "lang/es-HN.h"
+#endif
+#ifdef LANGUAGE_ES_MX
+    #include "lang/es-MX.h"
+#endif
+#ifdef LANGUAGE_ES_NI
+    #include "lang/es-NI.h"
+#endif
+#ifdef LANGUAGE_ES_PA
+    #include "lang/es-PA.h"
+#endif
+#ifdef LANGUAGE_ES_PE
+    #include "lang/es-PE.h"
+#endif
+#ifdef LANGUAGE_ES_PR
+    #include "lang/es-PR.h"
+#endif
+#ifdef LANGUAGE_ES_PY
+    #include "lang/es-PY.h"
+#endif
+#ifdef LANGUAGE_ES_SV
+    #include "lang/es-SV.h"
+#endif
+#ifdef LANGUAGE_ES_UY
+    #include "lang/es-UY.h"
+#endif
+#ifdef LANGUAGE_ES_VE
+    #include "lang/es-VE.h"
+#endif
+#ifdef LANGUAGE_ET_EE
+    #include "lang/et-EE.h"
+#endif
+#ifdef LANGUAGE_EU_ES
+    #include "lang/eu-ES.h"
+#endif
+#ifdef LANGUAGE_FA_IR
+    #include "lang/fa-IR.h"
+#endif
+#ifdef LANGUAGE_FI_FI
+    #include "lang/fi-FI.h"
+#endif
+#ifdef LANGUAGE_FO_FO
+    #include "lang/fo-FO.h"
+#endif
+#ifdef LANGUAGE_FR_BE
+    #include "lang/fr-BE.h"
+#endif
+#ifdef LANGUAGE_FR_CA
+    #include "lang/fr-CA.h"
+#endif
+#ifdef LANGUAGE_FR_CH
+    #include "lang/fr-CH.h"
+#endif
+#ifdef LANGUAGE_FR_FR
+    #include "lang/fr-FR.h"
+#endif
+#ifdef LANGUAGE_FR_LU
+    #include "lang/fr-LU.h"
+#endif
+#ifdef LANGUAGE_FR_MC
+    #include "lang/fr-MC.h"
+#endif
+#ifdef LANGUAGE_GL_ES
+    #include "lang/gl-ES.h"
+#endif
+#ifdef LANGUAGE_GU_IN
+    #include "lang/gu-IN.h"
+#endif
+#ifdef LANGUAGE_HE_IL
+    #include "lang/he-IL.h"
+#endif
+#ifdef LANGUAGE_HI_IN
+    #include "lang/hi-IN.h"
+#endif
+#ifdef LANGUAGE_HR_HR
+    #include "lang/hr-HR.h"
+#endif
+#ifdef LANGUAGE_HU_HU
+    #include "lang/hu-HU.h"
+#endif
+#ifdef LANGUAGE_HY_AM
+    #include "lang/hy-AM.h"
+#endif
+#ifdef LANGUAGE_ID_ID
+    #include "lang/id-ID.h"
+#endif
+#ifdef LANGUAGE_IS_IS
+    #include "lang/is-IS.h"
+#endif
+#ifdef LANGUAGE_IT_CH
+    #include "lang/it-CH.h"
+#endif
+#ifdef LANGUAGE_IT_IT
+    #include "lang/it-IT.h"
+#endif
+#ifdef LANGUAGE_JA_JP
+    #include "lang/ja-JP.h"
+#endif
+#ifdef LANGUAGE_KA_GE
+    #include "lang/ka-GE.h"
+#endif
+#ifdef LANGUAGE_KK_KZ
+    #include "lang/kk-KZ.h"
+#endif
+#ifdef LANGUAGE_KN_IN
+    #include "lang/kn-IN.h"
+#endif
+#ifdef LANGUAGE_KOK_IN
+    #include "lang/kok-IN.h"
+#endif
+#ifdef LANGUAGE_KO_KR
+    #include "lang/ko-KR.h"
+#endif
+#ifdef LANGUAGE_KY_KG
+    #include "lang/ky-KG.h"
+#endif
+#ifdef LANGUAGE_LT_LT
+    #include "lang/lt-LT.h"
+#endif
+#ifdef LANGUAGE_LV_LV
+    #include "lang/lv-LV.h"
+#endif
+#ifdef LANGUAGE_MK_MK
+    #include "lang/mk-MK.h"
+#endif
+#ifdef LANGUAGE_MN_MN
+    #include "lang/mn-MN.h"
+#endif
+#ifdef LANGUAGE_MR_IN
+    #include "lang/mr-IN.h"
+#endif
+#ifdef LANGUAGE_MS_BN
+    #include "lang/ms-BN.h"
+#endif
+#ifdef LANGUAGE_MS_MY
+    #include "lang/ms-MY.h"
+#endif
+#ifdef LANGUAGE_MY_MM
+    #include "lang/my-MM.h"
+#endif
+#ifdef LANGUAGE_NL_BE
+    #include "lang/nl-BE.h"
+#endif
+#ifdef LANGUAGE_NL_NL
+    #include "lang/nl-NL.h"
+#endif
+#ifdef LANGUAGE_NN_NO
+    #include "lang/nn-NO.h"
+#endif
+#ifdef LANGUAGE_PA_IN
+    #include "lang/pa-IN.h"
+#endif
+#ifdef LANGUAGE_PL_PL
+    #include "lang/pl-PL.h"
+#endif
+#ifdef LANGUAGE_PT_BR
+    #include "lang/pt-BR.h"
+#endif
+#ifdef LANGUAGE_PT_PT
+    #include "lang/pt-PT.h"
+#endif
+#ifdef LANGUAGE_RM_CH
+    #include "lang/rm-CH.h"
+#endif
+#ifdef LANGUAGE_RO_RO
+    #include "lang/ro-RO.h"
+#endif
+#ifdef LANGUAGE_RU_RU
+    #include "lang/ru-RU.h"
+#endif
+#ifdef LANGUAGE_SA_IN
+    #include "lang/sa-IN.h"
+#endif
+#ifdef LANGUAGE_SK_SK
+    #include "lang/sk-SK.h"
+#endif
+#ifdef LANGUAGE_SL_SI
+    #include "lang/sl-SI.h"
+#endif
+#ifdef LANGUAGE_SQ_AL
+    #include "lang/sq-AL.h"
+#endif
+#ifdef LANGUAGE_SR_SP
+    #include "lang/sr-SP.h"
+#endif
+#ifdef LANGUAGE_SV_FI
+    #include "lang/sv-FI.h"
+#endif
+#ifdef LANGUAGE_SV_SE
+    #include "lang/sv-SE.h"
+#endif
+#ifdef LANGUAGE_SW_KE
+    #include "lang/sw-KE.h"
+#endif
+#ifdef LANGUAGE_SYR_SY
+    #include "lang/syr-SY.h"
+#endif
+#ifdef LANGUAGE_TA_IN
+    #include "lang/ta-IN.h"
+#endif
+#ifdef LANGUAGE_TE_IN
+    #include "lang/te-IN.h"
+#endif
+#ifdef LANGUAGE_TH_TH
+    #include "lang/th-TH.h"
+#endif
+#ifdef LANGUAGE_TR_TR
+    #include "lang/tr-TR.h"
+#endif
+#ifdef LANGUAGE_TT_TA
+    #include "lang/tt-TA.h"
+#endif
+#ifdef LANGUAGE_UK_UA
+    #include "lang/uk-UA.h"
+#endif
+#ifdef LANGUAGE_UR_PK
+    #include "lang/ur-PK.h"
+#endif
+#ifdef LANGUAGE_UZ_UZ
+    #include "lang/uz-UZ.h"
+#endif
+#ifdef LANGUAGE_VI_VN
+    #include "lang/vi-VN.h"
+#endif
+#ifdef LANGUAGE_WA_BE
+    #include "lang/wa-BE.h"
+#endif
+#ifdef LANGUAGE_ZH_CN
+    #include "lang/zh-CN.h"
+#endif
+#ifdef LANGUAGE_ZH_HK
+    #include "lang/zh-HK.h"
+#endif
+#ifdef LANGUAGE_ZH_MO
+    #include "lang/zh-MO.h"
+#endif
+#ifdef LANGUAGE_ZH_SG
+    #include "lang/zh-SG.h"
+#endif
+#ifdef LANGUAGE_ZH_TW
+    #include "lang/zh-TW.h"
+#endif
+
+const MUI_LANGUAGE MUILanguageList[] =
+{
+  /* Lang ID,     ANSI CP, OEM CP, MAC CP,   Language Name, GeoID, Fonts, KB Layouts */
+#ifdef LANGUAGE_AF_ZA
+    {L"00000436", L"1252", L"850", L"10000", L"Afrikaans", L"209", LatinFonts, afZALayouts},
+#endif
+#ifdef LANGUAGE_SQ_AL
+    {L"0000041C", L"1250", L"852", L"10029", L"Albanian (Albania)", L"6", LatinFonts, sqALLayouts},
+#endif
+#ifdef LANGUAGE_AR_SA
+    {L"00000401", L"1256", L"720", L"10004", L"Arabic (Saudi Arabia)", L"205", UnicodeFonts, arSALayouts},
+#endif
+#ifdef LANGUAGE_AR_IQ
+    {L"00000801", L"1256", L"720", L"10004", L"Arabic (Iraq)", L"121", UnicodeFonts, arIQLayouts},
+#endif
+#ifdef LANGUAGE_AR_EG
+    {L"00000C01", L"1256", L"720", L"10004", L"Arabic (Egypt)", L"67", UnicodeFonts, arEGLayouts},
+#endif
+#ifdef LANGUAGE_AR_LY
+    {L"00001001", L"1256", L"720", L"10004", L"Arabic (Libya)", L"148", UnicodeFonts, arLYLayouts},
+#endif
+#ifdef LANGUAGE_AR_DZ
+    {L"00001401", L"1256", L"720", L"10004", L"Arabic (Algeria)", L"4", UnicodeFonts, arDZLayouts},
+#endif
+#ifdef LANGUAGE_AR_MA
+    {L"00001801", L"1256", L"720", L"10004", L"Arabic (Morocco)", L"149", UnicodeFonts, arMALayouts},
+#endif
+#ifdef LANGUAGE_AR_TN
+    {L"00001C01", L"1256", L"720", L"10004", L"Arabic (Tunisia)", L"234", UnicodeFonts, arTNLayouts},
+#endif
+#ifdef LANGUAGE_AR_OM
+    {L"00002001", L"1256", L"720", L"10004", L"Arabic (Oman)", L"164", UnicodeFonts, arOMLayouts},
+#endif
+#ifdef LANGUAGE_AR_YE
+    {L"00002401", L"1256", L"720", L"10004", L"Arabic (Yemen)", L"261", UnicodeFonts, arYELayouts},
+#endif
+#ifdef LANGUAGE_AR_SY
+    {L"00002801", L"1256", L"720", L"10004", L"Arabic (Syria)", L"222", UnicodeFonts, arSYLayouts},
+#endif
+#ifdef LANGUAGE_AR_JO
+    {L"00002C01", L"1256", L"720", L"10004", L"Arabic (Jordan)", L"126", UnicodeFonts, arJOLayouts},
+#endif
+#ifdef LANGUAGE_AR_LB
+    {L"00003001", L"1256", L"720", L"10004", L"Arabic (Lebanon)", L"139", UnicodeFonts, arLBLayouts},
+#endif
+#ifdef LANGUAGE_AR_KW
+    {L"00003401", L"1256", L"720", L"10004", L"Arabic (Kuwait)", L"136", UnicodeFonts, arKWLayouts},
+#endif
+#ifdef LANGUAGE_AR_AE
+    {L"00003801", L"1256", L"720", L"10004", L"Arabic (U.A.E.)", L"224", UnicodeFonts, arAELayouts},
+#endif
+#ifdef LANGUAGE_AR_BH
+    {L"00003C01", L"1256", L"720", L"10004", L"Arabic (Bahrain)", L"17", UnicodeFonts, arBHLayouts},
+#endif
+#ifdef LANGUAGE_AR_QA
+    {L"00004001", L"1256", L"720", L"10004", L"Arabic (Qatar)", L"197", UnicodeFonts, arQALayouts},
+#endif
+#ifdef LANGUAGE_HY_AM
+    {L"0000042B", L"0", L"1", L"2", L"Armenian", L"7", UnicodeFonts, hyAMLayouts},
+#endif
+#ifdef LANGUAGE_AZ_AZ
+    {L"0000082C", L"1251", L"866", L"10007", L"Azeri (Cyrillic)", L"5", CyrillicFonts, azAZLayouts},
+#endif
+#ifdef LANGUAGE_AZ_AZ
+    {L"0000042C", L"1254", L"857", L"10081", L"Azeri (Latin)", L"5", LatinFonts, azAZLayouts},
+#endif
+#ifdef LANGUAGE_EU_ES
+    {L"0000042D", L"1252", L"850", L"10000", L"Basque", L"217", LatinFonts, euESLayouts},
+#endif
+#ifdef LANGUAGE_BE_BY
+    {L"00000423", L"1251", L"866", L"10007", L"Belarusian", L"29", CyrillicFonts, beBYLayouts},
+#endif
+#ifdef LANGUAGE_BN_BD
+    {L"00000845", L"0", L"1", L"2", L"Bengali (Bangladesh)", L"23", UnicodeFonts, bnBDLayouts},
+#endif
+#ifdef LANGUAGE_BN_IN
+    {L"00000445", L"0", L"1", L"2", L"Bengali (India)", L"113", UnicodeFonts, bnINLayouts},
+#endif
+#ifdef LANGUAGE_BG_BG
+    {L"00000402", L"1251", L"866", L"10007", L"Bulgarian", L"35", CyrillicFonts, bgBGLayouts},
+#endif
+#ifdef LANGUAGE_MY_MM
+    {L"00000455", L"0", L"1", L"2", L"Burmese", L"1", UnicodeFonts, myMMLayouts},
+#endif
+#ifdef LANGUAGE_CA_ES
+    {L"00000403", L"1252", L"850", L"10000", L"Catalan", L"217", LatinFonts, caESLayouts},
+#endif
+#ifdef LANGUAGE_ZH_TW
+    {L"00000404", L"950", L"950", L"10008", L"Chinese (Taiwan)", L"237", ChineseTraditionalFonts, zhTWLayouts},
+#endif
+#ifdef LANGUAGE_ZH_CN
+    {L"00000804", L"936", L"936", L"10008", L"Chinese (PRC)", L"45", ChineseSimplifiedFonts, zhCNLayouts},
+#endif
+#ifdef LANGUAGE_ZH_HK
+    {L"00000C04", L"950", L"950", L"10008", L"Chinese (Hong Kong S.A.R.)", L"104", ChineseTraditionalFonts, zhHKLayouts},
+#endif
+#ifdef LANGUAGE_ZH_SG
+    {L"00001004", L"936", L"936", L"10008", L"Chinese (Singapore)", L"215", ChineseSimplifiedFonts, zhSGLayouts},
+#endif
+#ifdef LANGUAGE_ZH_MO
+    {L"00001404", L"950", L"950", L"10002", L"Chinese (Macau S.A.R.)", L"151", ChineseSimplifiedFonts, zhMOLayouts},
+#endif
+#ifdef LANGUAGE_HR_HR
+    {L"0000041A", L"1250", L"852", L"10029", L"Croatian", L"108", LatinFonts, hrHRLayouts},
+#endif
+#ifdef LANGUAGE_CS_CZ
+    {L"00000405", L"1250", L"852", L"10029", L"Czech", L"75", LatinFonts, csCZLayouts},
+#endif
+#ifdef LANGUAGE_DA_DK
+    {L"00000406", L"1252", L"850", L"10000", L"Danish", L"61", LatinFonts, daDKLayouts},
+#endif
+#ifdef LANGUAGE_DV_MV
+    {L"00000465", L"0", L"1", L"2", L"Dhivehi (Maldives)", L"165", UnicodeFonts, dvMVLayouts},
+#endif
+#ifdef LANGUAGE_NL_NL
+    {L"00000413", L"1252", L"850", L"10000", L"Dutch (Netherlands)", L"176", LatinFonts, nlNLLayouts},
+#endif
+#ifdef LANGUAGE_NL_BE
+    {L"00000813", L"1252", L"850", L"10000", L"Dutch (Belgium)", L"21", LatinFonts, nlBELayouts},
+#endif
+#ifdef LANGUAGE_EN_US
+    {L"00000409", L"1252", L"437", L"10000", L"English (United States)", L"244", LatinFonts, enUSLayouts},
+#endif
+#ifdef LANGUAGE_EN_GB
+    {L"00000809", L"1252", L"850", L"10000", L"English (United Kingdom)", L"242", LatinFonts, enGBLayouts},
+#endif
+#ifdef LANGUAGE_EN_AU
+    {L"00000C09", L"1252", L"850", L"10000", L"English (Australia)", L"12", LatinFonts, enAULayouts},
+#endif
+#ifdef LANGUAGE_EN_CA
+    {L"00001009", L"1252", L"850", L"10000", L"English (Canada)", L"39", LatinFonts, enCALayouts},
+#endif
+#ifdef LANGUAGE_EN_NZ
+    {L"00001409", L"1252", L"850", L"10000", L"English (New Zealand)", L"183", LatinFonts, enNZLayouts},
+#endif
+#ifdef LANGUAGE_EN_IE
+    {L"00001809", L"1252", L"850", L"10000", L"English (Ireland)", L"68", LatinFonts, enIELayouts},
+#endif
+#ifdef LANGUAGE_EN_ZA
+    {L"00001C09", L"1252", L"437", L"10000", L"English (South Africa)", L"209", LatinFonts, enZALayouts},
+#endif
+#ifdef LANGUAGE_EN_JM
+    {L"00002009", L"1252", L"850", L"10000", L"English (Jamaica)", L"124", LatinFonts, enJMLayouts},
+#endif
+#ifdef LANGUAGE_EN_CB
+    {L"00002409", L"1252", L"850", L"10000", L"English (Caribbean)", L"1", LatinFonts, enCBLayouts},
+#endif
+#ifdef LANGUAGE_EN_BZ
+    {L"00002809", L"1252", L"850", L"10000", L"English (Belize)", L"24", LatinFonts, enBZLayouts},
+#endif
+#ifdef LANGUAGE_EN_TT
+    {L"00002C09", L"1252", L"850", L"10000", L"English (Trinidad)", L"225", LatinFonts, enTTLayouts},
+#endif
+#ifdef LANGUAGE_EN_ZW
+    {L"00003009", L"1252", L"437", L"10000", L"English (Zimbabwe)", L"264", LatinFonts, enZWLayouts},
+#endif
+#ifdef LANGUAGE_EN_PH
+    {L"00003409", L"1252", L"437", L"10000", L"English (Philippines)", L"201", LatinFonts, enPHLayouts},
+#endif
+#ifdef LANGUAGE_EO_AA
+    {L"0000048F", L"1252", L"437", L"10000", L"Esperanto", L"1", LatinFonts, eoAALayouts},
+#endif
+#ifdef LANGUAGE_ET_EE
+    {L"00000425", L"1252", L"775", L"10029", L"Estonian", L"70", LatinFonts, etEELayouts},
+#endif
+#ifdef LANGUAGE_FO_FO
+    {L"00000438", L"1252", L"850", L"10079", L"Faeroese", L"81", LatinFonts, foFOLayouts},
+#endif
+#ifdef LANGUAGE_FA_IR
+    {L"00000429", L"1256", L"720", L"10004", L"Farsi", L"116", UnicodeFonts, faIRLayouts},
+#endif
+#ifdef LANGUAGE_FI_FI
+    {L"0000040B", L"1252", L"850", L"10000", L"Finnish", L"77", LatinFonts, fiFILayouts},
+#endif
+#ifdef LANGUAGE_FR_CA
+    {L"00000C0C", L"1252", L"850", L"10000", L"French (Canada)", L"39", LatinFonts, frCALayouts},
+#endif
+#ifdef LANGUAGE_FR_FR
+    {L"0000040C", L"1252", L"850", L"10000", L"French (France)", L"84", LatinFonts, frFRLayouts},
+#endif
+#ifdef LANGUAGE_FR_BE
+    {L"0000080C", L"1252", L"850", L"10000", L"French (Belgium)", L"21", LatinFonts, frBELayouts},
+#endif
+#ifdef LANGUAGE_FR_CH
+    {L"0000100C", L"1252", L"850", L"10000", L"French (Switzerland)", L"223", LatinFonts, frCHLayouts},
+#endif
+#ifdef LANGUAGE_FR_LU
+    {L"0000140C", L"1252", L"850", L"10000", L"French (Luxembourg)", L"147", LatinFonts, frLULayouts},
+#endif
+#ifdef LANGUAGE_FR_MC
+    {L"0000180C", L"1252", L"850", L"10000", L"French (Monaco)", L"158", LatinFonts, frMCLayouts},
+#endif
+#ifdef LANGUAGE_GL_ES
+    {L"00000456", L"1252", L"850", L"10000", L"Galician (Spain)", L"217", LatinFonts, glESLayouts},
+#endif
+#ifdef LANGUAGE_KA_GE
+    {L"00000437", L"0", L"1", L"2", L"Georgian", L"88", UnicodeFonts, kaGELayouts},
+#endif
+#ifdef LANGUAGE_DE_DE
+    {L"00000407", L"1252", L"850", L"10000", L"German (Germany)", L"94", LatinFonts, deDELayouts},
+#endif
+#ifdef LANGUAGE_DE_CH
+    {L"00000807", L"1252", L"850", L"10000", L"German (Switzerland)", L"223", LatinFonts, deCHLayouts},
+#endif
+#ifdef LANGUAGE_DE_AT
+    {L"00000C07", L"1252", L"850", L"10000", L"German (Austria)", L"14", LatinFonts, deATLayouts},
+#endif
+#ifdef LANGUAGE_DE_LU
+    {L"00001007", L"1252", L"850", L"10000", L"German (Luxembourg)", L"147", LatinFonts, deLULayouts},
+#endif
+#ifdef LANGUAGE_DE_LI
+    {L"00001407", L"1252", L"850", L"10000", L"German (Liechtenstein)", L"145", LatinFonts, deLILayouts},
+#endif
+#ifdef LANGUAGE_EL_GR
+    {L"00000408", L"1253", L"737", L"10006", L"Greek", L"98", GreekFonts, elGRLayouts},
+#endif
+#ifdef LANGUAGE_GU_IN
+    {L"00000447", L"0", L"1", L"2", L"Gujarati (India)", L"113", UnicodeFonts, guINLayouts},
+#endif
+#ifdef LANGUAGE_HE_IL
+    {L"0000040D", L"1255", L"862", L"10005", L"Hebrew", L"117", HebrewFonts, heILLayouts},
+#endif
+#ifdef LANGUAGE_HI_IN
+    {L"00000439", L"1252", L"437", L"10000", L"Hindi", L"113", HindiFonts, hiINLayouts },
+#endif
+#ifdef LANGUAGE_HU_HU
+    {L"0000040E", L"1250", L"852", L"10029", L"Hungarian", L"109", LatinFonts, huHULayouts},
+#endif
+#ifdef LANGUAGE_IS_IS
+    {L"0000040F", L"1252", L"850", L"10079", L"Icelandic", L"110", LatinFonts, isISLayouts},
+#endif
+#ifdef LANGUAGE_ID_ID
+    {L"00000421", L"1252", L"850", L"10079", L"Indonesian", L"111", LatinFonts, idIDLayouts},
+#endif
+#ifdef LANGUAGE_IT_IT
+    {L"00000410", L"1252", L"850", L"10000", L"Italian (Italy)", L"118", LatinFonts, itITLayouts},
+#endif
+#ifdef LANGUAGE_IT_CH
+    {L"00000810", L"1252", L"850", L"10000", L"Italian (Switzerland)", L"223", LatinFonts, itCHLayouts},
+#endif
+#ifdef LANGUAGE_JA_JP
+    {L"00000411", L"932", L"932", L"10001", L"Japanese", L"122", JapaneseFonts, jaJPLayouts},
+#endif
+#ifdef LANGUAGE_KN_IN
+    {L"0000044B", L"1252", L"437", L"10079", L"Kannada (India)", L"113", LatinFonts, knINLayouts},
+#endif
+#ifdef LANGUAGE_KK_KZ
+    {L"0000043F", L"1251", L"866", L"10007", L"Kazakh", L"137", CyrillicFonts, kkKZLayouts},
+#endif
+#ifdef LANGUAGE_KOK_IN
+    {L"00000457", L"0", L"437", L"2", L"Konkani", L"113", UnicodeFonts, kokINLayouts},
+#endif
+#ifdef LANGUAGE_KO_KR
+    {L"00000412", L"949", L"949", L"10003", L"Korean", L"134", KoreanFonts, koKRLayouts},
+#endif
+#ifdef LANGUAGE_KY_KG
+    {L"00000440", L"1251", L"866", L"10007", L"Kyrgyz (Kyrgyzstan)", L"130", CyrillicFonts, kyKGLayouts},
+#endif
+#ifdef LANGUAGE_LV_LV
+    {L"00000426", L"1257", L"775", L"10029", L"Latvian", L"140", LatinFonts, lvLVLayouts},
+#endif
+#ifdef LANGUAGE_LT_LT
+    {L"00000427", L"1257", L"775", L"10029", L"Lithuanian", L"141", LatinFonts, ltLTLayouts},
+#endif
+#ifdef LANGUAGE_MK_MK
+    {L"0000042F", L"1251", L"866", L"10007", L"FYRO Macedonian", L"19618", CyrillicFonts, mkMKLayouts},
+#endif
+#ifdef LANGUAGE_MS_BN
+    {L"0000083E", L"1252", L"850", L"10000", L"Malay (Brunei Darussalam)", L"37", LatinFonts, msBNLayouts},
+#endif
+#ifdef LANGUAGE_MS_MY
+    {L"0000043E", L"1252", L"850", L"10000", L"Malay (Malaysia)", L"167", LatinFonts, msMYLayouts},
+#endif
+#ifdef LANGUAGE_MR_IN
+    {L"0000044E", L"0", L"1", L"2", L"Marathi", L"113", UnicodeFonts, mrINLayouts},
+#endif
+#ifdef LANGUAGE_MN_MN
+    {L"00000450", L"1251", L"866", L"10007", L"Mongolian (Mongolia)", L"154", CyrillicFonts, mnMNLayouts},
+#endif
+#ifdef LANGUAGE_NB_NO
+    {L"00000414", L"1252", L"850", L"10000", L"Norwegian (Bokmal)", L"177", LatinFonts, nbNOLayouts},
+#endif
+#ifdef LANGUAGE_NN_NO
+    {L"00000814", L"1252", L"850", L"10000", L"Norwegian (Nynorsk)", L"177", LatinFonts, nnNOLayouts},
+#endif
+#ifdef LANGUAGE_PL_PL
+    {L"00000415", L"1250", L"852", L"10029", L"Polish", L"191", LatinFonts, plPLLayouts},
+#endif
+#ifdef LANGUAGE_PT_PT
+    {L"00000816", L"1252", L"850", L"10000", L"Portuguese (Portugal)", L"193", LatinFonts, ptPTLayouts},
+#endif
+#ifdef LANGUAGE_PT_BR
+    {L"00000416", L"1252", L"850", L"10000", L"Portuguese (Brazil)", L"32", LatinFonts, ptBRLayouts},
+#endif
+#ifdef LANGUAGE_PA_IN
+    {L"00000446", L"0", L"1", L"2", L"Punjabi (India)", L"113", UnicodeFonts, paINLayouts},
+#endif
+#ifdef LANGUAGE_RO_RO
+    {L"00000418", L"28606", L"28606", L"10029", L"Romanian", L"200", LatinFonts, roROLayouts},
+#endif
+#ifdef LANGUAGE_RM_CH
+    {L"00000417", L"1252", L"850", L"10000", L"Romansh", L"223", LatinFonts, rmCHLayouts},
+#endif
+#ifdef LANGUAGE_RU_RU
+    {L"00000419", L"1251", L"866", L"10007", L"Russian", L"203", CyrillicFonts, ruRULayouts},
+#endif
+#ifdef LANGUAGE_SA_IN
+    {L"0000044F", L"0", L"1", L"2", L"Sanskrit", L"113", UnicodeFonts, saINLayouts},
+#endif
+#ifdef LANGUAGE_SR_SP
+    {L"00000C1A", L"1251", L"855", L"10007", L"Serbian (Cyrillic)", L"271", CyrillicFonts, srSPLayouts},
+#endif
+#ifdef LANGUAGE_SR_SP
+    {L"0000081A", L"1250", L"852", L"10029", L"Serbian (Latin)", L"271", LatinFonts, srSPLayouts},
+#endif
+#ifdef LANGUAGE_SK_SK
+    {L"0000041B", L"1250", L"852", L"10029", L"Slovak", L"143", LatinFonts, skSKLayouts},
+#endif
+#ifdef LANGUAGE_SL_SI
+    {L"00000424", L"1250", L"852", L"10029", L"Slovenian", L"212", LatinFonts, slSILayouts},
+#endif
+#ifdef LANGUAGE_ES_ES
+    {L"0000040A", L"1252", L"850", L"10000", L"Spanish (Traditional Sort)", L"217", LatinFonts, esESLayouts},
+#endif
+#ifdef LANGUAGE_ES_MX
+    {L"0000080A", L"1252", L"850", L"10000", L"Spanish (Mexico)", L"166", LatinFonts, esMXLayouts},
+#endif
+#ifdef LANGUAGE_ES_ES
+    {L"00000C0A", L"1252", L"850", L"10000", L"Spanish (International Sort)", L"217", LatinFonts, esESLayouts},
+#endif
+#ifdef LANGUAGE_ES_GT
+    {L"0000100A", L"1252", L"850", L"10000", L"Spanish (Guatemala)", L"99", LatinFonts, esGTLayouts},
+#endif
+#ifdef LANGUAGE_ES_CR
+    {L"0000140A", L"1252", L"850", L"10000", L"Spanish (Costa Rica)", L"54", LatinFonts, esCRLayouts},
+#endif
+#ifdef LANGUAGE_ES_PA
+    {L"0000180A", L"1252", L"850", L"10000", L"Spanish (Panama)", L"192", LatinFonts, esPALayouts},
+#endif
+#ifdef LANGUAGE_ES_DO
+    {L"00001C0A", L"1252", L"850", L"10000", L"Spanish (Dominican Republic)", L"65", LatinFonts, esDOLayouts},
+#endif
+#ifdef LANGUAGE_ES_VE
+    {L"0000200A", L"1252", L"850", L"10000", L"Spanish (Venezuela)", L"249", LatinFonts, esVELayouts},
+#endif
+#ifdef LANGUAGE_ES_CO
+    {L"0000240A", L"1252", L"850", L"10000", L"Spanish (Colombia)", L"51", LatinFonts, esCOLayouts},
+#endif
+#ifdef LANGUAGE_ES_PE
+    {L"0000280A", L"1252", L"850", L"10000", L"Spanish (Peru)", L"187", LatinFonts, esPELayouts},
+#endif
+#ifdef LANGUAGE_ES_AR
+    {L"00002C0A", L"1252", L"850", L"10000", L"Spanish (Argentina)", L"11", LatinFonts, esARLayouts},
+#endif
+#ifdef LANGUAGE_ES_EC
+    {L"0000300A", L"1252", L"850", L"10000", L"Spanish (Ecuador)", L"66", LatinFonts, esECLayouts},
+#endif
+#ifdef LANGUAGE_ES_CL
+    {L"0000340A", L"1252", L"850", L"10000", L"Spanish (Chile)", L"46", LatinFonts, esCLLayouts},
+#endif
+#ifdef LANGUAGE_ES_UY
+    {L"0000380A", L"1252", L"850", L"10000", L"Spanish (Uruguay)", L"246", LatinFonts, esUYLayouts},
+#endif
+#ifdef LANGUAGE_ES_PY
+    {L"00003C0A", L"1252", L"850", L"10000", L"Spanish (Paraguay)", L"185", LatinFonts, esPYLayouts},
+#endif
+#ifdef LANGUAGE_ES_BO
+    {L"0000400A", L"1252", L"850", L"10000", L"Spanish (Bolivia)", L"26", LatinFonts, esBOLayouts},
+#endif
+#ifdef LANGUAGE_ES_SV
+    {L"0000440A", L"1252", L"850", L"10000", L"Spanish (El Salvador)", L"72", LatinFonts, esSVLayouts},
+#endif
+#ifdef LANGUAGE_ES_HN
+    {L"0000480A", L"1252", L"850", L"10000", L"Spanish (Honduras)", L"106", LatinFonts, esHNLayouts},
+#endif
+#ifdef LANGUAGE_ES_NI
+    {L"00004C0A", L"1252", L"850", L"10000", L"Spanish (Nicaragua)", L"182", LatinFonts, esNILayouts},
+#endif
+#ifdef LANGUAGE_ES_PR
+    {L"0000500A", L"1252", L"850", L"10000", L"Spanish (Puerto Rico)", L"202", LatinFonts, esPRLayouts},
+#endif
+#ifdef LANGUAGE_SW_KE
+    {L"00000441", L"1252", L"437", L"10000", L"Swahili", L"129", LatinFonts, swKELayouts},
+#endif
+#ifdef LANGUAGE_SV_SE
+    {L"0000041D", L"1252", L"850", L"10000", L"Swedish", L"221", LatinFonts, svSELayouts},
+#endif
+#ifdef LANGUAGE_SV_FI
+    {L"0000081D", L"1252", L"850", L"10000", L"Swedish (Finland)", L"77", LatinFonts, svFILayouts},
+#endif
+#ifdef LANGUAGE_SYR_SY
+    {L"0000045A", L"0", L"1", L"2", L"Syriac (Syria)", L"222", UnicodeFonts, syrSYLayouts},
+#endif
+#ifdef LANGUAGE_TA_IN
+    {L"00000449", L"0", L"1", L"2", L"Tamil", L"113", UnicodeFonts, taINLayouts},
+#endif
+#ifdef LANGUAGE_TT_TA
+    {L"00000444", L"1251", L"866", L"10007", L"Tatar", L"1", CyrillicFonts, ttTALayouts},
+#endif
+#ifdef LANGUAGE_TE_IN
+    {L"0000044A", L"0", L"1", L"2", L"Telugu (India)", L"113", UnicodeFonts, teINLayouts},
+#endif
+#ifdef LANGUAGE_TH_TH
+    {L"0000041E", L"874", L"874", L"10021", L"Thai", L"227", UnicodeFonts, thTHLayouts},
+#endif
+#ifdef LANGUAGE_TR_TR
+    {L"0000041F", L"1254", L"857", L"10081", L"Turkish", L"235", LatinFonts, trTRLayouts},
+#endif
+#ifdef LANGUAGE_UK_UA
+    {L"00000422", L"1251", L"866", L"10017", L"Ukrainian", L"241", CyrillicFonts, ukUALayouts},
+#endif
+#ifdef LANGUAGE_UR_PK
+    {L"00000420", L"1256", L"720", L"10004", L"Urdu", L"190", UnicodeFonts, urPKLayouts},
+#endif
+#ifdef LANGUAGE_UZ_UZ
+    {L"00000443", L"1254", L"857", L"10029", L"Uzbek (Latin)", L"247", LatinFonts, uzUZLayouts},
+#endif
+#ifdef LANGUAGE_UZ_UZ
+    {L"00000843", L"1251", L"866", L"10007", L"Uzbek (Cyrillic)", L"247", CyrillicFonts, uzUZLayouts},
+#endif
+#ifdef LANGUAGE_VI_VN
+    {L"0000042A", L"1258", L"1258", L"10000", L"Vietnamese", L"251", UnicodeFonts, viVNLayouts},
+#endif
+#ifdef LANGUAGE_WA_BE
+    {L"00000490", L"1252", L"850", L"10000", L"Walon", L"21", LatinFonts, waBELayouts},
+#endif
+#ifdef LANGUAGE_ZU_ZU
+    {L"00000435", L"1252", L"850", L"10000", L"Zulu", L"1", LatinFonts, zuZULayouts},
+#endif
+    {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
+};
index ab005d2..bf9a804 100644 (file)
@@ -28,6 +28,7 @@
 #include "precomp.h"
 #include "genlist.h"
 #include "infsupp.h"
+#include "mui.h"
 #include "registry.h"
 
 #include "settings.h"
@@ -37,9 +38,7 @@
 
 /* GLOBALS ******************************************************************/
 
-#if 0 // FIXME: Disabled for now because it uses MUI* functions from usetup
-ULONG DefaultLanguageIndex = 0;
-#endif
+static ULONG DefaultLanguageIndex = 0;
 
 /* FUNCTIONS ****************************************************************/
 
@@ -212,8 +211,8 @@ cleanup:
 static
 BOOLEAN
 GetComputerIdentifier(
-    PWSTR Identifier,
-    ULONG IdentifierLength)
+    OUT PWSTR Identifier,
+    IN ULONG IdentifierLength)
 {
     OBJECT_ATTRIBUTES ObjectAttributes;
     UNICODE_STRING KeyName;
@@ -314,7 +313,23 @@ GetComputerIdentifier(
 }
 
 
-LONG
+/*
+ * Return values:
+ * 0x00: Failure, stop the enumeration;
+ * 0x01: Add the entry and continue the enumeration;
+ * 0x02: Skip the entry but continue the enumeration.
+ */
+typedef UCHAR
+(NTAPI *PPROCESS_ENTRY_ROUTINE)(
+    IN PWCHAR KeyName,
+    IN PWCHAR KeyValue,
+    IN PCHAR DisplayText,
+    IN SIZE_T DisplayTextSize,
+    OUT PVOID* UserData,
+    OUT PBOOLEAN Current,
+    IN PVOID Parameter OPTIONAL);
+
+static LONG
 AddEntriesFromInfSection(
     IN OUT PGENERIC_LIST List,
     IN HINF InfFile,
@@ -384,7 +399,7 @@ AddEntriesFromInfSection(
     return TotalCount;
 }
 
-UCHAR
+static UCHAR
 NTAPI
 DefaultProcessEntry(
     IN PWCHAR KeyName,
@@ -418,7 +433,7 @@ DefaultProcessEntry(
 
 PGENERIC_LIST
 CreateComputerTypeList(
-    HINF InfFile)
+    IN HINF InfFile)
 {
     PGENERIC_LIST List;
     INFCONTEXT Context;
@@ -493,8 +508,8 @@ CreateComputerTypeList(
 static
 BOOLEAN
 GetDisplayIdentifier(
-    PWSTR Identifier,
-    ULONG IdentifierLength)
+    OUT PWSTR Identifier,
+    IN ULONG IdentifierLength)
 {
     OBJECT_ATTRIBUTES ObjectAttributes;
     UNICODE_STRING KeyName;
@@ -654,7 +669,7 @@ GetDisplayIdentifier(
 
 PGENERIC_LIST
 CreateDisplayDriverList(
-    HINF InfFile)
+    IN HINF InfFile)
 {
     PGENERIC_LIST List;
     INFCONTEXT Context;
@@ -733,9 +748,9 @@ CreateDisplayDriverList(
 
 BOOLEAN
 ProcessComputerFiles(
-    HINF InfFile,
-    PGENERIC_LIST List,
-    PWCHAR *AdditionalSectionName)
+    IN HINF InfFile,
+    IN PGENERIC_LIST List,
+    OUT PWSTR* AdditionalSectionName)
 {
     PGENERIC_LIST_ENTRY Entry;
     static WCHAR SectionName[128];
@@ -758,8 +773,8 @@ ProcessComputerFiles(
 
 BOOLEAN
 ProcessDisplayRegistry(
-    HINF InfFile,
-    PGENERIC_LIST List)
+    IN HINF InfFile,
+    IN PGENERIC_LIST List)
 {
     NTSTATUS Status;
     PGENERIC_LIST_ENTRY Entry;
@@ -916,7 +931,7 @@ ProcessDisplayRegistry(
 
 BOOLEAN
 ProcessLocaleRegistry(
-    PGENERIC_LIST List)
+    IN PGENERIC_LIST List)
 {
     PGENERIC_LIST_ENTRY Entry;
     PWCHAR LanguageId;
@@ -1030,7 +1045,7 @@ ProcessLocaleRegistry(
 
 PGENERIC_LIST
 CreateKeyboardDriverList(
-    HINF InfFile)
+    IN HINF InfFile)
 {
     PGENERIC_LIST List;
     INFCONTEXT Context;
@@ -1054,8 +1069,6 @@ CreateKeyboardDriverList(
 }
 
 
-#if 0 // FIXME: Disabled for now because it uses MUI* functions from usetup
-
 ULONG
 GetDefaultLanguageIndex(VOID)
 {
@@ -1112,8 +1125,8 @@ ProcessLangEntry(
 
 PGENERIC_LIST
 CreateLanguageList(
-    HINF InfFile,
-    WCHAR *DefaultLanguage)
+    IN HINF InfFile,
+    OUT PWSTR DefaultLanguage)
 {
     PGENERIC_LIST List;
     INFCONTEXT Context;
@@ -1132,7 +1145,6 @@ CreateLanguageList(
         return NULL;
 
     wcscpy(DefaultLanguage, KeyValue);
-    SelectedLanguageId = KeyValue;
 
     List = CreateGenericList();
     if (List == NULL)
@@ -1163,13 +1175,14 @@ CreateLanguageList(
 
 PGENERIC_LIST
 CreateKeyboardLayoutList(
-    HINF InfFile,
-    WCHAR *DefaultKBLayout)
+    IN HINF InfFile,
+    IN PCWSTR LanguageId,
+    OUT PWSTR DefaultKBLayout)
 {
     PGENERIC_LIST List;
     INFCONTEXT Context;
     PWCHAR KeyValue;
-    const MUI_LAYOUTS * LayoutsList;
+    const MUI_LAYOUTS* LayoutsList;
     ULONG uIndex = 0;
 
     /* Get default layout id */
@@ -1185,7 +1198,7 @@ CreateKeyboardLayoutList(
     if (List == NULL)
         return NULL;
 
-    LayoutsList = MUIGetLayoutsList();
+    LayoutsList = MUIGetLayoutsList(LanguageId);
 
     do
     {
@@ -1220,11 +1233,12 @@ CreateKeyboardLayoutList(
 
 BOOLEAN
 ProcessKeyboardLayoutRegistry(
-    PGENERIC_LIST List)
+    IN PGENERIC_LIST List,
+    IN PCWSTR LanguageId)
 {
     PGENERIC_LIST_ENTRY Entry;
     PWCHAR LayoutId;
-    const MUI_LAYOUTS * LayoutsList;
+    const MUI_LAYOUTS* LayoutsList;
     MUI_LAYOUTS NewLayoutsList[20];
     ULONG uIndex;
     ULONG uOldPos = 0;
@@ -1237,41 +1251,37 @@ ProcessKeyboardLayoutRegistry(
     if (LayoutId == NULL)
         return FALSE;
 
-    LayoutsList = MUIGetLayoutsList();
+    LayoutsList = MUIGetLayoutsList(LanguageId);
+
+    if (_wcsicmp(LayoutsList[0].LayoutID, LayoutId) == 0)
+        return TRUE;
 
-    if (_wcsicmp(LayoutsList[0].LayoutID, LayoutId) != 0)
+    for (uIndex = 1; LayoutsList[uIndex].LangID != NULL; uIndex++)
     {
-        for (uIndex = 1; LayoutsList[uIndex].LangID != NULL; uIndex++)
+        if (_wcsicmp(LayoutsList[uIndex].LayoutID, LayoutId) == 0)
         {
-            if (_wcsicmp(LayoutsList[uIndex].LayoutID, LayoutId) == 0)
-            {
-                uOldPos = uIndex;
-                continue;
-            }
-
-            NewLayoutsList[uIndex].LangID   = LayoutsList[uIndex].LangID;
-            NewLayoutsList[uIndex].LayoutID = LayoutsList[uIndex].LayoutID;
+            uOldPos = uIndex;
+            continue;
         }
 
-        NewLayoutsList[uIndex].LangID    = NULL;
-        NewLayoutsList[uIndex].LayoutID  = NULL;
-        NewLayoutsList[uOldPos].LangID   = LayoutsList[0].LangID;
-        NewLayoutsList[uOldPos].LayoutID = LayoutsList[0].LayoutID;
-        NewLayoutsList[0].LangID         = LayoutsList[uOldPos].LangID;
-        NewLayoutsList[0].LayoutID       = LayoutsList[uOldPos].LayoutID;
-
-        return AddKbLayoutsToRegistry(NewLayoutsList);
+        NewLayoutsList[uIndex].LangID   = LayoutsList[uIndex].LangID;
+        NewLayoutsList[uIndex].LayoutID = LayoutsList[uIndex].LayoutID;
     }
 
-    return TRUE;
-}
+    NewLayoutsList[uIndex].LangID    = NULL;
+    NewLayoutsList[uIndex].LayoutID  = NULL;
+    NewLayoutsList[uOldPos].LangID   = LayoutsList[0].LangID;
+    NewLayoutsList[uOldPos].LayoutID = LayoutsList[0].LayoutID;
+    NewLayoutsList[0].LangID         = LayoutsList[uOldPos].LangID;
+    NewLayoutsList[0].LayoutID       = LayoutsList[uOldPos].LayoutID;
 
-#endif
+    return AddKbLayoutsToRegistry(NewLayoutsList);
+}
 
 #if 0
 BOOLEAN
 ProcessKeyboardLayoutFiles(
-    PGENERIC_LIST List)
+    IN PGENERIC_LIST List)
 {
     return TRUE;
 }
@@ -1279,7 +1289,7 @@ ProcessKeyboardLayoutFiles(
 
 BOOLEAN
 SetGeoID(
-    PWCHAR Id)
+    IN PCWSTR Id)
 {
     NTSTATUS Status;
     OBJECT_ATTRIBUTES ObjectAttributes;
@@ -1322,7 +1332,7 @@ SetGeoID(
 
 BOOLEAN
 SetDefaultPagefile(
-    WCHAR Drive)
+    IN WCHAR Drive)
 {
     NTSTATUS Status;
     HANDLE KeyHandle;
index bbdfd8d..ce66383 100644 (file)
 
 #pragma once
 
-/*
- * Return values:
- * 0x00: Failure, stop the enumeration;
- * 0x01: Add the entry and continue the enumeration;
- * 0x02: Skip the entry but continue the enumeration.
- */
-typedef UCHAR
-(NTAPI *PPROCESS_ENTRY_ROUTINE)(
-    IN PWCHAR KeyName,
-    IN PWCHAR KeyValue,
-    IN PCHAR DisplayText,
-    IN SIZE_T DisplayTextSize,
-    OUT PVOID* UserData,
-    OUT PBOOLEAN Current,
-    IN PVOID Parameter OPTIONAL);
-
-LONG
-AddEntriesFromInfSection(
-    IN OUT PGENERIC_LIST List,
-    IN HINF InfFile,
-    IN PCWSTR SectionName,
-    IN PINFCONTEXT pContext,
-    IN PPROCESS_ENTRY_ROUTINE ProcessEntry,
-    IN PVOID Parameter OPTIONAL);
-
-UCHAR
-NTAPI
-DefaultProcessEntry(
-    IN PWCHAR KeyName,
-    IN PWCHAR KeyValue,
-    IN PCHAR DisplayText,
-    IN SIZE_T DisplayTextSize,
-    OUT PVOID* UserData,
-    OUT PBOOLEAN Current,
-    IN PVOID Parameter OPTIONAL);
-
-
 PGENERIC_LIST
 CreateComputerTypeList(
-    HINF InfFile);
+    IN HINF InfFile);
 
 PGENERIC_LIST
 CreateDisplayDriverList(
-    HINF InfFile);
+    IN HINF InfFile);
 
 BOOLEAN
 ProcessComputerFiles(
-    HINF InfFile,
-    PGENERIC_LIST List,
-    PWCHAR *AdditionalSectionName);
+    IN HINF InfFile,
+    IN PGENERIC_LIST List,
+    OUT PWSTR* AdditionalSectionName);
 
 BOOLEAN
 ProcessDisplayRegistry(
-    HINF InfFile,
-    PGENERIC_LIST List);
+    IN HINF InfFile,
+    IN PGENERIC_LIST List);
 
 PGENERIC_LIST
 CreateKeyboardDriverList(
-    HINF InfFile);
-
-#if 0 // FIXME: Disabled for now because it uses MUI* functions from usetup
+    IN HINF InfFile);
 
 PGENERIC_LIST
 CreateKeyboardLayoutList(
-    HINF InfFile,
-    WCHAR *DefaultKBLayout);
+    IN HINF InfFile,
+    IN PCWSTR LanguageId,
+    OUT PWSTR DefaultKBLayout);
 
 PGENERIC_LIST
 CreateLanguageList(
-    HINF InfFile,
-    WCHAR *DefaultLanguage);
+    IN HINF InfFile,
+    OUT PWSTR DefaultLanguage);
 
 ULONG
 GetDefaultLanguageIndex(VOID);
 
 BOOLEAN
 ProcessKeyboardLayoutRegistry(
-    PGENERIC_LIST List);
+    IN PGENERIC_LIST List,
+    IN PCWSTR LanguageId);
 
 BOOLEAN
 ProcessKeyboardLayoutFiles(
-    PGENERIC_LIST List);
-
-#endif
+    IN PGENERIC_LIST List);
 
 BOOLEAN
 ProcessLocaleRegistry(
-    PGENERIC_LIST List);
+    IN PGENERIC_LIST List);
 
 BOOLEAN
 SetGeoID(
-    PWCHAR Id);
+    IN PCWSTR Id);
 
 BOOLEAN
 SetDefaultPagefile(
-    WCHAR Drive);
+    IN WCHAR Drive);
 
 /* EOF */
index 033a4c8..2e231bd 100644 (file)
@@ -40,6 +40,7 @@ extern HANDLE ProcessHeap;
 #include "utils/osdetect.h"
 #include "utils/regutil.h"
 #include "registry.h"
+#include "mui.h"
 #include "settings.h"
 
 
index d82f1c2..0d83835 100644 (file)
@@ -26,7 +26,6 @@ list(APPEND SOURCE
     mui.c
     partlist.c
     progress.c
-    settings.c
     usetup.c
     usetup.h)
 
index 6191c1f..e493058 100644 (file)
@@ -1,14 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS bgBGLayouts[] =
-{
-    { L"0402", L"00000402" },
-    { L"0402", L"00020402" },
-    { L"0402", L"00030402" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY bgBGLanguagePageEntries[] =
 {
     {
index 847c53b..72e0061 100644 (file)
@@ -1,11 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS bnBDLayouts[] =
-{
-    { L"0845", L"00000845" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY bnBDLanguagePageEntries[] =
 {
     {
index 7972b86..3d425c9 100644 (file)
@@ -6,14 +6,6 @@
 
 #pragma once
 
-MUI_LAYOUTS csCZLayouts[] =
-{
-    { L"0405", L"00000405" },
-    { L"0405", L"00010405" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY csCZLanguagePageEntries[] =
 {
     {
index a58f2db..4190c9a 100644 (file)
@@ -1,11 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS daDKLayouts[] =
-{
-    { L"0406", L"00000406" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY daDKLanguagePageEntries[] =
 {
     {
index 2e2d66e..e245272 100644 (file)
@@ -1,12 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS deDELayouts[] =
-{
-    { L"0407", L"00000407" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY deDELanguagePageEntries[] =
 {
     {
index 4052a89..ae33c5d 100644 (file)
@@ -1,12 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS elGRLayouts[] =
-{
-    { L"0408", L"00000408" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY elGRLanguagePageEntries[] =
 {
     {
index 5905590..0657536 100644 (file)
@@ -1,11 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS enUSLayouts[] =
-{
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY enUSLanguagePageEntries[] =
 {
     {
index c60e0da..896c856 100644 (file)
@@ -2,13 +2,6 @@
 
 #pragma once
 
-MUI_LAYOUTS esESLayouts[] =
-{
-    { L"040A", L"0000040A" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY esESLanguagePageEntries[] =
 {
     {
index ff36b11..3e89e58 100644 (file)
@@ -1,11 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS etEELayouts[] =
-{
-    { L"0425", L"00000425" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY etEELanguagePageEntries[] =
 {
     {
index 3cf8aa7..00d7977 100644 (file)
@@ -1,12 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS frFRLayouts[] =
-{
-    { L"040C", L"0000040C" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY frFRLanguagePageEntries[] =
 {
     {
index 29260ab..cdc18bd 100644 (file)
@@ -1,12 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS heILLayouts[] =
-{
-    { L"0409", L"00000409" },
-    { L"040D", L"0000040D" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY heILLanguagePageEntries[] =
 {
     {
index 8d4987f..44b1697 100644 (file)
@@ -1,12 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS itITLayouts[] =
-{
-    { L"0410", L"00000410" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY itITLanguagePageEntries[] =
 {
     {
index f71e340..a384439 100644 (file)
@@ -1,12 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS jaJPLayouts[] =
-{
-//    { L"0411", L"e0010411" },
-    { L"0411", L"00000411" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY jaJPLanguagePageEntries[] =
 {
     {
index d2cb295..0a5479e 100644 (file)
@@ -9,13 +9,6 @@
 
 #pragma once
 
-MUI_LAYOUTS ltLTLayouts[] =
-{
-    { L"0427", L"00010427" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY ltLTLanguagePageEntries[] =
 {
     {
index e8ae583..a6858e3 100644 (file)
@@ -1,11 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS msMYLayouts[] =
-{
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY msMYLanguagePageEntries[] =
 {
     {
index f8b6711..7fc8648 100644 (file)
@@ -8,14 +8,6 @@
 
 #pragma once
 
-MUI_LAYOUTS nlNLLayouts[] =
-{
-    { L"0413", L"00020409" },
-    { L"0413", L"00000413" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY nlNLLanguagePageEntries[] =
 {
     {
index 1df2488..43c40b4 100644 (file)
@@ -9,14 +9,6 @@
 
 #pragma once
 
-MUI_LAYOUTS plPLLayouts[] =
-{
-    { L"0415", L"00000415" },
-    { L"0415", L"00010415" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY plPLLanguagePageEntries[] =
 {
     {
index 6f3cba1..1f07438 100644 (file)
@@ -1,12 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS ptBRLayouts[] =
-{
-    { L"0416", L"00000416" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY ptBRLanguagePageEntries[] =
 {
     {
index 2a4f788..97892e8 100644 (file)
@@ -1,13 +1,6 @@
 /* ªtefan Fulea (stefan dot fulea at mail dot com) */
 #pragma once
 
-MUI_LAYOUTS roROLayouts[] =
-{
-    { L"0418", L"00000418" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY roROLanguagePageEntries[] =
 {
     {
index 3d809a1..6fcf7a7 100644 (file)
@@ -1,12 +1,5 @@
 #pragma once
 
-MUI_LAYOUTS ruRULayouts[] =
-{
-    { L"0419", L"00000419" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY ruRULanguagePageEntries[] =
 {
     {
index efb9d0c..ac14f87 100644 (file)
@@ -6,14 +6,6 @@
 
 #pragma once
 
-MUI_LAYOUTS skSKLayouts[] =
-{
-    { L"041B", L"0000041B" },
-    { L"041B", L"0001041B" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY skSKLanguagePageEntries[] =
 {
     {
index 01b6e61..e30d2e5 100644 (file)
@@ -4,12 +4,6 @@
 
 #pragma once
 
-MUI_LAYOUTS sqALLayouts[] =
-{
-    { L"041C", L"0000041C" },
-        { NULL, NULL }
-};
-
 static MUI_ENTRY sqALLanguagePageEntries[] =
 {
     {
index 897fbcc..f1b496d 100644 (file)
@@ -6,13 +6,6 @@
  */
 #pragma once
 
-MUI_LAYOUTS svSELayouts[] =
-{
-    { L"041D", L"0000041D" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY svSELanguagePageEntries[] =
 {
     {
index e9e3d8b..d7b4feb 100644 (file)
@@ -2,14 +2,6 @@
 
 #pragma once
 
-MUI_LAYOUTS trTRLayouts[] =
-{
-    { L"041F", L"0000041F" },
-    { L"041F", L"0001041f" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY trTRLanguagePageEntries[] =
 {
     {
index eebea80..761ed8e 100644 (file)
@@ -5,13 +5,6 @@
 
 #pragma once
 
-MUI_LAYOUTS ukUALayouts[] =
-{
-    { L"0422", L"00000422" },
-    { L"0409", L"00000409" },
-    { NULL, NULL }
-};
-
 static MUI_ENTRY ukUALanguagePageEntries[] =
 {
     {
index b7d2ab8..5d07307 100644 (file)
  */
 
 #include "usetup.h"
-#include "muifonts.h"
 #include "muilanguages.h"
 
 #define NDEBUG
 #include <debug.h>
 
-extern
-VOID
-PopupError(IN PCCH Text,
-           IN PCCH Status,
-           IN PINPUT_RECORD Ir,
-           IN ULONG WaitEvent);
-
 static
 ULONG
 FindLanguageIndex(VOID)
@@ -46,40 +38,43 @@ FindLanguageIndex(VOID)
 
     if (SelectedLanguageId == NULL)
     {
-        /* default to english */
-        return 0;
+        /* Default to en-US */
+        return 0;   // FIXME!!
+        // SelectedLanguageId = L"00000409";
     }
 
-    do
+    while (ResourceList[lngIndex].MuiPages != NULL)
     {
-        if (_wcsicmp(MUILanguageList[lngIndex].LanguageID , SelectedLanguageId) == 0)
+        if (_wcsicmp(ResourceList[lngIndex].LanguageID, SelectedLanguageId) == 0)
         {
             return lngIndex;
         }
 
         lngIndex++;
-    } while (MUILanguageList[lngIndex].MuiPages != NULL);
+    }
 
     return 0;
 }
 
 
+#if 0
 BOOLEAN
 IsLanguageAvailable(
     PWCHAR LanguageId)
 {
     ULONG lngIndex = 0;
 
-    do
+    while (ResourceList[lngIndex].MuiPages != NULL)
     {
-        if (_wcsicmp(MUILanguageList[lngIndex].LanguageID , LanguageId) == 0)
+        if (_wcsicmp(ResourceList[lngIndex].LanguageID, LanguageId) == 0)
             return TRUE;
 
         lngIndex++;
-    } while (MUILanguageList[lngIndex].MuiPages != NULL);
+    }
 
     return FALSE;
 }
+#endif
 
 
 static
@@ -92,59 +87,33 @@ FindMUIEntriesOfPage(
     const MUI_PAGE * Pages = NULL;
 
     lngIndex = max(FindLanguageIndex(), 0);
-    Pages = MUILanguageList[lngIndex].MuiPages;
+    Pages = ResourceList[lngIndex].MuiPages;
 
-    do
+    while (Pages[muiIndex].MuiEntry != NULL)
     {
-         if (Pages[muiIndex].Number == PageNumber)
-             return Pages[muiIndex].MuiEntry;
+        if (Pages[muiIndex].Number == PageNumber)
+            return Pages[muiIndex].MuiEntry;
 
-         muiIndex++;
-    } while (Pages[muiIndex].MuiEntry != NULL);
+        muiIndex++;
+    }
 
     return NULL;
 }
 
-
 static
 const MUI_ERROR *
 FindMUIErrorEntries(VOID)
 {
     ULONG lngIndex = max(FindLanguageIndex(), 0);
-    return MUILanguageList[lngIndex].MuiErrors;
+    return ResourceList[lngIndex].MuiErrors;
 }
 
-
 static
 const MUI_STRING *
 FindMUIStringEntries(VOID)
 {
     ULONG lngIndex = max(FindLanguageIndex(), 0);
-    return MUILanguageList[lngIndex].MuiStrings;
-}
-
-
-LPCWSTR
-MUIDefaultKeyboardLayout(VOID)
-{
-    ULONG lngIndex = max(FindLanguageIndex(), 0);
-    return MUILanguageList[lngIndex].MuiLayouts[0].LayoutID;
-}
-
-
-PWCHAR
-MUIGetGeoID(VOID)
-{
-    ULONG lngIndex = max(FindLanguageIndex(), 0);
-    return MUILanguageList[lngIndex].GeoID;
-}
-
-
-const MUI_LAYOUTS *
-MUIGetLayoutsList(VOID)
-{
-    ULONG lngIndex = max(FindLanguageIndex(), 0);
-    return MUILanguageList[lngIndex].MuiLayouts;
+    return ResourceList[lngIndex].MuiStrings;
 }
 
 
@@ -153,7 +122,7 @@ MUIClearPage(
     IN ULONG page)
 {
     const MUI_ENTRY * entry;
-    int index;
+    ULONG index;
 
     entry = FindMUIEntriesOfPage(page);
     if (!entry)
@@ -166,7 +135,7 @@ MUIClearPage(
     }
 
     index = 0;
-    do
+    while (entry[index].Buffer != NULL)
     {
         CONSOLE_ClearStyledText(entry[index].X,
                                 entry[index].Y,
@@ -174,16 +143,14 @@ MUIClearPage(
                                 strlen(entry[index].Buffer));
         index++;
     }
-    while (entry[index].Buffer != NULL);
 }
 
-
 VOID
 MUIDisplayPage(
     IN ULONG page)
 {
     const MUI_ENTRY * entry;
-    int index;
+    ULONG index;
 
     entry = FindMUIEntriesOfPage(page);
     if (!entry)
@@ -196,7 +163,7 @@ MUIDisplayPage(
     }
 
     index = 0;
-    do
+    while (entry[index].Buffer != NULL)
     {
         CONSOLE_SetStyledText(entry[index].X,
                               entry[index].Y,
@@ -205,10 +172,8 @@ MUIDisplayPage(
 
         index++;
     }
-    while (entry[index].Buffer != NULL);
 }
 
-
 VOID
 MUIDisplayError(
     IN ULONG ErrorNum,
@@ -250,7 +215,6 @@ MUIDisplayError(
                WaitEvent);
 }
 
-
 LPSTR
 MUIGetString(
     ULONG Number)
@@ -281,468 +245,29 @@ MUIGetString(
     return "<nostring>";
 }
 
-
-static
-BOOLEAN
-AddHotkeySettings(
-    IN LPCWSTR Hotkey,
-    IN LPCWSTR LangHotkey,
-    IN LPCWSTR LayoutHotkey)
-{
-    OBJECT_ATTRIBUTES ObjectAttributes;
-    UNICODE_STRING KeyName;
-    UNICODE_STRING ValueName;
-    HANDLE KeyHandle;
-    ULONG Disposition;
-    NTSTATUS Status;
-
-    RtlInitUnicodeString(&KeyName,
-                         L".DEFAULT\\Keyboard Layout\\Toggle");
-    InitializeObjectAttributes(&ObjectAttributes,
-                               &KeyName,
-                               OBJ_CASE_INSENSITIVE,
-                               GetRootKeyByPredefKey(HKEY_USERS, NULL),
-                               NULL);
-
-    Status =  NtCreateKey(&KeyHandle,
-                          KEY_SET_VALUE,
-                          &ObjectAttributes,
-                          0,
-                          NULL,
-                          REG_OPTION_NON_VOLATILE,
-                          &Disposition);
-
-    if(!NT_SUCCESS(Status))
-    {
-        DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
-        return FALSE;
-    }
-
-    RtlInitUnicodeString(&ValueName,
-                         L"Hotkey");
-
-    Status = NtSetValueKey(KeyHandle,
-                           &ValueName,
-                           0,
-                           REG_SZ,
-                           (PVOID)Hotkey,
-                           (1 + 1) * sizeof(WCHAR));
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
-        NtClose(KeyHandle);
-        return FALSE;
-    }
-
-    RtlInitUnicodeString(&ValueName,
-                         L"Language Hotkey");
-
-    Status = NtSetValueKey(KeyHandle,
-                           &ValueName,
-                           0,
-                           REG_SZ,
-                           (PVOID)LangHotkey,
-                           (1 + 1) * sizeof(WCHAR));
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
-        NtClose(KeyHandle);
-        return FALSE;
-    }
-
-    RtlInitUnicodeString(&ValueName,
-                         L"Layout Hotkey");
-
-    Status = NtSetValueKey(KeyHandle,
-                           &ValueName,
-                           0,
-                           REG_SZ,
-                           (PVOID)LayoutHotkey,
-                           (1 + 1) * sizeof(WCHAR));
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
-        NtClose(KeyHandle);
-        return FALSE;
-    }
-
-    NtClose(KeyHandle);
-    return TRUE;
-}
-
-
-BOOLEAN
-AddKbLayoutsToRegistry(
-    IN const MUI_LAYOUTS *MuiLayouts)
-{
-    OBJECT_ATTRIBUTES ObjectAttributes;
-    UNICODE_STRING KeyName;
-    UNICODE_STRING ValueName;
-    HANDLE KeyHandle;
-    HANDLE SubKeyHandle;
-    NTSTATUS Status;
-    ULONG Disposition;
-    ULONG uIndex = 0;
-    ULONG uCount = 0;
-    WCHAR szKeyName[48] = L".DEFAULT\\Keyboard Layout";
-    WCHAR szValueName[3 + 1];
-    WCHAR szLangID[8 + 1];
-
-    // Open the keyboard layout key
-    RtlInitUnicodeString(&KeyName, szKeyName);
-    InitializeObjectAttributes(&ObjectAttributes,
-                               &KeyName,
-                               OBJ_CASE_INSENSITIVE,
-                               GetRootKeyByPredefKey(HKEY_USERS, NULL),
-                               NULL);
-
-    Status =  NtCreateKey(&KeyHandle,
-                          KEY_CREATE_SUB_KEY,
-                          &ObjectAttributes,
-                          0,
-                          NULL,
-                          REG_OPTION_NON_VOLATILE,
-                          &Disposition);
-
-    if(NT_SUCCESS(Status))
-        NtClose(KeyHandle);
-    else
-    {
-        DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
-        return FALSE;
-    }
-
-    KeyName.MaximumLength = sizeof(szKeyName);
-    Status = RtlAppendUnicodeToString(&KeyName, L"\\Preload");
-
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("RtlAppend failed! (%lx)\n", Status);
-        DPRINT1("String is %wZ\n", &KeyName);
-        return FALSE;
-    }
-
-    InitializeObjectAttributes(&ObjectAttributes,
-                               &KeyName,
-                               OBJ_CASE_INSENSITIVE,
-                               GetRootKeyByPredefKey(HKEY_USERS, NULL),
-                               NULL);
-
-    Status = NtCreateKey(&KeyHandle,
-                         KEY_SET_VALUE,
-                         &ObjectAttributes,
-                         0,
-                         NULL,
-                         REG_OPTION_NON_VOLATILE,
-                         &Disposition);
-
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
-        return FALSE;
-    }
-
-    RtlInitUnicodeString(&KeyName, L".DEFAULT\\Keyboard Layout\\Substitutes");
-    InitializeObjectAttributes(&ObjectAttributes,
-                               &KeyName,
-                               OBJ_CASE_INSENSITIVE,
-                               GetRootKeyByPredefKey(HKEY_USERS, NULL),
-                               NULL);
-
-    Status =  NtCreateKey(&SubKeyHandle,
-                          KEY_SET_VALUE,
-                          &ObjectAttributes,
-                          0,
-                          NULL,
-                          REG_OPTION_NON_VOLATILE,
-                          &Disposition);
-
-    if(!NT_SUCCESS(Status))
-    {
-        DPRINT1("NtCreateKey() failed (Status %lx)\n", Status);
-        NtClose(SubKeyHandle);
-        NtClose(KeyHandle);
-        return FALSE;
-    }
-
-    do
-    {
-        if (uIndex > 19) break;
-
-        swprintf(szValueName, L"%u", uIndex + 1);
-        RtlInitUnicodeString(&ValueName, szValueName);
-
-        swprintf(szLangID, L"0000%s", MuiLayouts[uIndex].LangID);
-
-        if (_wcsicmp(szLangID, MuiLayouts[uIndex].LayoutID) == 0)
-        {
-            Status = NtSetValueKey(KeyHandle,
-                                   &ValueName,
-                                   0,
-                                   REG_SZ,
-                                   (PVOID)MuiLayouts[uIndex].LayoutID,
-                                   (wcslen(MuiLayouts[uIndex].LayoutID)+1) * sizeof(WCHAR));
-            if (!NT_SUCCESS(Status))
-            {
-                DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n", Status, uIndex);
-                NtClose(SubKeyHandle);
-                NtClose(KeyHandle);
-                return FALSE;
-            }
-        }
-        else
-        {
-            swprintf(szLangID, L"d%03lu%s", uCount, MuiLayouts[uIndex].LangID);
-            Status = NtSetValueKey(KeyHandle,
-                                   &ValueName,
-                                   0,
-                                   REG_SZ,
-                                   (PVOID)szLangID,
-                                   (wcslen(szLangID)+1) * sizeof(WCHAR));
-            if (!NT_SUCCESS(Status))
-            {
-                DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n", Status, uIndex);
-                NtClose(SubKeyHandle);
-                NtClose(KeyHandle);
-                return FALSE;
-            }
-
-            RtlInitUnicodeString(&ValueName, szLangID);
-
-            Status = NtSetValueKey(SubKeyHandle,
-                                   &ValueName,
-                                   0,
-                                   REG_SZ,
-                                   (PVOID)MuiLayouts[uIndex].LayoutID,
-                                   (wcslen(MuiLayouts[uIndex].LayoutID)+1) * sizeof(WCHAR));
-            if (!NT_SUCCESS(Status))
-            {
-                DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %u)\n", Status, uIndex);
-                NtClose(SubKeyHandle);
-                NtClose(KeyHandle);
-                return FALSE;
-            }
-
-            uCount++;
-        }
-
-        uIndex++;
-    }
-    while (MuiLayouts[uIndex].LangID != NULL);
-
-    if (uIndex > 1)
-        AddHotkeySettings(L"2", L"2", L"1");
-    else
-        AddHotkeySettings(L"3", L"3", L"3");
-
-    NtClose(SubKeyHandle);
-    NtClose(KeyHandle);
-    return TRUE;
-}
-
-
-BOOLEAN
-AddKeyboardLayouts(VOID)
-{
-    ULONG lngIndex = 0;
-
-    do
-    {
-        if (_wcsicmp(MUILanguageList[lngIndex].LanguageID , SelectedLanguageId) == 0)
-        {
-            return AddKbLayoutsToRegistry(MUILanguageList[lngIndex].MuiLayouts);
-        }
-
-        lngIndex++;
-    }
-    while (MUILanguageList[lngIndex].MuiPages != NULL);
-
-    return FALSE;
-}
-
-
-static
-BOOLEAN
-AddCodepageToRegistry(
-    IN LPCWSTR ACPage,
-    IN LPCWSTR OEMCPage,
-    IN LPCWSTR MACCPage)
-{
-    OBJECT_ATTRIBUTES ObjectAttributes;
-    UNICODE_STRING KeyName;
-    UNICODE_STRING ValueName;
-    HANDLE KeyHandle;
-    NTSTATUS Status;
-
-    // Open the nls codepage key
-    RtlInitUnicodeString(&KeyName,
-                         L"SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage");
-    InitializeObjectAttributes(&ObjectAttributes,
-                               &KeyName,
-                               OBJ_CASE_INSENSITIVE,
-                               GetRootKeyByPredefKey(HKEY_LOCAL_MACHINE, NULL),
-                               NULL);
-    Status = NtOpenKey(&KeyHandle,
-                       KEY_WRITE,
-                       &ObjectAttributes);
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("NtOpenKey() failed (Status %lx)\n", Status);
-        return FALSE;
-    }
-
-    // Set ANSI codepage
-    RtlInitUnicodeString(&ValueName, L"ACP");
-    Status = NtSetValueKey(KeyHandle,
-                           &ValueName,
-                           0,
-                           REG_SZ,
-                           (PVOID)ACPage,
-                           (wcslen(ACPage)+1) * sizeof(WCHAR));
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
-        NtClose(KeyHandle);
-        return FALSE;
-    }
-
-    // Set OEM codepage
-    RtlInitUnicodeString(&ValueName, L"OEMCP");
-    Status = NtSetValueKey(KeyHandle,
-                           &ValueName,
-                           0,
-                           REG_SZ,
-                           (PVOID)OEMCPage,
-                           (wcslen(OEMCPage)+1) * sizeof(WCHAR));
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
-        NtClose(KeyHandle);
-        return FALSE;
-    }
-
-    // Set MAC codepage
-    RtlInitUnicodeString(&ValueName, L"MACCP");
-    Status = NtSetValueKey(KeyHandle,
-                           &ValueName,
-                           0,
-                           REG_SZ,
-                           (PVOID)MACCPage,
-                           (wcslen(MACCPage)+1) * sizeof(WCHAR));
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("NtSetValueKey() failed (Status %lx)\n", Status);
-        NtClose(KeyHandle);
-        return FALSE;
-    }
-
-    NtClose(KeyHandle);
-
-    return TRUE;
-}
-
-
-static
-BOOLEAN
-AddFontsSettingsToRegistry(
-    IN const MUI_SUBFONT * MuiSubFonts)
-{
-    OBJECT_ATTRIBUTES ObjectAttributes;
-    UNICODE_STRING KeyName;
-    UNICODE_STRING ValueName;
-    HANDLE KeyHandle;
-    NTSTATUS Status;
-    ULONG uIndex = 0;
-
-    RtlInitUnicodeString(&KeyName,
-                         L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes");
-    InitializeObjectAttributes(&ObjectAttributes,
-                               &KeyName,
-                               OBJ_CASE_INSENSITIVE,
-                               GetRootKeyByPredefKey(HKEY_LOCAL_MACHINE, NULL),
-                               NULL);
-    Status = NtOpenKey(&KeyHandle,
-                       KEY_WRITE,
-                       &ObjectAttributes);
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("NtOpenKey() failed (Status %lx)\n", Status);
-        return FALSE;
-    }
-
-    do
-    {
-        RtlInitUnicodeString(&ValueName, MuiSubFonts[uIndex].FontName);
-        Status = NtSetValueKey(KeyHandle,
-                               &ValueName,
-                               0,
-                               REG_SZ,
-                               (PVOID)MuiSubFonts[uIndex].SubFontName,
-                               (wcslen(MuiSubFonts[uIndex].SubFontName)+1) * sizeof(WCHAR));
-        if (!NT_SUCCESS(Status))
-        {
-            DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n", Status, uIndex);
-            NtClose(KeyHandle);
-            return FALSE;
-        }
-
-        uIndex++;
-    }
-    while (MuiSubFonts[uIndex].FontName != NULL);
-
-    NtClose(KeyHandle);
-
-    return TRUE;
-}
-
-
-BOOLEAN
-AddCodePage(VOID)
-{
-    ULONG lngIndex = 0;
-    do
-    {
-        if (_wcsicmp(MUILanguageList[lngIndex].LanguageID , SelectedLanguageId) == 0)
-        {
-            if (AddCodepageToRegistry(MUILanguageList[lngIndex].ACPage,
-                                      MUILanguageList[lngIndex].OEMCPage,
-                                      MUILanguageList[lngIndex].MACCPage)&&
-                AddFontsSettingsToRegistry(MUILanguageList[lngIndex].MuiSubFonts))
-            {
-                return TRUE;
-            }
-            else
-            {
-                return FALSE;
-            }
-        }
-
-        lngIndex++;
-    }
-    while (MUILanguageList[lngIndex].MuiPages != NULL);
-
-    return FALSE;
-}
-
-
 VOID
 SetConsoleCodePage(VOID)
 {
-    ULONG lngIndex = 0;
     UINT wCodePage;
 
-    do
+#if 0
+    ULONG lngIndex = 0;
+
+    while (ResourceList[lngIndex].MuiPages != NULL)
     {
-        if (_wcsicmp(MUILanguageList[lngIndex].LanguageID , SelectedLanguageId) == 0)
+        if (_wcsicmp(ResourceList[lngIndex].LanguageID, SelectedLanguageId) == 0)
         {
-            wCodePage = (UINT) wcstoul(MUILanguageList[lngIndex].OEMCPage, NULL, 10);
+            wCodePage = (UINT) wcstoul(ResourceList[lngIndex].OEMCPage, NULL, 10);
             SetConsoleOutputCP(wCodePage);
             return;
         }
 
         lngIndex++;
     }
-    while (MUILanguageList[lngIndex].MuiPages != NULL);
+#else
+    wCodePage = (UINT)wcstoul(MUIGetOEMCodePage(SelectedLanguageId), NULL, 10);
+    SetConsoleOutputCP(wCodePage);
+#endif
 }
 
 /* EOF */
index a823c33..3dd985f 100644 (file)
@@ -2,17 +2,17 @@
 
 typedef struct
 {
-   BYTE X;
-   BYTE Y;
-   LPCSTR Buffer;
-   DWORD Flags;
-}MUI_ENTRY, *PMUI_ENTRY;
+    BYTE X;
+    BYTE Y;
+    LPCSTR Buffer;
+    DWORD Flags;
+} MUI_ENTRY, *PMUI_ENTRY;
 
 typedef struct
 {
     LPCSTR ErrorText;
     LPCSTR ErrorStatus;
-}MUI_ERROR;
+} MUI_ERROR;
 
 typedef struct
 {
@@ -28,34 +28,18 @@ typedef struct
 
 typedef struct
 {
-    PWCHAR FontName;
-    PWCHAR SubFontName;
-} MUI_SUBFONT;
-
-typedef struct
-{
-    PWCHAR LangID; // Language ID (like "0409")
-    PWCHAR LayoutID; // Layout ID (like "00000409")
-} MUI_LAYOUTS;
-
-typedef struct
-{
-    PWCHAR LanguageID;
-    PWCHAR ACPage;
-    PWCHAR OEMCPage;
-    PWCHAR MACCPage;
-    PWCHAR LanguageDescriptor;
-    PWCHAR GeoID;
+    PCWSTR LanguageID;
+    PCWSTR LanguageDescriptor;
     const MUI_PAGE * MuiPages;
     const MUI_ERROR * MuiErrors;
     const MUI_STRING * MuiStrings;
-    const MUI_SUBFONT * MuiSubFonts;
-    const MUI_LAYOUTS * MuiLayouts;
-} MUI_LANGUAGE;
+} MUI_LANGUAGE_RESOURCE;
 
+#if 0
 BOOLEAN
 IsLanguageAvailable(
     PWCHAR LanguageId);
+#endif
 
 VOID
 MUIDisplayPage(
@@ -72,25 +56,6 @@ MUIDisplayError(
     ULONG WaitEvent,
     ...);
 
-LPCWSTR
-MUIDefaultKeyboardLayout(VOID);
-
-PWCHAR
-MUIGetGeoID(VOID);
-
-const MUI_LAYOUTS *
-MUIGetLayoutsList(VOID);
-
-BOOLEAN
-AddKbLayoutsToRegistry(
-    IN const MUI_LAYOUTS *MuiLayouts);
-
-BOOLEAN
-AddCodePage(VOID);
-
-BOOLEAN
-AddKeyboardLayouts(VOID);
-
 VOID
 SetConsoleCodePage(VOID);
 
index c5c4519..2dca81c 100644 (file)
 
 #include <reactos/buildno.h>
 
-#ifdef LANGUAGE_AF_ZA
-    #include "lang/af-ZA.h"
-#endif
-#ifdef LANGUAGE_AR_AE
-    #include "lang/ar-AE.h"
-#endif
-#ifdef LANGUAGE_AR_BH
-    #include "lang/ar-BH.h"
-#endif
-#ifdef LANGUAGE_AR_DZ
-    #include "lang/ar-DZ.h"
-#endif
-#ifdef LANGUAGE_AR_EG
-    #include "lang/ar-EG.h"
-#endif
-#ifdef LANGUAGE_AR_IQ
-    #include "lang/ar-IQ.h"
-#endif
-#ifdef LANGUAGE_AR_JO
-    #include "lang/ar-JO.h"
-#endif
-#ifdef LANGUAGE_AR_KW
-    #include "lang/ar-KW.h"
-#endif
-#ifdef LANGUAGE_AR_LB
-    #include "lang/ar-LB.h"
-#endif
-#ifdef LANGUAGE_AR_LY
-    #include "lang/ar-LY.h"
-#endif
-#ifdef LANGUAGE_AR_MA
-    #include "lang/ar-MA.h"
-#endif
-#ifdef LANGUAGE_AR_OM
-    #include "lang/ar-OM.h"
-#endif
-#ifdef LANGUAGE_AR_QA
-    #include "lang/ar-QA.h"
-#endif
-#ifdef LANGUAGE_AR_SA
-    #include "lang/ar-SA.h"
-#endif
-#ifdef LANGUAGE_AR_SY
-    #include "lang/ar-SY.h"
-#endif
-#ifdef LANGUAGE_AR_TN
-    #include "lang/ar-TN.h"
-#endif
-#ifdef LANGUAGE_AR_YE
-    #include "lang/ar-YE.h"
-#endif
-#ifdef LANGUAGE_AZ_AZ
-    #include "lang/az-AZ.h"
-#endif
-#ifdef LANGUAGE_BE_BY
-    #include "lang/be-BY.h"
-#endif
+// #ifdef LANGUAGE_AF_ZA
+    // #include "lang/af-ZA.h"
+// #endif
+// #ifdef LANGUAGE_AR_AE
+    // #include "lang/ar-AE.h"
+// #endif
+// #ifdef LANGUAGE_AR_BH
+    // #include "lang/ar-BH.h"
+// #endif
+// #ifdef LANGUAGE_AR_DZ
+    // #include "lang/ar-DZ.h"
+// #endif
+// #ifdef LANGUAGE_AR_EG
+    // #include "lang/ar-EG.h"
+// #endif
+// #ifdef LANGUAGE_AR_IQ
+    // #include "lang/ar-IQ.h"
+// #endif
+// #ifdef LANGUAGE_AR_JO
+    // #include "lang/ar-JO.h"
+// #endif
+// #ifdef LANGUAGE_AR_KW
+    // #include "lang/ar-KW.h"
+// #endif
+// #ifdef LANGUAGE_AR_LB
+    // #include "lang/ar-LB.h"
+// #endif
+// #ifdef LANGUAGE_AR_LY
+    // #include "lang/ar-LY.h"
+// #endif
+// #ifdef LANGUAGE_AR_MA
+    // #include "lang/ar-MA.h"
+// #endif
+// #ifdef LANGUAGE_AR_OM
+    // #include "lang/ar-OM.h"
+// #endif
+// #ifdef LANGUAGE_AR_QA
+    // #include "lang/ar-QA.h"
+// #endif
+// #ifdef LANGUAGE_AR_SA
+    // #include "lang/ar-SA.h"
+// #endif
+// #ifdef LANGUAGE_AR_SY
+    // #include "lang/ar-SY.h"
+// #endif
+// #ifdef LANGUAGE_AR_TN
+    // #include "lang/ar-TN.h"
+// #endif
+// #ifdef LANGUAGE_AR_YE
+    // #include "lang/ar-YE.h"
+// #endif
+// #ifdef LANGUAGE_AZ_AZ
+    // #include "lang/az-AZ.h"
+// #endif
+// #ifdef LANGUAGE_BE_BY
+    // #include "lang/be-BY.h"
+// #endif
 #ifdef LANGUAGE_BG_BG
     #include "lang/bg-BG.h"
 #endif
 #ifdef LANGUAGE_BN_BD
     #include "lang/bn-BD.h"
 #endif
-#ifdef LANGUAGE_BN_IN
-    #include "lang/bn-IN.h"
-#endif
-#ifdef LANGUAGE_CA_ES
-    #include "lang/ca-ES.h"
-#endif
+// #ifdef LANGUAGE_BN_IN
+    // #include "lang/bn-IN.h"
+// #endif
+// #ifdef LANGUAGE_CA_ES
+    // #include "lang/ca-ES.h"
+// #endif
 #ifdef LANGUAGE_CS_CZ
     #include "lang/cs-CZ.h"
 #endif
 #ifdef LANGUAGE_DA_DK
     #include "lang/da-DK.h"
 #endif
-#ifdef LANGUAGE_DE_AT
-    #include "lang/de-AT.h"
-#endif
-#ifdef LANGUAGE_DE_CH
-    #include "lang/de-CH.h"
-#endif
+// #ifdef LANGUAGE_DE_AT
+    // #include "lang/de-AT.h"
+// #endif
+// #ifdef LANGUAGE_DE_CH
+    // #include "lang/de-CH.h"
+// #endif
 #ifdef LANGUAGE_DE_DE
     #include "lang/de-DE.h"
 #endif
-#ifdef LANGUAGE_DE_LI
-    #include "lang/de-LI.h"
-#endif
-#ifdef LANGUAGE_DE_LU
-    #include "lang/de-LU.h"
-#endif
-#ifdef LANGUAGE_DV_MV
-    #include "lang/dv-MV.h"
-#endif
+// #ifdef LANGUAGE_DE_LI
+    // #include "lang/de-LI.h"
+// #endif
+// #ifdef LANGUAGE_DE_LU
+    // #include "lang/de-LU.h"
+// #endif
+// #ifdef LANGUAGE_DV_MV
+    // #include "lang/dv-MV.h"
+// #endif
 #ifdef LANGUAGE_EL_GR
     #include "lang/el-GR.h"
 #endif
-#ifdef LANGUAGE_EN_AU
-    #include "lang/en-AU.h"
-#endif
-#ifdef LANGUAGE_EN_BZ
-    #include "lang/en-BZ.h"
-#endif
-#ifdef LANGUAGE_EN_CA
-    #include "lang/en-CA.h"
-#endif
-#ifdef LANGUAGE_EN_CB
-    #include "lang/en-CB.h"
-#endif
-#ifdef LANGUAGE_EN_GB
-    #include "lang/en-GB.h"
-#endif
-#ifdef LANGUAGE_EN_IE
-    #include "lang/en-IE.h"
-#endif
-#ifdef LANGUAGE_EN_JM
-    #include "lang/en-JM.h"
-#endif
-#ifdef LANGUAGE_EN_NZ
-    #include "lang/en-NZ.h"
-#endif
-#ifdef LANGUAGE_EN_PH
-    #include "lang/en-PH.h"
-#endif
-#ifdef LANGUAGE_EN_TT
-    #include "lang/en-TT.h"
-#endif
+// #ifdef LANGUAGE_EN_AU
+    // #include "lang/en-AU.h"
+// #endif
+// #ifdef LANGUAGE_EN_BZ
+    // #include "lang/en-BZ.h"
+// #endif
+// #ifdef LANGUAGE_EN_CA
+    // #include "lang/en-CA.h"
+// #endif
+// #ifdef LANGUAGE_EN_CB
+    // #include "lang/en-CB.h"
+// #endif
+// #ifdef LANGUAGE_EN_GB
+    // #include "lang/en-GB.h"
+// #endif
+// #ifdef LANGUAGE_EN_IE
+    // #include "lang/en-IE.h"
+// #endif
+// #ifdef LANGUAGE_EN_JM
+    // #include "lang/en-JM.h"
+// #endif
+// #ifdef LANGUAGE_EN_NZ
+    // #include "lang/en-NZ.h"
+// #endif
+// #ifdef LANGUAGE_EN_PH
+    // #include "lang/en-PH.h"
+// #endif
+// #ifdef LANGUAGE_EN_TT
+    // #include "lang/en-TT.h"
+// #endif
 #ifdef LANGUAGE_EN_US
     #include "lang/en-US.h"
 #endif
-#ifdef LANGUAGE_EN_ZA
-    #include "lang/en-ZA.h"
-#endif
-#ifdef LANGUAGE_EN_ZW
-    #include "lang/en-ZW.h"
-#endif
-#ifdef LANGUAGE_EO_AA
-    #include "lang/eo-AA.h"
-#endif
-#ifdef LANGUAGE_ES_AR
-    #include "lang/es-AR.h"
-#endif
-#ifdef LANGUAGE_ES_BO
-    #include "lang/es-BO.h"
-#endif
-#ifdef LANGUAGE_ES_CL
-    #include "lang/es-CL.h"
-#endif
-#ifdef LANGUAGE_ES_CO
-    #include "lang/es-CO.h"
-#endif
-#ifdef LANGUAGE_ES_CR
-    #include "lang/es-CR.h"
-#endif
-#ifdef LANGUAGE_ES_DO
-    #include "lang/es-DO.h"
-#endif
-#ifdef LANGUAGE_ES_EC
-    #include "lang/es-EC.h"
-#endif
+// #ifdef LANGUAGE_EN_ZA
+    // #include "lang/en-ZA.h"
+// #endif
+// #ifdef LANGUAGE_EN_ZW
+    // #include "lang/en-ZW.h"
+// #endif
+// #ifdef LANGUAGE_EO_AA
+    // #include "lang/eo-AA.h"
+// #endif
+// #ifdef LANGUAGE_ES_AR
+    // #include "lang/es-AR.h"
+// #endif
+// #ifdef LANGUAGE_ES_BO
+    // #include "lang/es-BO.h"
+// #endif
+// #ifdef LANGUAGE_ES_CL
+    // #include "lang/es-CL.h"
+// #endif
+// #ifdef LANGUAGE_ES_CO
+    // #include "lang/es-CO.h"
+// #endif
+// #ifdef LANGUAGE_ES_CR
+    // #include "lang/es-CR.h"
+// #endif
+// #ifdef LANGUAGE_ES_DO
+    // #include "lang/es-DO.h"
+// #endif
+// #ifdef LANGUAGE_ES_EC
+    // #include "lang/es-EC.h"
+// #endif
 #ifdef LANGUAGE_ES_ES
     #include "lang/es-ES.h"
 #endif
-#ifdef LANGUAGE_ES_GT
-    #include "lang/es-GT.h"
-#endif
-#ifdef LANGUAGE_ES_HN
-    #include "lang/es-HN.h"
-#endif
-#ifdef LANGUAGE_ES_MX
-    #include "lang/es-MX.h"
-#endif
-#ifdef LANGUAGE_ES_NI
-    #include "lang/es-NI.h"
-#endif
-#ifdef LANGUAGE_ES_PA
-    #include "lang/es-PA.h"
-#endif
-#ifdef LANGUAGE_ES_PE
-    #include "lang/es-PE.h"
-#endif
-#ifdef LANGUAGE_ES_PR
-    #include "lang/es-PR.h"
-#endif
-#ifdef LANGUAGE_ES_PY
-    #include "lang/es-PY.h"
-#endif
-#ifdef LANGUAGE_ES_SV
-    #include "lang/es-SV.h"
-#endif
-#ifdef LANGUAGE_ES_UY
-    #include "lang/es-UY.h"
-#endif
-#ifdef LANGUAGE_ES_VE
-    #include "lang/es-VE.h"
-#endif
+// #ifdef LANGUAGE_ES_GT
+    // #include "lang/es-GT.h"
+// #endif
+// #ifdef LANGUAGE_ES_HN
+    // #include "lang/es-HN.h"
+// #endif
+// #ifdef LANGUAGE_ES_MX
+    // #include "lang/es-MX.h"
+// #endif
+// #ifdef LANGUAGE_ES_NI
+    // #include "lang/es-NI.h"
+// #endif
+// #ifdef LANGUAGE_ES_PA
+    // #include "lang/es-PA.h"
+// #endif
+// #ifdef LANGUAGE_ES_PE
+    // #include "lang/es-PE.h"
+// #endif
+// #ifdef LANGUAGE_ES_PR
+    // #include "lang/es-PR.h"
+// #endif
+// #ifdef LANGUAGE_ES_PY
+    // #include "lang/es-PY.h"
+// #endif
+// #ifdef LANGUAGE_ES_SV
+    // #include "lang/es-SV.h"
+// #endif
+// #ifdef LANGUAGE_ES_UY
+    // #include "lang/es-UY.h"
+// #endif
+// #ifdef LANGUAGE_ES_VE
+    // #include "lang/es-VE.h"
+// #endif
 #ifdef LANGUAGE_ET_EE
     #include "lang/et-EE.h"
 #endif
-#ifdef LANGUAGE_EU_ES
-    #include "lang/eu-ES.h"
-#endif
-#ifdef LANGUAGE_FA_IR
-    #include "lang/fa-IR.h"
-#endif
-#ifdef LANGUAGE_FI_FI
-    #include "lang/fi-FI.h"
-#endif
-#ifdef LANGUAGE_FO_FO
-    #include "lang/fo-FO.h"
-#endif
-#ifdef LANGUAGE_FR_BE
-    #include "lang/fr-BE.h"
-#endif
-#ifdef LANGUAGE_FR_CA
-    #include "lang/fr-CA.h"
-#endif
-#ifdef LANGUAGE_FR_CH
-    #include "lang/fr-CH.h"
-#endif
+// #ifdef LANGUAGE_EU_ES
+    // #include "lang/eu-ES.h"
+// #endif
+// #ifdef LANGUAGE_FA_IR
+    // #include "lang/fa-IR.h"
+// #endif
+// #ifdef LANGUAGE_FI_FI
+    // #include "lang/fi-FI.h"
+// #endif
+// #ifdef LANGUAGE_FO_FO
+    // #include "lang/fo-FO.h"
+// #endif
+// #ifdef LANGUAGE_FR_BE
+    // #include "lang/fr-BE.h"
+// #endif
+// #ifdef LANGUAGE_FR_CA
+    // #include "lang/fr-CA.h"
+// #endif
+// #ifdef LANGUAGE_FR_CH
+    // #include "lang/fr-CH.h"
+// #endif
 #ifdef LANGUAGE_FR_FR
     #include "lang/fr-FR.h"
 #endif
-#ifdef LANGUAGE_FR_LU
-    #include "lang/fr-LU.h"
-#endif
-#ifdef LANGUAGE_FR_MC
-    #include "lang/fr-MC.h"
-#endif
-#ifdef LANGUAGE_GL_ES
-    #include "lang/gl-ES.h"
-#endif
-#ifdef LANGUAGE_GU_IN
-    #include "lang/gu-IN.h"
-#endif
+// #ifdef LANGUAGE_FR_LU
+    // #include "lang/fr-LU.h"
+// #endif
+// #ifdef LANGUAGE_FR_MC
+    // #include "lang/fr-MC.h"
+// #endif
+// #ifdef LANGUAGE_GL_ES
+    // #include "lang/gl-ES.h"
+// #endif
+// #ifdef LANGUAGE_GU_IN
+    // #include "lang/gu-IN.h"
+// #endif
 #ifdef LANGUAGE_HE_IL
     #include "lang/he-IL.h"
 #endif
-#ifdef LANGUAGE_HI_IN
-    #include "lang/hi-IN.h"
-#endif
-#ifdef LANGUAGE_HR_HR
-    #include "lang/hr-HR.h"
-#endif
-#ifdef LANGUAGE_HU_HU
-    #include "lang/hu-HU.h"
-#endif
-#ifdef LANGUAGE_HY_AM
-    #include "lang/hy-AM.h"
-#endif
-#ifdef LANGUAGE_ID_ID
-    #include "lang/id-ID.h"
-#endif
-#ifdef LANGUAGE_IS_IS
-    #include "lang/is-IS.h"
-#endif
-#ifdef LANGUAGE_IT_CH
-    #include "lang/it-CH.h"
-#endif
+// #ifdef LANGUAGE_HI_IN
+    // #include "lang/hi-IN.h"
+// #endif
+// #ifdef LANGUAGE_HR_HR
+    // #include "lang/hr-HR.h"
+// #endif
+// #ifdef LANGUAGE_HU_HU
+    // #include "lang/hu-HU.h"
+// #endif
+// #ifdef LANGUAGE_HY_AM
+    // #include "lang/hy-AM.h"
+// #endif
+// #ifdef LANGUAGE_ID_ID
+    // #include "lang/id-ID.h"
+// #endif
+// #ifdef LANGUAGE_IS_IS
+    // #include "lang/is-IS.h"
+// #endif
+// #ifdef LANGUAGE_IT_CH
+    // #include "lang/it-CH.h"
+// #endif
 #ifdef LANGUAGE_IT_IT
     #include "lang/it-IT.h"
 #endif
 #ifdef LANGUAGE_JA_JP
     #include "lang/ja-JP.h"
 #endif
-#ifdef LANGUAGE_KA_GE
-    #include "lang/ka-GE.h"
-#endif
-#ifdef LANGUAGE_KK_KZ
-    #include "lang/kk-KZ.h"
-#endif
-#ifdef LANGUAGE_KN_IN
-    #include "lang/kn-IN.h"
-#endif
-#ifdef LANGUAGE_KOK_IN
-    #include "lang/kok-IN.h"
-#endif
-#ifdef LANGUAGE_KO_KR
-    #include "lang/ko-KR.h"
-#endif
-#ifdef LANGUAGE_KY_KG
-    #include "lang/ky-KG.h"
-#endif
+// #ifdef LANGUAGE_KA_GE
+    // #include "lang/ka-GE.h"
+// #endif
+// #ifdef LANGUAGE_KK_KZ
+    // #include "lang/kk-KZ.h"
+// #endif
+// #ifdef LANGUAGE_KN_IN
+    // #include "lang/kn-IN.h"
+// #endif
+// #ifdef LANGUAGE_KOK_IN
+    // #include "lang/kok-IN.h"
+// #endif
+// #ifdef LANGUAGE_KO_KR
+    // #include "lang/ko-KR.h"
+// #endif
+// #ifdef LANGUAGE_KY_KG
+    // #include "lang/ky-KG.h"
+// #endif
 #ifdef LANGUAGE_LT_LT
     #include "lang/lt-LT.h"
 #endif
-#ifdef LANGUAGE_LV_LV
-    #include "lang/lv-LV.h"
-#endif
-#ifdef LANGUAGE_MK_MK
-    #include "lang/mk-MK.h"
-#endif
-#ifdef LANGUAGE_MN_MN
-    #include "lang/mn-MN.h"
-#endif
-#ifdef LANGUAGE_MR_IN
-    #include "lang/mr-IN.h"
-#endif
-#ifdef LANGUAGE_MS_BN
-    #include "lang/ms-BN.h"
-#endif
+// #ifdef LANGUAGE_LV_LV
+    // #include "lang/lv-LV.h"
+// #endif
+// #ifdef LANGUAGE_MK_MK
+    // #include "lang/mk-MK.h"
+// #endif
+// #ifdef LANGUAGE_MN_MN
+    // #include "lang/mn-MN.h"
+// #endif
+// #ifdef LANGUAGE_MR_IN
+    // #include "lang/mr-IN.h"
+// #endif
+// #ifdef LANGUAGE_MS_BN
+    // #include "lang/ms-BN.h"
+// #endif
 #ifdef LANGUAGE_MS_MY
     #include "lang/ms-MY.h"
 #endif
-#ifdef LANGUAGE_MY_MM
-    #include "lang/my-MM.h"
-#endif
-#ifdef LANGUAGE_NL_BE
-    #include "lang/nl-BE.h"
-#endif
+// #ifdef LANGUAGE_MY_MM
+    // #include "lang/my-MM.h"
+// #endif
+// #ifdef LANGUAGE_NL_BE
+    // #include "lang/nl-BE.h"
+// #endif
 #ifdef LANGUAGE_NL_NL
     #include "lang/nl-NL.h"
 #endif
-#ifdef LANGUAGE_NN_NO
-    #include "lang/nn-NO.h"
-#endif
-#ifdef LANGUAGE_PA_IN
-    #include "lang/pa-IN.h"
-#endif
+// #ifdef LANGUAGE_NN_NO
+    // #include "lang/nn-NO.h"
+// #endif
+// #ifdef LANGUAGE_PA_IN
+    // #include "lang/pa-IN.h"
+// #endif
 #ifdef LANGUAGE_PL_PL
     #include "lang/pl-PL.h"
 #endif
 #ifdef LANGUAGE_PT_BR
     #include "lang/pt-BR.h"
 #endif
-#ifdef LANGUAGE_PT_PT
-    #include "lang/pt-PT.h"
-#endif
-#ifdef LANGUAGE_RM_CH
-    #include "lang/rm-CH.h"
-#endif
+// #ifdef LANGUAGE_PT_PT
+    // #include "lang/pt-PT.h"
+// #endif
+// #ifdef LANGUAGE_RM_CH
+    // #include "lang/rm-CH.h"
+// #endif
 #ifdef LANGUAGE_RO_RO
     #include "lang/ro-RO.h"
 #endif
 #ifdef LANGUAGE_RU_RU
     #include "lang/ru-RU.h"
 #endif
-#ifdef LANGUAGE_SA_IN
-    #include "lang/sa-IN.h"
-#endif
+// #ifdef LANGUAGE_SA_IN
+    // #include "lang/sa-IN.h"
+// #endif
 #ifdef LANGUAGE_SK_SK
     #include "lang/sk-SK.h"
 #endif
-#ifdef LANGUAGE_SL_SI
-    #include "lang/sl-SI.h"
-#endif
+// #ifdef LANGUAGE_SL_SI
+    // #include "lang/sl-SI.h"
+// #endif
 #ifdef LANGUAGE_SQ_AL
     #include "lang/sq-AL.h"
 #endif
-#ifdef LANGUAGE_SR_SP
-    #include "lang/sr-SP.h"
-#endif
-#ifdef LANGUAGE_SV_FI
-    #include "lang/sv-FI.h"
-#endif
+// #ifdef LANGUAGE_SR_SP
+    // #include "lang/sr-SP.h"
+// #endif
+// #ifdef LANGUAGE_SV_FI
+    // #include "lang/sv-FI.h"
+// #endif
 #ifdef LANGUAGE_SV_SE
     #include "lang/sv-SE.h"
 #endif
-#ifdef LANGUAGE_SW_KE
-    #include "lang/sw-KE.h"
-#endif
-#ifdef LANGUAGE_SYR_SY
-    #include "lang/syr-SY.h"
-#endif
-#ifdef LANGUAGE_TA_IN
-    #include "lang/ta-IN.h"
-#endif
-#ifdef LANGUAGE_TE_IN
-    #include "lang/te-IN.h"
-#endif
-#ifdef LANGUAGE_TH_TH
-    #include "lang/th-TH.h"
-#endif
+// #ifdef LANGUAGE_SW_KE
+    // #include "lang/sw-KE.h"
+// #endif
+// #ifdef LANGUAGE_SYR_SY
+    // #include "lang/syr-SY.h"
+// #endif
+// #ifdef LANGUAGE_TA_IN
+    // #include "lang/ta-IN.h"
+// #endif
+// #ifdef LANGUAGE_TE_IN
+    // #include "lang/te-IN.h"
+// #endif
+// #ifdef LANGUAGE_TH_TH
+    // #include "lang/th-TH.h"
+// #endif
 #ifdef LANGUAGE_TR_TR
     #include "lang/tr-TR.h"
 #endif
-#ifdef LANGUAGE_TT_TA
-    #include "lang/tt-TA.h"
-#endif
+// #ifdef LANGUAGE_TT_TA
+    // #include "lang/tt-TA.h"
+// #endif
 #ifdef LANGUAGE_UK_UA
     #include "lang/uk-UA.h"
 #endif
-#ifdef LANGUAGE_UR_PK
-    #include "lang/ur-PK.h"
-#endif
-#ifdef LANGUAGE_UZ_UZ
-    #include "lang/uz-UZ.h"
-#endif
-#ifdef LANGUAGE_VI_VN
-    #include "lang/vi-VN.h"
-#endif
-#ifdef LANGUAGE_WA_BE
-    #include "lang/wa-BE.h"
-#endif
-#ifdef LANGUAGE_ZH_CN
-    #include "lang/zh-CN.h"
-#endif
-#ifdef LANGUAGE_ZH_HK
-    #include "lang/zh-HK.h"
-#endif
-#ifdef LANGUAGE_ZH_MO
-    #include "lang/zh-MO.h"
-#endif
-#ifdef LANGUAGE_ZH_SG
-    #include "lang/zh-SG.h"
-#endif
-#ifdef LANGUAGE_ZH_TW
-    #include "lang/zh-TW.h"
-#endif
+// #ifdef LANGUAGE_UR_PK
+    // #include "lang/ur-PK.h"
+// #endif
+// #ifdef LANGUAGE_UZ_UZ
+    // #include "lang/uz-UZ.h"
+// #endif
+// #ifdef LANGUAGE_VI_VN
+    // #include "lang/vi-VN.h"
+// #endif
+// #ifdef LANGUAGE_WA_BE
+    // #include "lang/wa-BE.h"
+// #endif
+// #ifdef LANGUAGE_ZH_CN
+    // #include "lang/zh-CN.h"
+// #endif
+// #ifdef LANGUAGE_ZH_HK
+    // #include "lang/zh-HK.h"
+// #endif
+// #ifdef LANGUAGE_ZH_MO
+    // #include "lang/zh-MO.h"
+// #endif
+// #ifdef LANGUAGE_ZH_SG
+    // #include "lang/zh-SG.h"
+// #endif
+// #ifdef LANGUAGE_ZH_TW
+    // #include "lang/zh-TW.h"
+// #endif
 
-const MUI_LANGUAGE MUILanguageList[] =
+const MUI_LANGUAGE_RESOURCE ResourceList[] =
 {
-  /* Lang ID,   ANSI CP, OEM CP, MAC CP,   Language Name,                   GeoID   page strgs,error strings,    other strings, fonts,       kb layouts */
+  /* Lang ID,     Language Name, Page strings, Error strings, Other strings */
 #ifdef LANGUAGE_AF_ZA
-    {L"00000436", L"1252", L"850", L"10000", L"Afrikaans", L"209", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, afZALayouts },
+    {L"00000436", L"Afrikaans", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_SQ_AL
-    {L"0000041C", L"1250", L"852", L"10029", L"Albanian (Albania)", L"6", sqALPages, sqALErrorEntries, sqALStrings, LatinFonts, sqALLayouts },
+    {L"0000041C", L"Albanian (Albania)", sqALPages, sqALErrorEntries, sqALStrings},
 #endif
 #ifdef LANGUAGE_AR_SA
-    {L"00000401", L"1256", L"720", L"10004", L"Arabic (Saudi Arabia)", L"205", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arSALayouts },
+    {L"00000401", L"Arabic (Saudi Arabia)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_IQ
-    {L"00000801", L"1256", L"720", L"10004", L"Arabic (Iraq)", L"121", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arIQLayouts },
+    {L"00000801", L"Arabic (Iraq)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_EG
-    {L"00000C01", L"1256", L"720", L"10004", L"Arabic (Egypt)", L"67", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arEGLayouts },
+    {L"00000C01", L"Arabic (Egypt)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_LY
-    {L"00001001", L"1256", L"720", L"10004", L"Arabic (Libya)", L"148", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arLYLayouts },
+    {L"00001001", L"Arabic (Libya)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_DZ
-    {L"00001401", L"1256", L"720", L"10004", L"Arabic (Algeria)", L"4", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arDZLayouts },
+    {L"00001401", L"Arabic (Algeria)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_MA
-    {L"00001801", L"1256", L"720", L"10004", L"Arabic (Morocco)", L"149", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arMALayouts },
+    {L"00001801", L"Arabic (Morocco)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_TN
-    {L"00001C01", L"1256", L"720", L"10004", L"Arabic (Tunisia)", L"234", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arTNLayouts },
+    {L"00001C01", L"Arabic (Tunisia)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_OM
-    {L"00002001", L"1256", L"720", L"10004", L"Arabic (Oman)", L"164", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arOMLayouts },
+    {L"00002001", L"Arabic (Oman)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_YE
-    {L"00002401", L"1256", L"720", L"10004", L"Arabic (Yemen)", L"261", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arYELayouts },
+    {L"00002401", L"Arabic (Yemen)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_SY
-    {L"00002801", L"1256", L"720", L"10004", L"Arabic (Syria)", L"222", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arSYLayouts },
+    {L"00002801", L"Arabic (Syria)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_JO
-    {L"00002C01", L"1256", L"720", L"10004", L"Arabic (Jordan)", L"126", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arJOLayouts },
+    {L"00002C01", L"Arabic (Jordan)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_LB
-    {L"00003001", L"1256", L"720", L"10004", L"Arabic (Lebanon)", L"139", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arLBLayouts },
+    {L"00003001", L"Arabic (Lebanon)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_KW
-    {L"00003401", L"1256", L"720", L"10004", L"Arabic (Kuwait)", L"136", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arKWLayouts },
+    {L"00003401", L"Arabic (Kuwait)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_AE
-    {L"00003801", L"1256", L"720", L"10004", L"Arabic (U.A.E.)", L"224", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arAELayouts },
+    {L"00003801", L"Arabic (U.A.E.)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_BH
-    {L"00003C01", L"1256", L"720", L"10004", L"Arabic (Bahrain)", L"17", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arBHLayouts },
+    {L"00003C01", L"Arabic (Bahrain)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AR_QA
-    {L"00004001", L"1256", L"720", L"10004", L"Arabic (Qatar)", L"197", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, arQALayouts },
+    {L"00004001", L"Arabic (Qatar)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_HY_AM
-    {L"0000042B", L"0", L"1", L"2", L"Armenian", L"7", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, hyAMLayouts },
+    {L"0000042B", L"Armenian", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AZ_AZ
-    {L"0000082C", L"1251", L"866", L"10007", L"Azeri (Cyrillic)", L"5", enUSPages, enUSErrorEntries, enUSStrings, CyrillicFonts, azAZLayouts },
+    {L"0000082C", L"Azeri (Cyrillic)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_AZ_AZ
-    {L"0000042C", L"1254", L"857", L"10081", L"Azeri (Latin)", L"5", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, azAZLayouts },
+    {L"0000042C", L"Azeri (Latin)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EU_ES
-    {L"0000042D", L"1252", L"850", L"10000", L"Basque", L"217", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, euESLayouts },
+    {L"0000042D", L"Basque", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_BE_BY
-    {L"00000423", L"1251", L"866", L"10007", L"Belarusian", L"29", enUSPages, enUSErrorEntries, enUSStrings, CyrillicFonts, beBYLayouts },
+    {L"00000423", L"Belarusian", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_BN_BD
-    {L"00000845", L"0", L"1", L"2", L"Bengali (Bangladesh)", L"23", bnBDPages, bnBDErrorEntries, bnBDStrings, UnicodeFonts, bnBDLayouts },
+    {L"00000845", L"Bengali (Bangladesh)", bnBDPages, bnBDErrorEntries, bnBDStrings},
 #endif
 #ifdef LANGUAGE_BN_IN
-    {L"00000445", L"0", L"1", L"2", L"Bengali (India)", L"113", bnBDPages, bnBDErrorEntries, bnBDStrings, UnicodeFonts, bnINLayouts },
+    {L"00000445", L"Bengali (India)", bnBDPages, bnBDErrorEntries, bnBDStrings},
 #endif
 #ifdef LANGUAGE_BG_BG
-    {L"00000402", L"1251", L"866", L"10007", L"Bulgarian", L"35", bgBGPages, bgBGErrorEntries, bgBGStrings, CyrillicFonts, bgBGLayouts },
+    {L"00000402", L"Bulgarian", bgBGPages, bgBGErrorEntries, bgBGStrings},
 #endif
 #ifdef LANGUAGE_MY_MM
-    {L"00000455", L"0", L"1", L"2", L"Burmese", L"1", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, myMMLayouts },
+    {L"00000455", L"Burmese", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_CA_ES
-    {L"00000403", L"1252", L"850", L"10000", L"Catalan", L"217", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, caESLayouts },
+    {L"00000403", L"Catalan", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_ZH_TW
-    {L"00000404", L"950", L"950", L"10008", L"Chinese (Taiwan)", L"237", enUSPages, enUSErrorEntries, enUSStrings, ChineseTraditionalFonts, zhTWLayouts },
+    {L"00000404", L"Chinese (Taiwan)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_ZH_CN
-    {L"00000804", L"936", L"936", L"10008", L"Chinese (PRC)", L"45", enUSPages, enUSErrorEntries, enUSStrings, ChineseSimplifiedFonts, zhCNLayouts },
+    {L"00000804", L"Chinese (PRC)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_ZH_HK
-    {L"00000C04", L"950", L"950", L"10008", L"Chinese (Hong Kong S.A.R.)", L"104", enUSPages, enUSErrorEntries, enUSStrings, ChineseTraditionalFonts, zhHKLayouts },
+    {L"00000C04", L"Chinese (Hong Kong S.A.R.)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_ZH_SG
-    {L"00001004", L"936", L"936", L"10008", L"Chinese (Singapore)", L"215", enUSPages, enUSErrorEntries, enUSStrings, ChineseSimplifiedFonts, zhSGLayouts },
+    {L"00001004", L"Chinese (Singapore)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_ZH_MO
-    {L"00001404", L"950", L"950", L"10002", L"Chinese (Macau S.A.R.)", L"151", enUSPages, enUSErrorEntries, enUSStrings, ChineseSimplifiedFonts, zhMOLayouts },
+    {L"00001404", L"Chinese (Macau S.A.R.)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_HR_HR
-    {L"0000041A", L"1250", L"852", L"10029", L"Croatian", L"108", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, hrHRLayouts },
+    {L"0000041A", L"Croatian", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_CS_CZ
-    {L"00000405", L"1250", L"852", L"10029", L"Czech", L"75", csCZPages, csCZErrorEntries, csCZStrings, LatinFonts, csCZLayouts },
+    {L"00000405", L"Czech", csCZPages, csCZErrorEntries, csCZStrings},
 #endif
 #ifdef LANGUAGE_DA_DK
-    {L"00000406", L"1252", L"850", L"10000", L"Danish", L"61", daDKPages, daDKErrorEntries, daDKStrings, LatinFonts, daDKLayouts },
+    {L"00000406", L"Danish", daDKPages, daDKErrorEntries, daDKStrings},
 #endif
 #ifdef LANGUAGE_DV_MV
-    {L"00000465", L"0", L"1", L"2", L"Dhivehi (Maldives)", L"165", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, dvMVLayouts },
+    {L"00000465", L"Dhivehi (Maldives)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_NL_NL
-    {L"00000413", L"1252", L"850", L"10000", L"Dutch (Netherlands)", L"176", nlNLPages, nlNLErrorEntries, nlNLStrings, LatinFonts, nlNLLayouts },
+    {L"00000413", L"Dutch (Netherlands)", nlNLPages, nlNLErrorEntries, nlNLStrings},
 #endif
 #ifdef LANGUAGE_NL_BE
-    {L"00000813", L"1252", L"850", L"10000", L"Dutch (Belgium)", L"21", nlNLPages, nlNLErrorEntries, nlNLStrings, LatinFonts, nlBELayouts },
+    {L"00000813", L"Dutch (Belgium)", nlNLPages, nlNLErrorEntries, nlNLStrings},
 #endif
 #ifdef LANGUAGE_EN_US
-    {L"00000409", L"1252", L"437", L"10000", L"English (United States)", L"244", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enUSLayouts },
+    {L"00000409", L"English (United States)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_GB
-    {L"00000809", L"1252", L"850", L"10000", L"English (United Kingdom)", L"242", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enGBLayouts },
+    {L"00000809", L"English (United Kingdom)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_AU
-    {L"00000C09", L"1252", L"850", L"10000", L"English (Australia)", L"12", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enAULayouts },
+    {L"00000C09", L"English (Australia)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_CA
-    {L"00001009", L"1252", L"850", L"10000", L"English (Canada)", L"39", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enCALayouts },
+    {L"00001009", L"English (Canada)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_NZ
-    {L"00001409", L"1252", L"850", L"10000", L"English (New Zealand)", L"183", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enNZLayouts },
+    {L"00001409", L"English (New Zealand)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_IE
-    {L"00001809", L"1252", L"850", L"10000", L"English (Ireland)", L"68", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enIELayouts },
+    {L"00001809", L"English (Ireland)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_ZA
-    {L"00001C09", L"1252", L"437", L"10000", L"English (South Africa)", L"209", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enZALayouts },
+    {L"00001C09", L"English (South Africa)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_JM
-    {L"00002009", L"1252", L"850", L"10000", L"English (Jamaica)", L"124", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enJMLayouts },
+    {L"00002009", L"English (Jamaica)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_CB
-    {L"00002409", L"1252", L"850", L"10000", L"English (Caribbean)", L"1", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enCBLayouts },
+    {L"00002409", L"English (Caribbean)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_BZ
-    {L"00002809", L"1252", L"850", L"10000", L"English (Belize)", L"24", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enBZLayouts },
+    {L"00002809", L"English (Belize)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_TT
-    {L"00002C09", L"1252", L"850", L"10000", L"English (Trinidad)", L"225", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enTTLayouts },
+    {L"00002C09", L"English (Trinidad)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_ZW
-    {L"00003009", L"1252", L"437", L"10000", L"English (Zimbabwe)", L"264", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enZWLayouts },
+    {L"00003009", L"English (Zimbabwe)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EN_PH
-    {L"00003409", L"1252", L"437", L"10000", L"English (Philippines)", L"201", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, enPHLayouts },
+    {L"00003409", L"English (Philippines)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_EO_AA
-    {L"0000048F", L"1252", L"437", L"10000", L"Esperanto", L"1", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, eoAALayouts },
+    {L"0000048F", L"Esperanto", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_ET_EE
-    {L"00000425", L"1252", L"775", L"10029", L"Estonian", L"70", etEEPages, etEEErrorEntries, etEEStrings, LatinFonts, etEELayouts },
+    {L"00000425", L"Estonian", etEEPages, etEEErrorEntries, etEEStrings},
 #endif
 #ifdef LANGUAGE_FO_FO
-    {L"00000438", L"1252", L"850", L"10079", L"Faeroese", L"81", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, foFOLayouts },
+    {L"00000438", L"Faeroese", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_FA_IR
-    {L"00000429", L"1256", L"720", L"10004", L"Farsi", L"116", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, faIRLayouts },
+    {L"00000429", L"Farsi", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_FI_FI
-    {L"0000040B", L"1252", L"850", L"10000", L"Finnish", L"77", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, fiFILayouts },
+    {L"0000040B", L"Finnish", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_FR_CA
-    {L"00000C0C", L"1252", L"850", L"10000", L"French (Canada)", L"39", frFRPages, frFRErrorEntries, frFRStrings, LatinFonts, frCALayouts },
+    {L"00000C0C", L"French (Canada)", frFRPages, frFRErrorEntries, frFRStrings},
 #endif
 #ifdef LANGUAGE_FR_FR
-    {L"0000040C", L"1252", L"850", L"10000", L"French (France)", L"84", frFRPages, frFRErrorEntries, frFRStrings, LatinFonts, frFRLayouts },
+    {L"0000040C", L"French (France)", frFRPages, frFRErrorEntries, frFRStrings},
 #endif
 #ifdef LANGUAGE_FR_BE
-    {L"0000080C", L"1252", L"850", L"10000", L"French (Belgium)", L"21", frFRPages, frFRErrorEntries, frFRStrings, LatinFonts, frBELayouts },
+    {L"0000080C", L"French (Belgium)", frFRPages, frFRErrorEntries, frFRStrings},
 #endif
 #ifdef LANGUAGE_FR_CH
-    {L"0000100C", L"1252", L"850", L"10000", L"French (Switzerland)", L"223", frFRPages, frFRErrorEntries, frFRStrings, LatinFonts, frCHLayouts },
+    {L"0000100C", L"French (Switzerland)", frFRPages, frFRErrorEntries, frFRStrings},
 #endif
 #ifdef LANGUAGE_FR_LU
-    {L"0000140C", L"1252", L"850", L"10000", L"French (Luxembourg)", L"147", frFRPages, frFRErrorEntries, frFRStrings, LatinFonts, frLULayouts },
+    {L"0000140C", L"French (Luxembourg)", frFRPages, frFRErrorEntries, frFRStrings},
 #endif
 #ifdef LANGUAGE_FR_MC
-    {L"0000180C", L"1252", L"850", L"10000", L"French (Monaco)", L"158", frFRPages, frFRErrorEntries, frFRStrings, LatinFonts, frMCLayouts },
+    {L"0000180C", L"French (Monaco)", frFRPages, frFRErrorEntries, frFRStrings},
 #endif
 #ifdef LANGUAGE_GL_ES
-    {L"00000456", L"1252", L"850", L"10000", L"Galician (Spain)", L"217", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, glESLayouts },
+    {L"00000456", L"Galician (Spain)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_KA_GE
-    {L"00000437", L"0", L"1", L"2", L"Georgian", L"88", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, kaGELayouts },
+    {L"00000437", L"Georgian", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_DE_DE
-    {L"00000407", L"1252", L"850", L"10000", L"German (Germany)", L"94", deDEPages, deDEErrorEntries, deDEStrings, LatinFonts, deDELayouts },
+    {L"00000407", L"German (Germany)", deDEPages, deDEErrorEntries, deDEStrings},
 #endif
 #ifdef LANGUAGE_DE_CH
-    {L"00000807", L"1252", L"850", L"10000", L"German (Switzerland)", L"223", deDEPages, deDEErrorEntries, deDEStrings, LatinFonts, deCHLayouts },
+    {L"00000807", L"German (Switzerland)", deDEPages, deDEErrorEntries, deDEStrings},
 #endif
 #ifdef LANGUAGE_DE_AT
-    {L"00000C07", L"1252", L"850", L"10000", L"German (Austria)", L"14", deDEPages, deDEErrorEntries, deDEStrings, LatinFonts, deATLayouts },
+    {L"00000C07", L"German (Austria)", deDEPages, deDEErrorEntries, deDEStrings},
 #endif
 #ifdef LANGUAGE_DE_LU
-    {L"00001007", L"1252", L"850", L"10000", L"German (Luxembourg)", L"147", deDEPages, deDEErrorEntries, deDEStrings, LatinFonts, deLULayouts },
+    {L"00001007", L"German (Luxembourg)", deDEPages, deDEErrorEntries, deDEStrings},
 #endif
 #ifdef LANGUAGE_DE_LI
-    {L"00001407", L"1252", L"850", L"10000", L"German (Liechtenstein)", L"145", deDEPages, deDEErrorEntries, deDEStrings, LatinFonts, deLILayouts },
+    {L"00001407", L"German (Liechtenstein)", deDEPages, deDEErrorEntries, deDEStrings},
 #endif
 #ifdef LANGUAGE_EL_GR
-    {L"00000408", L"1253", L"737", L"10006", L"Greek", L"98", elGRPages, elGRErrorEntries, elGRStrings, GreekFonts, elGRLayouts },
+    {L"00000408", L"Greek", elGRPages, elGRErrorEntries, elGRStrings},
 #endif
 #ifdef LANGUAGE_GU_IN
-    {L"00000447", L"0", L"1", L"2", L"Gujarati (India)", L"113", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, guINLayouts },
+    {L"00000447", L"Gujarati (India)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_HE_IL
-    {L"0000040D", L"1255", L"862", L"10005", L"Hebrew", L"117", heILPages, heILErrorEntries, heILStrings, HebrewFonts, heILLayouts },
+    {L"0000040D", L"Hebrew", heILPages, heILErrorEntries, heILStrings},
 #endif
 #ifdef LANGUAGE_HI_IN
-    {L"00000439", L"1252", L"437", L"10000", L"Hindi", L"113", enUSPages, enUSErrorEntries, enUSStrings, HindiFonts, hiINLayouts },
+    {L"00000439", L"Hindi", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_HU_HU
-    {L"0000040E", L"1250", L"852", L"10029", L"Hungarian", L"109", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, huHULayouts },
+    {L"0000040E", L"Hungarian", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_IS_IS
-    {L"0000040F", L"1252", L"850", L"10079", L"Icelandic", L"110", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, isISLayouts },
+    {L"0000040F", L"Icelandic", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_ID_ID
-    {L"00000421", L"1252", L"850", L"10079", L"Indonesian", L"111", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, idIDLayouts },
+    {L"00000421", L"Indonesian", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_IT_IT
-    {L"00000410", L"1252", L"850", L"10000", L"Italian (Italy)", L"118", itITPages, itITErrorEntries, itITStrings, LatinFonts, itITLayouts },
+    {L"00000410", L"Italian (Italy)", itITPages, itITErrorEntries, itITStrings},
 #endif
 #ifdef LANGUAGE_IT_CH
-    {L"00000810", L"1252", L"850", L"10000", L"Italian (Switzerland)", L"223", itITPages, itITErrorEntries, itITStrings, LatinFonts, itCHLayouts },
+    {L"00000810", L"Italian (Switzerland)", itITPages, itITErrorEntries, itITStrings},
 #endif
 #ifdef LANGUAGE_JA_JP
-    {L"00000411", L"932", L"932", L"10001", L"Japanese", L"122", jaJPPages, jaJPErrorEntries, jaJPStrings, JapaneseFonts, jaJPLayouts },
+    {L"00000411", L"Japanese", jaJPPages, jaJPErrorEntries, jaJPStrings},
 #endif
 #ifdef LANGUAGE_KN_IN
-    {L"0000044B", L"1252", L"437", L"10079", L"Kannada (India)", L"113", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, knINLayouts },
+    {L"0000044B", L"Kannada (India)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_KK_KZ
-    {L"0000043F", L"1251", L"866", L"10007", L"Kazakh", L"137", enUSPages, enUSErrorEntries, enUSStrings, CyrillicFonts, kkKZLayouts },
+    {L"0000043F", L"Kazakh", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_KOK_IN
-    {L"00000457", L"0", L"437", L"2", L"Konkani", L"113", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, kokINLayouts},
+    {L"00000457", L"Konkani", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_KO_KR
-    {L"00000412", L"949", L"949", L"10003", L"Korean", L"134", enUSPages, enUSErrorEntries, enUSStrings, KoreanFonts, koKRLayouts },
+    {L"00000412", L"Korean", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_KY_KG
-    {L"00000440", L"1251", L"866", L"10007", L"Kyrgyz (Kyrgyzstan)", L"130", enUSPages, enUSErrorEntries, enUSStrings, CyrillicFonts, kyKGLayouts },
+    {L"00000440", L"Kyrgyz (Kyrgyzstan)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_LV_LV
-    {L"00000426", L"1257", L"775", L"10029", L"Latvian", L"140", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, lvLVLayouts },
+    {L"00000426", L"Latvian", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_LT_LT
-    {L"00000427", L"1257", L"775", L"10029", L"Lithuanian", L"141", ltLTPages, ltLTErrorEntries, ltLTStrings, LatinFonts, ltLTLayouts },
+    {L"00000427", L"Lithuanian", ltLTPages, ltLTErrorEntries, ltLTStrings},
 #endif
 #ifdef LANGUAGE_MK_MK
-    {L"0000042F", L"1251", L"866", L"10007", L"FYRO Macedonian", L"19618", enUSPages, enUSErrorEntries, enUSStrings, CyrillicFonts, mkMKLayouts },
+    {L"0000042F", L"FYRO Macedonian", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_MS_BN
-    {L"0000083E", L"1252", L"850", L"10000", L"Malay (Brunei Darussalam)", L"37", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, msBNLayouts },
+    {L"0000083E", L"Malay (Brunei Darussalam)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_MS_MY
-    {L"0000043E", L"1252", L"850", L"10000", L"Malay (Malaysia)", L"167", msMYPages, msMYErrorEntries, msMYStrings, LatinFonts, msMYLayouts },
+    {L"0000043E", L"Malay (Malaysia)", msMYPages, msMYErrorEntries, msMYStrings},
 #endif
 #ifdef LANGUAGE_MR_IN
-    {L"0000044E", L"0", L"1", L"2", L"Marathi", L"113", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, mrINLayouts },
+    {L"0000044E", L"Marathi", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_MN_MN
-    {L"00000450", L"1251", L"866", L"10007", L"Mongolian (Mongolia)", L"154", enUSPages, enUSErrorEntries, enUSStrings, CyrillicFonts, mnMNLayouts },
+    {L"00000450", L"Mongolian (Mongolia)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_NB_NO
-    {L"00000414", L"1252", L"850", L"10000", L"Norwegian (Bokmal)", L"177", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, nbNOLayouts },
+    {L"00000414", L"Norwegian (Bokmal)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_NN_NO
-    {L"00000814", L"1252", L"850", L"10000", L"Norwegian (Nynorsk)", L"177", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, nnNOLayouts },
+    {L"00000814", L"Norwegian (Nynorsk)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_PL_PL
-    {L"00000415", L"1250", L"852", L"10029", L"Polish", L"191", plPLPages, plPLErrorEntries, plPLStrings, LatinFonts, plPLLayouts },
+    {L"00000415", L"Polish", plPLPages, plPLErrorEntries, plPLStrings},
 #endif
 #ifdef LANGUAGE_PT_PT
-    {L"00000816", L"1252", L"850", L"10000", L"Portuguese (Portugal)", L"193", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, ptPTLayouts },
+    {L"00000816", L"Portuguese (Portugal)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_PT_BR
-    {L"00000416", L"1252", L"850", L"10000", L"Portuguese (Brazil)", L"32", ptBRPages, ptBRErrorEntries, ptBRStrings, LatinFonts, ptBRLayouts },
+    {L"00000416", L"Portuguese (Brazil)", ptBRPages, ptBRErrorEntries, ptBRStrings},
 #endif
 #ifdef LANGUAGE_PA_IN
-    {L"00000446", L"0", L"1", L"2", L"Punjabi (India)", L"113", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, paINLayouts },
+    {L"00000446", L"Punjabi (India)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_RO_RO
-    {L"00000418", L"28606", L"28606", L"10029", L"Romanian", L"200", roROPages, roROErrorEntries, roROStrings, LatinFonts, roROLayouts },
+    {L"00000418", L"Romanian", roROPages, roROErrorEntries, roROStrings},
 #endif
 #ifdef LANGUAGE_RM_CH
-    {L"00000417", L"1252", L"850", L"10000", L"Romansh", L"223", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, rmCHLayouts },
+    {L"00000417", L"Romansh", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_RU_RU
-    {L"00000419", L"1251", L"866", L"10007", L"Russian", L"203", ruRUPages, ruRUErrorEntries, ruRUStrings, CyrillicFonts, ruRULayouts },
+    {L"00000419", L"Russian", ruRUPages, ruRUErrorEntries, ruRUStrings},
 #endif
 #ifdef LANGUAGE_SA_IN
-    {L"0000044F", L"0", L"1", L"2", L"Sanskrit", L"113", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, saINLayouts },
+    {L"0000044F", L"Sanskrit", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_SR_SP
-    {L"00000C1A", L"1251", L"855", L"10007", L"Serbian (Cyrillic)", L"271", enUSPages, enUSErrorEntries, enUSStrings, CyrillicFonts, srSPLayouts },
+    {L"00000C1A", L"Serbian (Cyrillic)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_SR_SP
-    {L"0000081A", L"1250", L"852", L"10029", L"Serbian (Latin)", L"271", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, srSPLayouts },
+    {L"0000081A", L"Serbian (Latin)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_SK_SK
-    {L"0000041B", L"1250", L"852", L"10029", L"Slovak", L"143", skSKPages, skSKErrorEntries, skSKStrings, LatinFonts, skSKLayouts },
+    {L"0000041B", L"Slovak", skSKPages, skSKErrorEntries, skSKStrings},
 #endif
 #ifdef LANGUAGE_SL_SI
-    {L"00000424", L"1250", L"852", L"10029", L"Slovenian", L"212", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, slSILayouts },
+    {L"00000424", L"Slovenian", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_ES_ES
-    {L"0000040A", L"1252", L"850", L"10000", L"Spanish (Traditional Sort)", L"217", esESPages, esESErrorEntries, esESStrings, LatinFonts, esESLayouts },
+    {L"0000040A", L"Spanish (Traditional Sort)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_MX
-    {L"0000080A", L"1252", L"850", L"10000", L"Spanish (Mexico)", L"166", esESPages, esESErrorEntries, esESStrings, LatinFonts, esMXLayouts },
+    {L"0000080A", L"Spanish (Mexico)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_ES
-    {L"00000C0A", L"1252", L"850", L"10000", L"Spanish (International Sort)", L"217", esESPages, esESErrorEntries, esESStrings, LatinFonts, esESLayouts },
+    {L"00000C0A", L"Spanish (International Sort)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_GT
-    {L"0000100A", L"1252", L"850", L"10000", L"Spanish (Guatemala)", L"99", esESPages, esESErrorEntries, esESStrings, LatinFonts, esGTLayouts },
+    {L"0000100A", L"Spanish (Guatemala)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_CR
-    {L"0000140A", L"1252", L"850", L"10000", L"Spanish (Costa Rica)", L"54", esESPages, esESErrorEntries, esESStrings, LatinFonts, esCRLayouts },
+    {L"0000140A", L"Spanish (Costa Rica)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_PA
-    {L"0000180A", L"1252", L"850", L"10000", L"Spanish (Panama)", L"192", esESPages, esESErrorEntries, esESStrings, LatinFonts, esPALayouts },
+    {L"0000180A", L"Spanish (Panama)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_DO
-    {L"00001C0A", L"1252", L"850", L"10000", L"Spanish (Dominican Republic)", L"65", esESPages, esESErrorEntries, esESStrings, LatinFonts, esDOLayouts },
+    {L"00001C0A", L"Spanish (Dominican Republic)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_VE
-    {L"0000200A", L"1252", L"850", L"10000", L"Spanish (Venezuela)", L"249", esESPages, esESErrorEntries, esESStrings, LatinFonts, esVELayouts },
+    {L"0000200A", L"Spanish (Venezuela)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_CO
-    {L"0000240A", L"1252", L"850", L"10000", L"Spanish (Colombia)", L"51", esESPages, esESErrorEntries, esESStrings, LatinFonts, esCOLayouts },
+    {L"0000240A", L"Spanish (Colombia)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_PE
-    {L"0000280A", L"1252", L"850", L"10000", L"Spanish (Peru)", L"187", esESPages, esESErrorEntries, esESStrings, LatinFonts, esPELayouts },
+    {L"0000280A", L"Spanish (Peru)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_AR
-    {L"00002C0A", L"1252", L"850", L"10000", L"Spanish (Argentina)", L"11", esESPages, esESErrorEntries, esESStrings, LatinFonts, esARLayouts },
+    {L"00002C0A", L"Spanish (Argentina)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_EC
-    {L"0000300A", L"1252", L"850", L"10000", L"Spanish (Ecuador)", L"66", esESPages, esESErrorEntries, esESStrings, LatinFonts, esECLayouts },
+    {L"0000300A", L"Spanish (Ecuador)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_CL
-    {L"0000340A", L"1252", L"850", L"10000", L"Spanish (Chile)", L"46", esESPages, esESErrorEntries, esESStrings, LatinFonts, esCLLayouts },
+    {L"0000340A", L"Spanish (Chile)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_UY
-    {L"0000380A", L"1252", L"850", L"10000", L"Spanish (Uruguay)", L"246", esESPages, esESErrorEntries, esESStrings, LatinFonts, esUYLayouts },
+    {L"0000380A", L"Spanish (Uruguay)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_PY
-    {L"00003C0A", L"1252", L"850", L"10000", L"Spanish (Paraguay)", L"185", esESPages, esESErrorEntries, esESStrings, LatinFonts, esPYLayouts },
+    {L"00003C0A", L"Spanish (Paraguay)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_BO
-    {L"0000400A", L"1252", L"850", L"10000", L"Spanish (Bolivia)", L"26", esESPages, esESErrorEntries, esESStrings, LatinFonts, esBOLayouts },
+    {L"0000400A", L"Spanish (Bolivia)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_SV
-    {L"0000440A", L"1252", L"850", L"10000", L"Spanish (El Salvador)", L"72", esESPages, esESErrorEntries, esESStrings, LatinFonts, esSVLayouts },
+    {L"0000440A", L"Spanish (El Salvador)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_HN
-    {L"0000480A", L"1252", L"850", L"10000", L"Spanish (Honduras)", L"106", esESPages, esESErrorEntries, esESStrings, LatinFonts, esHNLayouts },
+    {L"0000480A", L"Spanish (Honduras)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_NI
-    {L"00004C0A", L"1252", L"850", L"10000", L"Spanish (Nicaragua)", L"182", esESPages, esESErrorEntries, esESStrings, LatinFonts, esNILayouts },
+    {L"00004C0A", L"Spanish (Nicaragua)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_ES_PR
-    {L"0000500A", L"1252", L"850", L"10000", L"Spanish (Puerto Rico)", L"202", esESPages, esESErrorEntries, esESStrings, LatinFonts, esPRLayouts },
+    {L"0000500A", L"Spanish (Puerto Rico)", esESPages, esESErrorEntries, esESStrings},
 #endif
 #ifdef LANGUAGE_SW_KE
-    {L"00000441", L"1252", L"437", L"10000", L"Swahili", L"129", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, swKELayouts },
+    {L"00000441", L"Swahili", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_SV_SE
-    {L"0000041D", L"1252", L"850", L"10000", L"Swedish", L"221", svSEPages, svSEErrorEntries, svSEStrings, LatinFonts, svSELayouts },
+    {L"0000041D", L"Swedish", svSEPages, svSEErrorEntries, svSEStrings},
 #endif
 #ifdef LANGUAGE_SV_FI
-    {L"0000081D", L"1252", L"850", L"10000", L"Swedish (Finland)", L"77", svSEPages, svSEErrorEntries, svSEStrings, LatinFonts, svFILayouts },
+    {L"0000081D", L"Swedish (Finland)", svSEPages, svSEErrorEntries, svSEStrings},
 #endif
 #ifdef LANGUAGE_SYR_SY
-    {L"0000045A", L"0", L"1", L"2", L"Syriac (Syria)", L"222", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, syrSYLayouts},
+    {L"0000045A", L"Syriac (Syria)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_TA_IN
-    {L"00000449", L"0", L"1", L"2", L"Tamil", L"113", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, taINLayouts },
+    {L"00000449", L"Tamil", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_TT_TA
-    {L"00000444", L"1251", L"866", L"10007", L"Tatar", L"1", enUSPages, enUSErrorEntries, enUSStrings, CyrillicFonts, ttTALayouts },
+    {L"00000444", L"Tatar", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_TE_IN
-    {L"0000044A", L"0", L"1", L"2", L"Telugu (India)", L"113", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, teINLayouts },
+    {L"0000044A", L"Telugu (India)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_TH_TH
-    {L"0000041E", L"874", L"874", L"10021", L"Thai", L"227", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, thTHLayouts },
+    {L"0000041E", L"Thai", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_TR_TR
-    {L"0000041F", L"1254", L"857", L"10081", L"Turkish", L"235", trTRPages, trTRErrorEntries, trTRStrings, LatinFonts, trTRLayouts },
+    {L"0000041F", L"Turkish", trTRPages, trTRErrorEntries, trTRStrings},
 #endif
 #ifdef LANGUAGE_UK_UA
-    {L"00000422", L"1251", L"866", L"10017", L"Ukrainian", L"241", ukUAPages, ukUAErrorEntries, ukUAStrings, CyrillicFonts, ukUALayouts },
+    {L"00000422", L"Ukrainian", ukUAPages, ukUAErrorEntries, ukUAStrings},
 #endif
 #ifdef LANGUAGE_UR_PK
-    {L"00000420", L"1256", L"720", L"10004", L"Urdu", L"190", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, urPKLayouts },
+    {L"00000420", L"Urdu", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_UZ_UZ
-    {L"00000443", L"1254", L"857", L"10029", L"Uzbek (Latin)", L"247", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, uzUZLayouts },
+    {L"00000443", L"Uzbek (Latin)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_UZ_UZ
-    {L"00000843", L"1251", L"866", L"10007", L"Uzbek (Cyrillic)", L"247", enUSPages, enUSErrorEntries, enUSStrings, CyrillicFonts, uzUZLayouts },
+    {L"00000843", L"Uzbek (Cyrillic)", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_VI_VN
-    {L"0000042A", L"1258", L"1258",L"10000", L"Vietnamese", L"251", enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts, viVNLayouts },
+    {L"0000042A", L"Vietnamese", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_WA_BE
-    {L"00000490", L"1252", L"850", L"10000", L"Walon", L"21", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, waBELayouts },
+    {L"00000490", L"Walon", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
 #ifdef LANGUAGE_ZU_ZU
-    {L"00000435", L"1252", L"850", L"10000", L"Zulu", L"1", enUSPages, enUSErrorEntries, enUSStrings, LatinFonts, zuZULayouts },
+    {L"00000435", L"Zulu", enUSPages, enUSErrorEntries, enUSStrings},
 #endif
-    {NULL, NULL, NULL, NULL, NULL, NULL}
+    {NULL, NULL, NULL, NULL, NULL}
 };
diff --git a/base/setup/usetup/settings.c b/base/setup/usetup/settings.c
deleted file mode 100644 (file)
index 6bcec11..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- *  ReactOS kernel
- *  Copyright (C) 2004 ReactOS Team
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-/* COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS text-mode setup
- * FILE:            base/setup/usetup/settings.c
- * PURPOSE:         Device settings support functions
- * PROGRAMMERS:     Colin Finck
- */
-
-/* INCLUDES *****************************************************************/
-
-#include "usetup.h"
-
-#define NDEBUG
-#include <debug.h>
-
-/* GLOBALS ******************************************************************/
-
-ULONG DefaultLanguageIndex = 0;
-
-/* FUNCTIONS ****************************************************************/
-
-ULONG
-GetDefaultLanguageIndex(VOID)
-{
-    return DefaultLanguageIndex;
-}
-
-typedef struct _LANG_ENTRY_PARAM
-{
-    ULONG uIndex;
-    PWCHAR DefaultLanguage;
-} LANG_ENTRY_PARAM, *PLANG_ENTRY_PARAM;
-
-static UCHAR
-NTAPI
-ProcessLangEntry(
-    IN PWCHAR KeyName,
-    IN PWCHAR KeyValue,
-    IN PCHAR DisplayText,
-    IN SIZE_T DisplayTextSize,
-    OUT PVOID* UserData,
-    OUT PBOOLEAN Current,
-    IN PVOID Parameter OPTIONAL)
-{
-    PLANG_ENTRY_PARAM LangEntryParam = (PLANG_ENTRY_PARAM)Parameter;
-
-    if (!IsLanguageAvailable(KeyName))
-    {
-        /* The specified language is unavailable, skip the entry */
-        return 2;
-    }
-
-    *UserData = RtlAllocateHeap(ProcessHeap, 0,
-                                (wcslen(KeyName) + 1) * sizeof(WCHAR));
-    if (*UserData == NULL)
-    {
-        /* Failure, stop enumeration */
-        DPRINT1("RtlAllocateHeap() failed\n");
-        return 0;
-    }
-
-    wcscpy((PWCHAR)*UserData, KeyName);
-    sprintf(DisplayText, "%S", KeyValue);
-
-    *Current = FALSE;
-
-    if (!_wcsicmp(KeyName, LangEntryParam->DefaultLanguage))
-        DefaultLanguageIndex = LangEntryParam->uIndex;
-
-    LangEntryParam->uIndex++;
-
-    /* Add the entry */
-    return 1;
-}
-
-PGENERIC_LIST
-CreateLanguageList(
-    HINF InfFile,
-    WCHAR *DefaultLanguage)
-{
-    PGENERIC_LIST List;
-    INFCONTEXT Context;
-    PWCHAR KeyValue;
-
-    LANG_ENTRY_PARAM LangEntryParam;
-
-    LangEntryParam.uIndex = 0;
-    LangEntryParam.DefaultLanguage = DefaultLanguage;
-
-    /* Get default language id */
-    if (!SetupFindFirstLineW(InfFile, L"NLS", L"DefaultLanguage", &Context))
-        return NULL;
-
-    if (!INF_GetData(&Context, NULL, &KeyValue))
-        return NULL;
-
-    wcscpy(DefaultLanguage, KeyValue);
-    SelectedLanguageId = KeyValue;
-
-    List = CreateGenericList();
-    if (List == NULL)
-        return NULL;
-
-    if (AddEntriesFromInfSection(List,
-                                 InfFile,
-                                 L"Language",
-                                 &Context,
-                                 ProcessLangEntry,
-                                 &LangEntryParam) == -1)
-    {
-        DestroyGenericList(List, TRUE);
-        return NULL;
-    }
-
-    /* Only one language available, make it the default one */
-    if (LangEntryParam.uIndex == 1)
-    {
-        DefaultLanguageIndex = 0;
-        wcscpy(DefaultLanguage,
-               (PWSTR)GetListEntryUserData(GetFirstListEntry(List)));
-    }
-
-    return List;
-}
-
-
-PGENERIC_LIST
-CreateKeyboardLayoutList(
-    HINF InfFile,
-    WCHAR *DefaultKBLayout)
-{
-    PGENERIC_LIST List;
-    INFCONTEXT Context;
-    PWCHAR KeyValue;
-    const MUI_LAYOUTS * LayoutsList;
-    ULONG uIndex = 0;
-
-    /* Get default layout id */
-    if (!SetupFindFirstLineW(InfFile, L"NLS", L"DefaultLayout", &Context))
-        return NULL;
-
-    if (!INF_GetData(&Context, NULL, &KeyValue))
-        return NULL;
-
-    wcscpy(DefaultKBLayout, KeyValue);
-
-    List = CreateGenericList();
-    if (List == NULL)
-        return NULL;
-
-    LayoutsList = MUIGetLayoutsList();
-
-    do
-    {
-        // NOTE: See https://svn.reactos.org/svn/reactos?view=revision&revision=68354
-        if (AddEntriesFromInfSection(List,
-                                     InfFile,
-                                     L"KeyboardLayout",
-                                     &Context,
-                                     DefaultProcessEntry,
-                                     DefaultKBLayout) == -1)
-        {
-            DestroyGenericList(List, TRUE);
-            return NULL;
-        }
-
-        uIndex++;
-
-    } while (LayoutsList[uIndex].LangID != NULL);
-
-    /* Check whether some keyboard layouts have been found */
-    /* FIXME: Handle this case */
-    if (GetNumberOfListEntries(List) == 0)
-    {
-        DPRINT1("No keyboard layouts have been found\n");
-        DestroyGenericList(List, TRUE);
-        return NULL;
-    }
-
-    return List;
-}
-
-
-BOOLEAN
-ProcessKeyboardLayoutRegistry(
-    PGENERIC_LIST List)
-{
-    PGENERIC_LIST_ENTRY Entry;
-    PWCHAR LayoutId;
-    const MUI_LAYOUTS * LayoutsList;
-    MUI_LAYOUTS NewLayoutsList[20];
-    ULONG uIndex;
-    ULONG uOldPos = 0;
-
-    Entry = GetCurrentListEntry(List);
-    if (Entry == NULL)
-        return FALSE;
-
-    LayoutId = (PWCHAR)GetListEntryUserData(Entry);
-    if (LayoutId == NULL)
-        return FALSE;
-
-    LayoutsList = MUIGetLayoutsList();
-
-    if (_wcsicmp(LayoutsList[0].LayoutID, LayoutId) != 0)
-    {
-        for (uIndex = 1; LayoutsList[uIndex].LangID != NULL; uIndex++)
-        {
-            if (_wcsicmp(LayoutsList[uIndex].LayoutID, LayoutId) == 0)
-            {
-                uOldPos = uIndex;
-                continue;
-            }
-
-            NewLayoutsList[uIndex].LangID   = LayoutsList[uIndex].LangID;
-            NewLayoutsList[uIndex].LayoutID = LayoutsList[uIndex].LayoutID;
-        }
-
-        NewLayoutsList[uIndex].LangID    = NULL;
-        NewLayoutsList[uIndex].LayoutID  = NULL;
-        NewLayoutsList[uOldPos].LangID   = LayoutsList[0].LangID;
-        NewLayoutsList[uOldPos].LayoutID = LayoutsList[0].LayoutID;
-        NewLayoutsList[0].LangID         = LayoutsList[uOldPos].LangID;
-        NewLayoutsList[0].LayoutID       = LayoutsList[uOldPos].LayoutID;
-
-        return AddKbLayoutsToRegistry(NewLayoutsList);
-    }
-
-    return TRUE;
-}
-
-#if 0
-BOOLEAN
-ProcessKeyboardLayoutFiles(
-    PGENERIC_LIST List)
-{
-    return TRUE;
-}
-#endif
-
-/* EOF */
diff --git a/base/setup/usetup/settings.h b/base/setup/usetup/settings.h
deleted file mode 100644 (file)
index a320560..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  ReactOS kernel
- *  Copyright (C) 2004 ReactOS Team
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-/*
- * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS text-mode setup
- * FILE:            base/setup/usetup/settings.h
- * PURPOSE:         Device settings support functions
- * PROGRAMMERS:     Colin Finck
- */
-
-#pragma once
-
-PGENERIC_LIST
-CreateKeyboardLayoutList(
-    HINF InfFile,
-    WCHAR *DefaultKBLayout);
-
-PGENERIC_LIST
-CreateLanguageList(
-    HINF InfFile,
-    WCHAR *DefaultLanguage);
-
-ULONG
-GetDefaultLanguageIndex(VOID);
-
-BOOLEAN
-ProcessKeyboardLayoutRegistry(
-    PGENERIC_LIST List);
-
-BOOLEAN
-ProcessKeyboardLayoutFiles(
-    PGENERIC_LIST List);
-
-/* EOF */
index 4e20095..88142de 100644 (file)
@@ -32,7 +32,6 @@
 #include "chkdsk.h"
 #include "cmdcons.h"
 #include "format.h"
-#include "settings.h"
 
 #define NDEBUG
 #include <debug.h>
@@ -404,13 +403,13 @@ static VOID
 UpdateKBLayout(VOID)
 {
     PGENERIC_LIST_ENTRY ListEntry;
-    LPCWSTR pszNewLayout;
+    PCWSTR pszNewLayout;
 
-    pszNewLayout = MUIDefaultKeyboardLayout();
+    pszNewLayout = MUIDefaultKeyboardLayout(SelectedLanguageId);
 
     if (LayoutList == NULL)
     {
-        LayoutList = CreateKeyboardLayoutList(SetupInf, DefaultKBLayout);
+        LayoutList = CreateKeyboardLayoutList(SetupInf, SelectedLanguageId, DefaultKBLayout);
         if (LayoutList == NULL)
         {
             /* FIXME: Handle error! */
@@ -467,9 +466,10 @@ LanguagePage(PINPUT_RECORD Ir)
         }
     }
 
-    /* Load the font */
-    USetupData.LanguageId = 0;
     SelectedLanguageId = DefaultLanguage;
+    USetupData.LanguageId = 0;
+
+    /* Load the font */
     SetConsoleCodePage();
     UpdateKBLayout();
 
@@ -555,7 +555,7 @@ LanguagePage(PINPUT_RECORD Ir)
         {
             NewLanguageId = (PWCHAR)GetListEntryUserData(GetCurrentListEntry(LanguageList));
 
-            if (SelectedLanguageId != NewLanguageId)
+            if (wcscmp(SelectedLanguageId, NewLanguageId))
             {
                 /* Clear the language page */
                 MUIClearPage(LANGUAGE_PAGE);
@@ -646,13 +646,16 @@ SetupStartPage(PINPUT_RECORD Ir)
         ComputerList = CreateComputerTypeList(SetupInf);
         DisplayList = CreateDisplayDriverList(SetupInf);
         KeyboardList = CreateKeyboardDriverList(SetupInf);
-        LayoutList = CreateKeyboardLayoutList(SetupInf, DefaultKBLayout);
+
         LanguageList = CreateLanguageList(SetupInf, DefaultLanguage);
 
         /* new part */
+        SelectedLanguageId = DefaultLanguage;
         wcscpy(SelectedLanguageId, USetupData.LocaleID);
         USetupData.LanguageId = (LANGID)(wcstol(SelectedLanguageId, NULL, 16) & 0xFFFF);
 
+        LayoutList = CreateKeyboardLayoutList(SetupInf, SelectedLanguageId, DefaultKBLayout);
+
         /* first we hack LanguageList */
         ListEntry = GetFirstListEntry(LanguageList);
         while (ListEntry != NULL)
@@ -1127,7 +1130,7 @@ DeviceSettingsPage(PINPUT_RECORD Ir)
     /* Initialize the keyboard layout list */
     if (LayoutList == NULL)
     {
-        LayoutList = CreateKeyboardLayoutList(SetupInf, DefaultKBLayout);
+        LayoutList = CreateKeyboardLayoutList(SetupInf, SelectedLanguageId, DefaultKBLayout);
         if (LayoutList == NULL)
         {
             /* FIXME: report error */
@@ -4211,14 +4214,14 @@ DoUpdate:
 
         /* Add keyboard layouts */
         CONSOLE_SetStatusText(MUIGetString(STRING_ADDKBLAYOUTS));
-        if (!AddKeyboardLayouts())
+        if (!AddKeyboardLayouts(SelectedLanguageId))
         {
             MUIDisplayError(ERROR_ADDING_KBLAYOUTS, Ir, POPUP_WAIT_ENTER);
             goto Cleanup;
         }
 
         /* Set GeoID */
-        if (!SetGeoID(MUIGetGeoID()))
+        if (!SetGeoID(MUIGetGeoID(SelectedLanguageId)))
         {
             MUIDisplayError(ERROR_UPDATE_GEOID, Ir, POPUP_WAIT_ENTER);
             goto Cleanup;
@@ -4228,7 +4231,7 @@ DoUpdate:
         {
             /* Update keyboard layout settings */
             CONSOLE_SetStatusText(MUIGetString(STRING_KEYBOARDSETTINGSUPDATE));
-            if (!ProcessKeyboardLayoutRegistry(LayoutList))
+            if (!ProcessKeyboardLayoutRegistry(LayoutList, SelectedLanguageId))
             {
                 MUIDisplayError(ERROR_UPDATE_KBSETTINGS, Ir, POPUP_WAIT_ENTER);
                 goto Cleanup;
@@ -4237,7 +4240,7 @@ DoUpdate:
 
         /* Add codepage information to registry */
         CONSOLE_SetStatusText(MUIGetString(STRING_CODEPAGEINFOUPDATE));
-        if (!AddCodePage())
+        if (!AddCodePage(SelectedLanguageId))
         {
             MUIDisplayError(ERROR_ADDING_CODEPAGE, Ir, POPUP_WAIT_ENTER);
             goto Cleanup;
index 2134fcd..2bbb879 100644 (file)
@@ -123,4 +123,10 @@ typedef enum _PAGE_NUMBER
 #define POPUP_WAIT_ANY_KEY 1
 #define POPUP_WAIT_ENTER   2
 
+VOID
+PopupError(IN PCCH Text,
+           IN PCCH Status,
+           IN PINPUT_RECORD Ir,
+           IN ULONG WaitEvent);
+
 #endif /* _USETUP_PCH_ */
index 1de3246..a4b1736 100644 (file)
@@ -14,7 +14,7 @@ typedef struct
     PWCHAR SubFontName;
 } MUI_SUBFONT;
 
-#include "../../../base/setup/usetup/muifonts.h"
+#include "../../../base/setup/lib/muifonts.h"
 
 BOOL UpdateRegistryForFontSubstitutes(MUI_SUBFONT *pSubstitutes)
 {