I am trying to create a Inno Setup installer (with Inno Setup 6.2.0) that has multiple setup Types where more than one can have optional Components (as well as fixed components). For example, suppose I want to have the following setup types:
- Instructor
- Student
If the "Instructor" setup type is selected, I would like to have an "Instructor - Fixed" component (which must be installed), plus two optional components "Instructor- Optional 1" and "Instructor - Optional 2".
Similarly for the "Student" setup type, I would like a fixed component plus a couple of optional components.
Below is the starting point for my experiments:
[Types]
Name: TYPE_INSTRUCTOR ; Description: "Instructor" ;
Name: TYPE_STUDENT ; Description: "Student" ;
[Components]
Name: COMP_INSTRUCTOR ; Description: "Instructor" ; Types: TYPE_INSTRUCTOR
Name: COMP_INSTRUCTOR\FIXED ; Description: "Instructor - Fixed" ; Types: TYPE_INSTRUCTOR ; Flags: fixed
Name: COMP_INSTRUCTOR\OPTIONAL_1 ; Description: "Instructor - Optional 1" ; Types: TYPE_INSTRUCTOR
Name: COMP_INSTRUCTOR\OPTIONAL_2 ; Description: "Instructor - Optional 2" ; Types: TYPE_INSTRUCTOR
Name: COMP_STUDENT ; Description: "Student" ; Types: TYPE_STUDENT
Name: COMP_STUDENT\FIXED ; Description: "Student - Fixed" ; Types: TYPE_STUDENT ; Flags: fixed
Name: COMP_STUDENT\OPTIONAL_1 ; Description: "Student - Optional 1" ; Types: TYPE_STUDENT
Name: COMP_STUDENT\OPTIONAL_2 ; Description: "Student - Optional 2" ; Types: TYPE_STUDENT
[Files]
Source: "InstFixed.txt" ; DestDir: {app} ; Components: COMP_INSTRUCTOR\FIXED
Source: "InstOpt1.txt" ; DestDir: {app} ; Components: COMP_INSTRUCTOR\OPTIONAL_1
Source: "InstOpt2.txt" ; DestDir: {app} ; Components: COMP_INSTRUCTOR\OPTIONAL_2
Source: "StuFixed.txt" ; DestDir: {app} ; Components: COMP_STUDENT\FIXED
Source: "StuOpt1.txt" ; DestDir: {app} ; Components: COMP_STUDENT\OPTIONAL_1
Source: "StuOpt2.txt" ; DestDir: {app} ; Components: COMP_STUDENT\OPTIONAL_2
I have tried a few different things, but nothing has succeeded in achieving what I need. I have tried:
- Adding
Flags: iscustomto both setup types (my thinking was to indicate that both are customisable). However, Inno Setup only seems to allow for one customisable type. - Making just one of the setup type to have
Flags: iscustom(e.g. adding it toTYPE_INSTRUCTOR). However, that does not work as I would like, because I can then end up with invalid combinations, e.g. I can select a mixture of Instructor and Student components.
The only way I can think to get around this is to have setup types for every possible combination. That would not be practical (this example is not my real problem, just a simple case to illustrate it, I would end up with a very large list of setup types).
Thank you in advance for any workable solutions.
