JohnDuran
20th April 2005 15:12 UTC
Skipping MUI_PAGE_STARTMENU
Hello,
I want to skip MUI_PAGE_STARTMENU if the user has choosen
typical installation. For the directory-page everything
is working fine with "page directory skipfunction" whereas
skipfunction does the Abort.
However, for MUI_PAGE_STARTMENU there does not exist an
"page startmenu" and
"insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP"
can not be called within a Section or a Page because of
the "PageEx"-Function used in the macro.
Any Ideas, without copying the whole macro?
Thanks
glory_man
20th April 2005 15:17 UTC
You can define MUI_PAGE_CUSTOMFUNCTION_PRE function for startmenu page. Inside this function check current install type and abort page if insttype is typical.
JohnDuran
20th April 2005 15:24 UTC
Originally posted by glory_man
You can define MUI_PAGE_CUSTOMFUNCTION_PRE function for startmenu page. Inside this function check current install type and abort page if insttype is typical.
That's the solution, thanks a lot!
Here is the working code:
!define MUI_PAGE_CUSTOMFUNCTION_PRE skipfunction
!insertmacro MUI_PAGE_STARTMENU Application $DIRECTORY
glory_man
20th April 2005 15:30 UTC
Working code will be if you add function something like this:
Function skipfunction
GetCurInstType $1
StrCmp $1 #num skip ok ; where #num number of typical insttype
skip:
Abort
ok:
FunctionEnd
OdessaCubbage
19th April 2006 13:00 UTC
I found this one very useful. Now I can select in MUI_PAGE_COMPONENTS if I want to make start menu shortcuts or not. Here's exact code:
!define MUI_PAGE_CUSTOMFUNCTION_PRE skipfunction
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
Function skipfunction
SectionGetFlags startMenuShortcuts $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show
Abort
show:
FunctionEnd
Section "Start Menu Shortcuts" startMenuShortcuts
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
# Insert here your shortcuts!
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd