Section selection depending on language
Hi, after searching this forum (maybe not good enough?) I'm still facing this problem:
I've got several sections which are installed depending on the chosen installer language.
Section "Bla ENG" SEC_BLA_ENG
<stuff to install for english language>
SectionEnd
Section "Bla GER" SEC_BLA_GER
<stuff to install for german language>
SectionEnd
(...many more language depending sections...)
I 've written a litte macro for helping me in selecting/unselecting these sections, using Sections.nsh:
# Macro for selecting language specific sections
!macro SELECT_SECTION GERMAN_SECTION_ID ENGLISH_SECTION_ID
StrCmp $LANGUAGE ${LANG_GERMAN} German${GERMAN_SECTION_ID} English${ENGLISH_SECTION_ID}
German${GERMAN_SECTION_ID}:
!insertmacro SelectSection ${GERMAN_SECTION_ID}
!insertmacro UnselectSection ${ENGLISH_SECTION_ID}
Goto done${GERMAN_SECTION_ID}
English${ENGLISH_SECTION_ID}:
!insertmacro SelectSection ${ENGLISH_SECTION_ID}
!insertmacro UnselectSection ${GERMAN_SECTION_ID}
done${GERMAN_SECTION_ID}:
!macroend
In my .onInit, I call the macro like this:
(...)
!insertmacro MUI_LANGDLL_DISPLAY
!insertmacro SELECT_SECTION SEC_BLA_GER SEC_BLA_ENG
!insertmacro SELECT_SECTION SEC_BLA_GER2 SEC_BLA_ENG2
(...)
But...disregarding the chosen language, ALL sections are installed. What am I doing wrong?
Help really appreciated.
Greez
Jens