From b4d51b196a2da681288946982435ae67a4149943 Mon Sep 17 00:00:00 2001 From: anders_k Date: Thu, 6 Oct 2016 20:31:13 +0000 Subject: [PATCH] Added MUI_LANGUAGEEX macro so language files in other folders can be used (during testing) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6785 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Modern UI 2/Localization.nsh | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/Contrib/Modern UI 2/Localization.nsh b/Contrib/Modern UI 2/Localization.nsh index 32af45b4..917fc71c 100644 --- a/Contrib/Modern UI 2/Localization.nsh +++ b/Contrib/Modern UI 2/Localization.nsh @@ -26,24 +26,22 @@ Localization ;-------------------------------- ;Include langauge files -!macro MUI_LANGUAGE NLFID +!macro MUI_LANGUAGEEX LangDir NLFID - ;Include a language - - !verbose push - !verbose ${MUI_VERBOSE} + !verbose push ${MUI_VERBOSE} !ifndef MUI_PAGE_UNINSTALLER_PREFIX - !warning "MUI_LANGUAGE should be inserted after the MUI_[UN]PAGE_* macros" + !warning "MUI_LANGUAGE[EX] should be inserted after the MUI_[UN]PAGE_* macros" !endif !insertmacro MUI_INSERT - LoadLanguageFile "${NSISDIR}\Contrib\Language files\${NLFID}.nlf" + ;Include a language + LoadLanguageFile "${LangDir}\${NLFID}.nlf" - ;Include language file + ;Include MUI language file !insertmacro LANGFILE_INCLUDE_WITHDEFAULT \ - "${NSISDIR}\Contrib\Language files\${NLFID}.nsh" "${NSISDIR}\Contrib\Language files\English.nsh" + "${LangDir}\${NLFID}.nsh" "${NSISDIR}\Contrib\Language files\English.nsh" ;Add language to list of languages for selection dialog !define /ifndef MUI_LANGDLL_LANGUAGES "" @@ -57,6 +55,16 @@ Localization !macroend +!macro MUI_LANGUAGE NLFID + + !verbose push ${MUI_VERBOSE} + + !insertmacro MUI_LANGUAGEEX "${NSISDIR}\Contrib\Language files" "${NLFID}" + + !verbose pop + +!macroend + ;-------------------------------- ;Language selection