Archive: CustomPage depending on section selection


CustomPage depending on section selection
  I am looking for a solution to show a custompage only when a specific section is checked at MUI_COMPONENTSPAGE.

I know there was a thread a few days agon but I can't find it anymore. By the way the solution there was not that understandable for me ;)

Could somebody re-explain?

Thx
Chris


I found the post, and I put the code here!


define SF_SELECTED 1


Page custom CustomPageName

>Function CustomPageName
SectionGetFlags$0 ${SectionDefineName}
StrCmp $0 ${SF_SELECTED} 0 skipPage
# show page here ...
# InstallOptions::dialog....
skipPage:
>FunctionEnd
>

Could you also post the link to the thread deguix?


http://forums.winamp.com/showthread....413#post905413


Will be better to IntOp $0 $0 & ${SF_SELECTED} before you compare.


:igor:

???
KichiK, sorry can't interpret your post

:igor:

Chris


By the way,

integration of deguix-solution forces the following compiler output:


"SetCustomA"

>!define: "SF_SELECTED"="1"
>Usage: SectionGetFlags section_index $(user_var: output flags)
>Error in script "C:\NSIS\TSW\tsw.nsi" on line 1152 -- aborting creation process
>
with that function:

SetCustomA


;; TEST
!define SF_SELECTED 1

SectionGetFlags$0 ${secMySQL4}
StrCmp $0 ${SF_SELECTED} 0 skipPage
;;

!
insertmacro MUI_HEADER_TEXT "$(PAGE_TITLE_MYSQL)" "$(PAGE_SUBTITLE_MYSQL)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioA.ini"

;; TEST
skipPage:

>FunctionEnd
>

Kichik said this (that I understand):


define SF_SELECTED 1


Page custom CustomPageName

>Function CustomPageName
SectionGetFlags$0 ${SectionDefineName}
IntOp $0 $0 & ${SF_SELECTED}
StrCmp $0 ${SF_SELECTED} 0 skipPage
# show page here ...
# InstallOptions::dialog....
skipPage:
>FunctionEnd
>

I'm sorry KiCHiK. I don't question your NSIS knowledge. Not at all...
But I think that you mean this:

IntOp $0 $0 | ${SF_SELECTED}

According to this thread, I think.

You're wrong.


deguix you've got it backwards again... It's SectionGetFlags ${SectionDefineName} $0.

!include "Sections.nsh"

Page custom CustomPageName

Function CustomPageName
SectionGetFlags ${SectionDefineName} $0
IntOp $0 $0 & ${SF_SELECTED}
StrCmp $0 ${SF_SELECTED} 0 skipPage
# show page here ...
# InstallOptions::dialog....
skipPage:
FunctionEnd

Thx guys -
it works now
Chris