Skip to content
⌘ NSIS Forum Archive

Not all languages in language list

8 posts

HeReSY#

Not all languages in language list

Hi,

i have a little problem.
I want that the user can choose the language. So I wrote all languages in the setup file.
After compiling and starting the setup.exe, the user only can choose between a few languages. Can anyone tell me when this happens and how i can solve this problem?



This is my installer file:

; Script generated by the HM NIS Edit Script Wizard.

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "prog"
!define PRODUCT_VERSION "1"
!define PRODUCT_PUBLISHER ""
!define PRODUCT_WEB_SITE ""
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\prog.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "icon.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; Language Selection Dialog Settings
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"

; Welcome page
!insertmacro MUI_PAGE_WELCOME

; License page
!define MUI_LICENSEPAGE_RADIOBUTTONS
!insertmacro MUI_PAGE_LICENSE "license"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Start menu page
var ICONS_GROUP
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Folder"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\prog.exe"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "Afrikaans"
!insertmacro MUI_LANGUAGE "Albanian"
!insertmacro MUI_LANGUAGE "Arabic"
!insertmacro MUI_LANGUAGE "Basque"
!insertmacro MUI_LANGUAGE "Belarusian"
!insertmacro MUI_LANGUAGE "Bosnian"
!insertmacro MUI_LANGUAGE "Breton"
!insertmacro MUI_LANGUAGE "Bulgarian"
!insertmacro MUI_LANGUAGE "Catalan"
!insertmacro MUI_LANGUAGE "Croatian"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Esperanto"
!insertmacro MUI_LANGUAGE "Estonian"
!insertmacro MUI_LANGUAGE "Farsi"
!insertmacro MUI_LANGUAGE "Finnish"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "Galician"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Greek"
!insertmacro MUI_LANGUAGE "Hebrew"
!insertmacro MUI_LANGUAGE "Hungarian"
!insertmacro MUI_LANGUAGE "Icelandic"
!insertmacro MUI_LANGUAGE "Indonesian"
!insertmacro MUI_LANGUAGE "Irish"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Japanese"
!insertmacro MUI_LANGUAGE "Korean"
!insertmacro MUI_LANGUAGE "Kurdish"
!insertmacro MUI_LANGUAGE "Latvian"
!insertmacro MUI_LANGUAGE "Lithuanian"
!insertmacro MUI_LANGUAGE "Luxembourgish"
!insertmacro MUI_LANGUAGE "Macedonian"
!insertmacro MUI_LANGUAGE "Malay"
!insertmacro MUI_LANGUAGE "Mongolian"
!insertmacro MUI_LANGUAGE "Norwegian"
!insertmacro MUI_LANGUAGE "NorwegianNynorsk"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Romanian"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Serbian"
!insertmacro MUI_LANGUAGE "SerbianLatin"
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_LANGUAGE "Slovak"
!insertmacro MUI_LANGUAGE "Slovenian"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "SpanishInternational"
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Thai"
!insertmacro MUI_LANGUAGE "TradChinese"
!insertmacro MUI_LANGUAGE "Turkish"
!insertmacro MUI_LANGUAGE "Ukrainian"
!insertmacro MUI_LANGUAGE "Uzbek"
!insertmacro MUI_LANGUAGE "Welsh"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "..\..\..\..\vWSSetup\${PRODUCT_NAME}_${PRODUCT_VERSION}_Setup.exe"
InstallDir "$PROGRAMFILES\Folder"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show

Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd

Section "Hauptgruppe" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "..\release\prog.exe"
File "..\release\QtSvg4.dll"
File "..\release\QtNetwork4.dll"
File "..\release\QtGui4.dll"
File "..\release\QtCore4.dll"
File "..\release\license.txt"
File "..\release\license.rtf"
SetOutPath "$INSTDIR\lang_finder"
File "..\release\lang_finder\prog_zh_ZH.qm"
File "..\release\lang_finder\prog_ar_AR.qm"
File "..\release\lang_finder\prog_cs_CS.qm"
File "..\release\lang_finder\prog_da_DA.qm"
File "..\release\lang_finder\prog_el_EL.qm"
File "..\release\lang_finder\prog_en_EN.qm"
File "..\release\lang_finder\prog_es_ES.qm"
File "..\release\lang_finder\prog_fi_FI.qm"
File "..\release\lang_finder\prog_fr_FR.qm"
File "..\release\lang_finder\prog_hu_HU.qm"
File "..\release\lang_finder\prog_is_IS.qm"
File "..\release\lang_finder\prog_it_IT.qm"
File "..\release\lang_finder\prog_lv_LV.qm"
File "..\release\lang_finder\prog_nl_NL.qm"
File "..\release\lang_finder\prog_no_NO.qm"
File "..\release\lang_finder\prog_pl_PL.qm"
File "..\release\lang_finder\prog_pt_PT.qm"
File "..\release\lang_finder\prog_ro_RO.qm"
File "..\release\lang_finder\prog_ru_RU.qm"
File "..\release\lang_finder\prog_sk_SK.qm"
File "..\release\lang_finder\prog_sl_SL.qm"
File "..\release\lang_finder\prog_sv_SV.qm"

