Gobo
26th August 2004 19:55 UTC
How to require one of X optional sections
Dear all,
I have browsed the NSIS documentation and archive for quite a while, but have yet to find a solution for my problem ...
I am creating an Installer for a suite of (currently) two programs. The installer has five sections:
1.- Program A
2.- Program B
3.- Create Shortcuts for selected Programs on Desktop
4.- Install VB Runtime
5.- Register Control Components
3. to 5. are optional, none of these is a "must". How can I make sure that at least one of 1. or 2. (or more is the suite is extended) is selected, so that the user can choose to install either any one or both of the programs?
Until now, I only found approaches showing how to allow _at most_ one of a group of items to be select, but not _at least_ one ...
Any feedback is highly appreciated :)
razor_x
27th August 2004 09:01 UTC
!include sections.nsh
Section programA sec01
section code here...
SectionEnd
Section /o programB sec02
section code here...
SectionEnd
section /o shortcuts
section code here...
SectionEnd
Section /o vb runtimes
section code here...
SectionEnd
Section /o Register
section code here...
SectionEnd
Function .onselchange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${sec01}
!insertmacro RadioButton ${sec02}
!insertmacro EndRadioButtons
FunctionEnd
try something like this ?
Gobo
27th August 2004 10:26 UTC
Hi razor_x,
thanks for your reply :) ... but with the RadioButton approach, as one would expect, I can only install one of the programs, not both at the same time, since selecting of them automatically de-selects the other :p ...
razor_x
28th August 2004 10:00 UTC
ok sorry I guess I misunderstood..what about something like this...
might not be what you are after,but it will work or it may give you other ideas.
Gobo
29th August 2004 12:37 UTC
Thanks a lot, I'll give it a try! :up: