Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Mui_page_directory (http://forums.winamp.com/showthread.php?t=231235)

TomTom71 17th November 2005 10:44

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

Animaether 17th November 2005 13:39

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.

PHP Code:

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



All times are GMT. The time now is 05:45.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.