mui2 custom page with variables
Hi all,
I'm trying to implement a custom mui2 page which knows some variables, something like e.g. the existing directory page but instead of filling a path variable I want to e.g. fill a boolean variable which tells me if a checkbox has been selected. The aim is to be ready to use this page multiple times just doing something like
!define MUI_CHECKBOXPAGE_VARIABLE ${enableA}
!define ... (some text things)
!insertmacro MUI_PAGE_CHECKBOX
!define MUI_CHECKBOXPAGE_VARIABLE ${enableB}
!define ... (some text things)
!insertmacro MUI_PAGE_CHECKBOX
I tried so by various ways: Just defining my custom page with a function accessing the MUI_CHECKBOXPAGE_VARIABLE I get a problem when filling MUI_CHECKBOXPAGE_VARIABLE in the "leave" function, probably because at include time the !define line was not yet passed? So I tried to copy everything from the directory page. There is some page declaration done within a macro so my hope is that MUI_CHECKBOX_PAGE_VARIABLE must be available only at the time of using the macro. But when filling it with StrCpy "${MUI_CHECKBOXPAGE_VARIABLE}" "True" I get a usage error for StrCpy. Same when changing it a bit like for the existing startmenu page where the variable is provided as parameter like
!insertmacro MUI_PAGE_CHECKBOX ${enableA}
Any ideas how I can create a flexible custom page that accepts variables defined before using its insertmacro?