Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Conditionally remove components page (http://forums.winamp.com/showthread.php?t=235866)

lyz 19th January 2006 01:32

Conditionally remove components page
 
Hi there,

I want to hide components page conditionally. I've tried to following code, but it does not work:

!ifndef HIDE_COMP_PAGE
!insertmacro MUI_PAGE_COMPONENTS
!endif

...

Function .onInit
IfFileExists "foo.bar" AlreadyInstalled NotYetInstalled
AlreadyInstalled:
!define HIDE_COMP_PAGE "true"
NotYetInstalled:
FunctionEnd


I also tried to put the code in .onInit to .onGUIInit. But that did not for me either. Can anyone give me some help on this one?

Thanks

Takhir 19th January 2006 05:58

Components page skipping
 
This is how I did it for components page to be shown if dotnetfx.exe file presents in the $EXEDIR:
code:

!define DOT_EXE dotnetfx.exe
!define MUI_PAGE_CUSTOMFUNCTION_PRE compPre
Function compPre
IfFileExists "$EXEDIR\${DOT_EXE}" showComp
Abort ; skip components page
showComp:
FunctionEnd


lyz 19th January 2006 17:15

Thanks Takhir!

I also figured out how to do it after I posted the question. And I did it exactly the same way as yours, and it worked like a charm! :D

Thanks.


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

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.