mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Installer: Reset to English instead of Arabic with an invalid language ID
This commit is contained in:
parent
d087a7db42
commit
1940b7f97c
@ -101,12 +101,14 @@ for /f "tokens=1,2,3 delims=," %%a in (..\Language\List) do (
|
||||
> "..\Language\Language.rc" echo #include "%%a.h"
|
||||
>>"..\Language\Language.rc" echo #include "Resource.rc"
|
||||
>>".\Installer\Languages.nsh" echo ${IncludeLanguage} "%%b" "%%a"
|
||||
set LANGUAGES='%%a - ${LANGFILE_%%b_NAME}' '${LANG_%%b}' '${LANG_%%b_CP}' !LANGUAGES!
|
||||
set LANGDLL_PARAMS='%%a - ${LANGFILE_%%b_NAME}' '${LANG_%%b}' '${LANG_%%b_CP}' !LANGDLL_PARAMS!
|
||||
set LANGUAGE_IDS=${LANG_%%b},!LANGUAGE_IDS!
|
||||
|
||||
%MSBUILD% /t:Language /p:Configuration=Release;Platform=Win32;TargetName=%%c /v:q ..\Rainmeter.sln > "BuildLog.txt"
|
||||
if not %ERRORLEVEL% == 0 echo ERROR: Building language %%a failed & goto END
|
||||
)
|
||||
>>".\Installer\Languages.nsh" echo ^^!define LANGUAGES "%LANGUAGES%"
|
||||
>>".\Installer\Languages.nsh" echo ^^!define LANGDLL_PARAMS "%LANGDLL_PARAMS%"
|
||||
>>".\Installer\Languages.nsh" echo ^^!define LANGUAGE_IDS "%LANGUAGE_IDS%"
|
||||
|
||||
:: Restore English
|
||||
echo #include "English.h"> "..\Language\Language.rc"
|
||||
|
@ -138,7 +138,7 @@ Function .onInit
|
||||
${OrIf} $0 <> $LANGUAGE
|
||||
${AndIf} $NonDefaultLanguage != 1
|
||||
; New install or better match
|
||||
LangDLL::LangDialog "$(^SetupCaption)" "Please select the installer language.$\n$(SELECTLANGUAGE)" AC ${LANGUAGES} ""
|
||||
LangDLL::LangDialog "$(^SetupCaption)" "Please select the installer language.$\n$(SELECTLANGUAGE)" AC ${LANGDLL_PARAMS} ""
|
||||
Pop $0
|
||||
${If} $0 == "cancel"
|
||||
Abort
|
||||
@ -207,6 +207,12 @@ Function .onInit
|
||||
Quit
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
|
||||
; If the language was set to a non-existent language, reset it back to English.
|
||||
${WordFind} ",${LANGUAGE_IDS}" ",$LANGUAGE," "E+1{" $0
|
||||
${If} ${Errors}
|
||||
StrCpy $LANGUAGE "1033"
|
||||
${EndIf}
|
||||
${Else}
|
||||
; Exchange settings with user instance
|
||||
!insertmacro UAC_AsUser_Call Function ExchangeSettings ${UAC_SYNCREGISTERS}
|
||||
|
Loading…
Reference in New Issue
Block a user