Archive: Required components based on conditions


Required components based on conditions
Hi,

What i want to do is be able to choose whether a section in the components page should be required or not based on a condition.

I can't put the section block inside an if statement and i couldn't find a way to change the state of a component from normal to required (and vice-versa) from within a function.

Could someone propose a solution or at least point me in the right direction?

Thank you.


There are the section management instructions to go with, and to make things easier there's also the included header sections.nsh.
Probably in function .onInit I would check the condition's true/false state and regarding to that I would set sections in the required state either with sections management instructions or (preferable) with sections.nsh offered commands.

http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.13


That's what i was looking for.

Thanks a lot.