Archive: Add selections to MUI_PAGE_COMPONENTS


Add selections to MUI_PAGE_COMPONENTS
Just don't get it.

How do I add and detect selections made on the "MUI_PAGE_COMPONENTS" page. I must be looking in the wrong location.

Please help...


!include Sections.nsh

Section "A section" Sec1
...
SectionEnd

Function .onSelChange
SectionGetFlags $R0 ${Sec1}
IntOp $R0 $R0 & ${SF_SELECTED}
StrCmp $R0 ${SF_SELECTED} 0 +2
MessageBox MB_OK|MB_ICONSTOP 'Section "A section" selected!'
FunctionEnd


If you're talking about how to check which files should be installed, you don't have to. If the user unchecks a section on the components page, the code in that section will not be executed.

-Stu

And To add selections
Ok,

And how do I add components selections to the Modern UI MUI_PAGE_COMPONENTS page.


Thanks for your help!


There's quite a few examples in NSIS\Examples\Modern UI

Just add:

Section "Section 1" SEC01
...
SectionEnd

Section "Section 2" SEC02
...
SectionEnd

etc.

-Stu