Archive: Mui_page_directory


Mui_page_directory
  Hello
I define have several modules which can be installed, but the window for selecting the directory should only be shown if one special module is selected. I tried to put the line
!insertmacro MUI_PAGE_DIRECTORY
in the section of the module, but an error occures during compilation.

Thanks for your help


You will have to put the directory page after the components page, and then check if the component is selected in the directory page pre-handler to abort it or not.


# pages section

>!insertmacro MUI_PAGE_COMPONENTS
># make MUI call a function before handling the next page
>!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPre
>!insertmacro MUI_PAGE_DIRECTORY

># your sections - keep note of the ID, 'Sec01'
>Section "Section 1" Sec01
SectionEnd

># function called before the Directory page is handled
>Function DirectoryPre
# get the flags for the section in question
SectionGetFlags ${Sec01} $0
# bit-wise AND them with the value 1
# (its selected/unselected state)
IntOp $0 $0 & 1
# if the resulting value is 0, the section is unselected
StrCmp $0 0 0 +2
# call abort so that the page won't show up
Abort
FunctionEnd
>