show custompage when in subsection at least one section is selected
i'm using custompage and i would like it to be shown when whole subsection (SubSection "AutoVaru" SecVaru) or one of sectionst of subsection(4example: Section "Esmaspaev" SecEvaru) is selected. I have read some example scripts from NSIS forum, but it seems to me, that it doesn't work when using subsections(have i misunderstood something or doing wrong). All exept not showing custompage works fine. that's sometihing i have in my script:
#### a part of my script
ReserveFile "varukoopia.ini"
Function SetVinstall
;just some names of sections that i have. i have all other needed stuff also.
SubSection "AutoVaru" SecVaru
Section "Esmaspaev" SecEvaru
Section "Teisipaev" SecTvaru
;example form NSIS archive:
!include "Sections.nsh"
;Page custom CustomPage ;original example
Page custom SetVinstall "" ;added in my script
Function CustomPage
; SectionGetFlags ${Section_Name} $R0 ;original
SectionGetFlags ${AutoVaru} $R0 ;added in my script
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show
Abort
show:
;If not using Modern UI use InstallOptions::dialog "iofile.ini"
!insertmacro MUI_HEADER_TEXT "text" "subtext"
; !insertmacro MUI_INSTALLOPTIONS_DISPLAY "iofile.ini" ;original
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "varukoopia.ini" ;added in my script
FunctionEnd
####
i'm using Modern UI
somebody please help me to correct my script :igor:
tnx