That reminds me, actions should always (with rare exception) be conditioned 
based on Component states not Features. Thus those action should be in the same 
Fragment as the Component (which they probably are below).

I've not run into many cases where I'd use Feature states in conditions. 

-----Original Message-----
From: John Cooper [mailto:jocoo...@jackhenry.com] 
Sent: Thursday, January 30, 2014 6:30 AM
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] relationship between components and features

What would you inject?  Conditions on the Feature can be just about anything.

For example, I have a Feature in one project that is conditioned on the 
existence of ADFS 2.0.  If ADFS 2.0 is not installed, the Feature is disabled.  
The corollary to that is that all the Components of that feature are similarly 
conditioned to not install if ADFS 2.0 is not detected.

This needs to be done custom for such features.  There's no way the compiler 
would be able to predict the semantics of my conditioning.

WiX is correct in this respect, and more problems would be created by having 
the compiler try to "guess" the semantics than would be gained from the 
code-behind.  Besides which, it would make for some awful, subtle bugs in 
multi-feature installers.

Fragments are linker artifacts, not semantic units.

--
John Merryweather Cooper
Build & Install Engineer – ESA
Jack Henry & Associates, Inc.®
Shawnee Mission, KS  66227
Office:  913-341-3434 x791011
jocoo...@jackhenry.com
www.jackhenry.com



-----Original Message-----
From: Marek Mielcarek [mailto:mmielca...@actuate.com]
Sent: Thursday, January 30, 2014 8:08 AM
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] relationship between components and features

I understand and agree with what you said. 
One would think that Feature container and references assure proper isolation. 
If MSI does not support that wix compiler should (i.e. inject extra condition). 
Instead wix silently accepts erroneous, or at least, very misleading construct. 

Thank you


-----Original Message-----
From: Nicolás Alvarez [mailto:nicolas.alva...@gmail.com]
Sent: Wednesday, January 29, 2014 7:03 PM
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] relationship between components and features

2014-01-29 Marek Mielcarek <mmielca...@actuate.com>:
> Please take a look at this pseudo-code that represents my WiX xml:
>
> <Feature Id="Feature1">
> <ComponentGroupRef Id="CG1"/>
> </Feature>
> <Feature Id="Feature2">
>   <ComponentGroupRef Id="CG2"/>
> </Feature>
> ...
> <Fragment Id="F1">
>     <ComponentGroup Id="CG1"/>
>     <InstallExecuteSequence>
>       <Custom Action="CA1 " Before="InstallFinalize"><![CDATA[NOT 
> Installed]]></Custom>
>     <InstallExecuteSequence>
> </Fragment>
>
> <Fragment Id="FG1">
>     <ComponentGroup Id="CG2"/>
>     <InstallExecuteSequence>
>       <Custom Action="CA2 " Before="InstallFinalize"><![CDATA[NOT 
> Installed]]></Custom>
>     <InstallExecuteSequence>
> </Fragment>
>
> My intention was to run/schedule CA1 only for Feature1 and CA2 for Feature2 
> respectively. To my surprise, when the installer runs with only one feature 
> enabled (ADDLOCAL=Feature1) both Custom Actions (CA1 and CA2) are being 
> scheduled/executed anyway. I can obviously mitigate that by adding extra 
> condition, such as (&Feature1=3) for CA1 and (&Feature2=3) for CA2 but it 
> just does not seem to be OK.
> Since CA1 is in the group/fragment that is referred by Feature1 only, I'd 
> expect it to be activated when Feature1 installs.
> Can someone p[lease enlighten me why this it not working in such a way ?

Fragments don't even exist in the MSI, they are only a WiX thing. The way 
you're using fragments makes the CA1 custom action be included in the MSI or 
not, depending on whether you refer to CG1 from another fragment or not (eg. 
from a Feature). Once the CA is included in the MSI, it won't be affected by 
the installation state of features or anything like that.

I'm pretty sure you need the extra conditions to do what you want (but I don't 
know exactly how to do it).

--
Nicolás

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable security 
intelligence. It gives you real-time visual feedback on key security issues and 
trends.  Skip the complicated setup - simply import a virtual appliance and go 
from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable security 
intelligence. It gives you real-time visual feedback on key security issues and 
trends.  Skip the complicated setup - simply import a virtual appliance and go 
from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended exclusively for the individual or entity to which it is addressed. The 
message, together with any attachment, may contain confidential and/or 
privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution is strictly prohibited. If you have received this message in 
error, please immediately advise the sender by reply email and delete all 
copies.
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable security 
intelligence. It gives you real-time visual feedback on key security issues and 
trends.  Skip the complicated setup - simply import a virtual appliance and go 
from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to