Yathosho
5th February 2002 10:36 UTC
Installation Options
i was wondering since forever if it's possible to have two or more installation options. let's take the example of three options (minimal, standard, advanced). once you select one of them, the other two won't be selectable, each mode excludes the other two.
i'm sure that one can skip the modes that follow after the first one in the .nsi file, but how do i jump to the second option for instance?
please help and maybe paste a little example.
jan
petersa
8th February 2002 13:33 UTC
Hi Jan,
I think you're looking for the components stuff. You need to make the sections and tell NSIS to which setting they belong, i.e. minimal, standard, or full. Example:
ComponentText 'Please choose the install type.'
; shows the install page.
InstType /ComponentsOnlyOnCustom /NoCustom
; that will [revent the individual sections from showing up.
InstType Minimal
; number 1
InstType Standard
; number 2
InstType Full
; number 3
Section ProgramFiles
SectionIn 1 2 3
; minimal, standard and full all need program files
...
SectionEnd
Section HelpFiles
SectionIn 2 3
...
SectionEnd
Section BonusStuff
SectionIn 3
...
SectionEnd
Hope this helps! :D
petersa
8th February 2002 13:35 UTC
If you don't include the /ComponentsOnlyOnCustom part, the user will be able to see the actual sections, i.e. 'Program Files', 'Help Files', 'Bonus Stuff', but they won't be able to de/select them.
Yathosho
8th February 2002 13:36 UTC
afaik that doesnt exclude the unselected sections. it allows multiple choice. what i want having 3 different installation-types, one selected excludes the other two.
petersa
9th February 2002 12:28 UTC
As long as the Sections contain SectionIn commands, those sections without a particular InstType number will be excluded from that InstType.
If you'd like to post a dummy of your installation script, or the full thing even, I'll have a look at it and help you out.