PDA

View Full Version : hide sections on component page


Thyrador
9th November 2011, 10:55
hey, me again :P


is it possible to hide sections on the components-page if the required file is missing?


atm it looks like this:

Section ""
AddSize 59118
SetOutPath "$INSTDIR"
SetOverwrite on
SetOverwrite ifdiff
Nsis7z::ExtractWithDetails "$EXEDIR\data\data.7z" "Install Update: %s"
SectionEnd

Section "Pack 2"
AddSize 22811
SetOutPath "$INSTDIR"
SetOverwrite on
SetOverwrite ifdiff
Nsis7z::ExtractWithDetails "$EXEDIR\data\data01.7z" "Install Pack 2: %s"
SectionEnd


Section "Pack 3"
AddSize 71739
SetOutPath "$INSTDIR"
SetOverwrite on
SetOverwrite ifdiff
Nsis7z::ExtractWithDetails "$EXEDIR\data\data03.7z" "Install Pack 3: %s"
SectionEnd


what i want is, if data03.7z is missing, that the installer hides section "Pack 3" on components page, so that only "Pack 2" is shown.
is that possible?

Yathosho
9th November 2011, 11:11
it's possible, look at Sections.nsh - however, hiding them is not enough you have to make sure it's not executed (a change of installtype can select that hidden section)

Thyrador
9th November 2011, 11:13
do you have a short example of this?