Archive: NSIS works with LangString incorrectly


NSIS works with LangString incorrectly
I have an installer, it builds automatically (on TFS) by using NSIS command line features

    "..\..\NSIS\makensis.exe"  /DBUILD_NUMBER=28311 /DPRODUCT_LANGUAGE=English "MTService_setup.nsi"


The installer must use only one language, which specified in PRODUCT_LANGUAGE parameter. I've done it in the following way

    !insertmacro MUI_LANGUAGE "${PRODUCT_LANGUAGE}"


When I build installer in such way, the common language of the interface is correct. But it uses default system language for LangString. So, if default system language is not English, it shows LangString on another language in the English installer.

I've tried to change script to avoid command line parameters (for test purposes)

    !insertmacro MUI_LANGUAGE "English"


It doesn't work too.

I've tried to change script to


!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Russian"

Function .onInit

!insertmacro MUI_LANGDLL_DISPLAY

FunctionEnd


It works, but, of course, it shows language selection dialog. I want to use specific ${PRODUCT_LANGUAGE} without any dialog.

So, how can I fix it?

Try http://nsis.sourceforge.net/Language...ws_UI_Language.

Stu


Try http://nsis.sourceforge.net/Language...ws_UI_Language.
Unfortunatelly, it doesn't work for me. There wasn't any changes, LangString use system default language.

http://i.stack.imgur.com/N6f1s.png

I've tried to add


StrCpy $LANGUAGE ${LANG_ENGLISH}


in .onInit function, but it doesn't work too

Something is wrong with your script. Half of those texts are LangStrings. The rest are set via the old language file format (nlf) but are still selected on the value of $LANGUAGE. Is it just the section descriptions? Where have you put your language strings for those? Are they after !insertmacro MUI_LANGUAGE ...?

Stu