Skip to content
⌘ NSIS Forum Archive

SectionIsSelected - Not work when section is not compiled

5 posts

frodelan#

SectionIsSelected - Not work when section is not compiled

Hi,
I have an installer which I does not always compile with all sections. I used to disable a few components displayed on the MUI_PAGE_COMPONENTS. Further down in the script I check if a section in selected using ${SectionIsSelected} from LogicLib.nsh. If the section I am checking for is not compiled, it will perform code inside this section anyway at runtime. Is this a bug or am I missing something?

Best regards, Frode
pospec#
And how are you doing that "conditional compilation"? Are you using IFDEF? If you are, then you can IFDEF that ${SectionIsSelected}, can't you?
frodelan#
I have a !define variable I set like 0 or 1, and just perform an !if check later. I can do the same check for the sections, but I was not quite sure if that was the best practice.