Skip to content
⌘ NSIS Forum Archive

hide sections on component page

3 posts

Thyrador#

hide sections on component page

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#
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)