; Shortcuts
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\prog.lnk" "$INSTDIR\prog.exe"
CreateShortCut "$DESKTOP\prog.lnk" "$INSTDIR\prog.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section -AdditionalIcons
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
;CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd

Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\prog.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\prog.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd


Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) wurde erfolgreich deinstalliert."
FunctionEnd

Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Möchten Sie $(^Name) und alle seinen Komponenten deinstallieren?" IDYES +2
Abort
FunctionEnd

Section Uninstall
SetShellVarContext all
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\license.txt"
Delete "$INSTDIR\license.rtf"
Delete "$INSTDIR\QtCore4.dll"
Delete "$INSTDIR\QtGui4.dll"
Delete "$INSTDIR\QtNetwork4.dll"
Delete "$INSTDIR\QtSvg4.dll"
Delete "$INSTDIR\prog.exe"

Delete "$INSTDIR\lang_finder\prog_zh_ZH.qm"
Delete "$INSTDIR\lang_finder\prog_ar_AR.qm"
Delete "$INSTDIR\lang_finder\prog_cs_CS.qm"
Delete "$INSTDIR\lang_finder\prog_da_DA.qm"
Delete "$INSTDIR\lang_finder\prog_el_EL.qm"
Delete "$INSTDIR\lang_finder\prog_en_EN.qm"
Delete "$INSTDIR\lang_finder\prog_es_ES.qm"
Delete "$INSTDIR\lang_finder\prog_fi_FI.qm"
Delete "$INSTDIR\lang_finder\prog_fr_FR.qm"
Delete "$INSTDIR\lang_finder\prog_hu_HU.qm"
Delete "$INSTDIR\lang_finder\prog_is_IS.qm"
Delete "$INSTDIR\lang_finder\prog_it_IT.qm"
Delete "$INSTDIR\lang_finder\prog_lv_LV.qm"
Delete "$INSTDIR\lang_finder\prog_nl_NL.qm"
Delete "$INSTDIR\lang_finder\prog_no_NO.qm"
Delete "$INSTDIR\lang_finder\prog_pl_PL.qm"
Delete "$INSTDIR\lang_finder\prog_pt_PT.qm"
Delete "$INSTDIR\lang_finder\prog_ro_RO.qm"
Delete "$INSTDIR\lang_finder\prog_ru_RU.qm"
Delete "$INSTDIR\lang_finder\prog_sk_SK.qm"
Delete "$INSTDIR\lang_finder\prog_sl_SL.qm"
Delete "$INSTDIR\lang_finder\prog_sv_SV.qm"

Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
Delete "$DESKTOP\prog.lnk"
Delete "$SMPROGRAMS\$ICONS_GROUP\prog.lnk"

RMDir "$SMPROGRAMS\$ICONS_GROUP"
RMDir "$INSTDIR"

SetShellVarContext current
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
Delete "$DESKTOP\prog.lnk"
Delete "$SMPROGRAMS\$ICONS_GROUP\prog.lnk"

RMDir "$SMPROGRAMS\$ICONS_GROUP"
RMDir "$INSTDIR\lang_finder"
RMDir "$INSTDIR"

DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd
pengyou#
Does this FAQ answer your question?

MSG#
Also, please never paste huge amounts of code like that. Either use pastebin.com or add the script as an attachment.
Anders#
Originally Posted by Afrow UK View Post
Modern UI 1 is no longer supported.
This is news to me, where do you have this from? It is recommended that new installers use MUI2, but I think MUI1 is still supported (Everything in the official installer has to have some kind of support no?)
Afrow UK#
Originally Posted by Anders View Post
This is news to me, where do you have this from? It is recommended that new installers use MUI2, but I think MUI1 is still supported (Everything in the official installer has to have some kind of support no?)
Perhaps I used the wrong phrasing there. What I should say is; most people will just tell you to switch to MUI2 rather than give you tech support for MUI1. Same with InstallOptions. Perhaps I only speak for myself but there we are.

Stu
T.Slappy#
Perhaps I only speak for myself but there we are.
🙂

Using MUI1 in installers is strongly not recommended, but people still use it however nsDialogs is much better...
MSG#
I'm pretty sure the only reason IO is still 'officially' supported is for backwards compatibility. I'm thinking it wouldn't be a bad idea to reconsider that stance for the (hopefully) upcoming NSIS Unicode. It's about time to phase this old donkey out, no?