How Can I Install a Feature Conditionally Based on Install State of Other Feature - INSTALLSHIELD2012
I'm trying to install a Feature conditionally based on &OtherFeature=3 as its condition.
I'm thinking this isn't going to work as my testing is not looking good.
I'm also building x32 and x64 from the same template.
Here's my Features
Common (Release Flag = Common) Server (Server) Server32 (Server32) Server64 (Server64) P2A (P2A) P2A32 (P2A32) P2A64 (P2A64) RealD32 (RealD32) RealD64 (RealD64)
32 Bit = Common,Server,P2A,P2A32,Server32,RealD32 64 Bit = Common,Server,P2A,P2A64,Server64,RealD64
&P2A<>3 OR !P2A<>3
Also, the P2A32 & 64 features are to be installed if P2A is being installed. Those conditions are...
&P2A=3
My guess is that I will need to create a custom action to modify the ADDLOCAL property accordingly. Does this sound right or is there a way to put the conditions on the Features?
Let me know if clarification is needed.
Any help more than appreciated!
Answers (2)
Some remarks on the subject:
1) Have a read of this article on the use of release flags: http://blogs.flexerasoftware.com/installtalk/2011/01/building-32-bit-and-64-bit-installations-from-the-same-installshield-project.html
2) if you want to use custom dialogs to create mutually exclusive features, here's an article on the subject: http://www.installshield.com/news/newsletter/0310-articles/features.asp
3) if you want conditioning based on a feature install state, you'll have to do it on a component level, since feature conditions that influence installlevel of said features, cannot contain references to other feature install states (these conditions are evaluated BEFORE the feature install states are evaluated)
Use 'Condtion' table
The Condition table can be used to modify the selection state of any entry in the Feature table based on a conditional expression
If this conditional expression evaluates to TRUE, then the Level column in the Feature table is set to the conditional install level.
The expression in the Condition column should not contain reference to the installed state of any feature or component. This is because the expressions in the Condition column are evaluated before the installer evaluates the installed states of features and components. Any expression in the Condition table that attempts to check the installed state of a feature or component always evaluates to false.