ElArZ
1st July 2008 21:59 UTC
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.
Red Wine
1st July 2008 22:19 UTC
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
ElArZ
1st July 2008 22:30 UTC
That's what i was looking for.
Thanks a lot.