Robert,
 
I encountered this same issue when porting our installer from
InstallShield to WiX. InstallShield has the ability to make dependencies
between features - I decompiled the MSI and discovered that it does it
with a custom action and a custom table of dependencies called
ISRequiredFeature.
 
It is not too hard to write a similar custom action that reads records
from a custom table and enables the subordinate features as required. I
run my custom action just before InstallValidate.
 
However, in hindsight, I think just using a ComponentGroupRef instead of
feature fC and including it in both fA and fB might be simpler and more
robust. Not sure what the relative downsides are.
 
Regards,
John


  _____  

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
        Sent: 15 October 2007 17:06
        To: wix-users@lists.sourceforge.net
        Subject: [WiX-users] Handling Feature Dependencies
        
        

        Hello,

         

        Let's say I have three features - fA, fB, fC.  All of these
features are at the same level - Level 1. But only fA and fB are shown
to the user. fB is hidden from the user and should be installed if fA or
fB is installed. If neither of those gets installed, fC should not be
installed.

         

        Now what the seemingly obvious answer is, is to add a condition
to fC on the order of:

         

                <Feature Id="fA" Level="1">

                </Feature>

                <Feature Id="fB" Level="1">

                </Feature>

               <Feature Id="fC" Level="0" Display="hidden">


                  <Condition Level="1"><![CDATA[ (&fA = 3) OR (&fB =
3)]]></Condition>

         </Feature>

         

        But that does not  seem to work.  What am I missing? Is this not
the proper way to evaluate a "Feature" condition that is based on the
selection of other features. Can I not do the evaluation of the
condition in fC in the FileCost action since the feature selection is
there? Can I make  fC a sub-feature of both fA and fB  (That doesn't
sound right.)?  Do I have the condition statement correct?

         

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to