aceld
20th May 2008 19:40 UTC
how to combine installer and upgrader together?
hi guys,
I have a installer that is using MUI. Now the next version has rolled out and I need to write a installer that can also be a upgrader for those already installed the previous version.
The problem I am having is that I cannot skip MUI pages, I tried to put qualifier like IfFileExists in between MUI pages but it is not working. Is there a way to do it?
Thanks,
Animaether
20th May 2008 19:46 UTC
Put the qualifier ("IfFileExists" or some other if-then-else test) in the page's pre function. Then call "Abort" if you don't want that page to be shown.
aceld
20th May 2008 23:15 UTC
Thank you for quick answer!
I did a little more research, and found this page
forums.winamp.com/showthread.php?s=&threadid=255533&highlight=how+to+disable+mui+page+pre
Basicly these are the same thing.
To overwrite the pre function of the mui page, you need to define MUI_PAGE_CUSTOMFUNCTION_PRE to your function.
here is an example to overwirte mui_directory page:
Function ddd
StrCpy $R0 "hi"
IfFileExists "c:\downloadq" download
StrCpy $R0 "ddd"
Abort
FunctionEnd
!insertmacro MUI_PAGE_LICENSE "hihi.txt"
!define MUI_PAGE_CUSTOMFUNCTION_PRE ddd
!insertmacro MUI_PAGE_DIRECTORY