Referencing Section index beofre it's declared
I have a problem similar to the below, where I have a sectiongroup with three sections in it, and if at least one of those sections is selected, I want to first install some files required by all sections. So I have something like the below, but it does not compile because the hidden section is referencing the symbol ${Sec_ThisGroup} which is not yet defined. Any ideas on how I can work around this? I'm going to be encountering this in several places.
Section "-Hidden common"
Section RO
${If} ${SectionIsSelected} ${Sec_ThisGroup}
${OrIf} ${SectionIsPartiallySelected} ${Sec_ThisGroup}
;Install common files
${EndIf}
SectionEnd
SectionGroup "this group" Sec_ThisGroup
Section "Blah 1"
SectionEnd
Section "Blah 2"
SectionEnd
Section "Blah 3"
SectionEnd
SectionGroupEnd
Instead of using the If SectionIsSelected, a less elegant alternative is that I place code in the onSelChange or components page leave callback, that enables and disables the hidden common section, but I'd need that also in the oninit in case the installer is run silently. I figured it would be much easier to maintain if I just had a hidden section before the other section, because it will be run regardless of whether it's silent or not. As I add more logic to handle certain silent install scenarios, my code is getting pretty tangled and more difficult to handle.