When you refer to anything in a fragment, the whole fragment is included. 

Your last idea was the right one: put each feature in its own fragment along
with the resources that are specific to that feature. Put the shared
components into their own fragment.  Feature A and feature B should both
refer to the shared components.

When you refer to feature B you will get the feature, the resources specific
to the feature and the resources in the shared fragment, but you won't get
feature A because nothing is referring to its fragment.


-----Original Message-----
From: Elanius [mailto:elani...@gmail.com] 
Sent: 21 September 2011 06:34
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Don't link not referenced features

Hi

Could anybody help me with fragments and features. I'm working on big wix
project with lot of fragments.
Idea was that I make libraries for everything what can be shared between our
installers and then just by references compose what I need.

Everything goes fine until now. I created fragment (wixlib) Where I have 2
features. But in one of final installers I need only one. But when I make
reference to one of these features then both are linked into final
installer. Second feature which I didn't referenced is without parent but it
is there.

Look at this example

*.wixlib*

  <Fragment>

...

    <Feature Id="Feature_A" Level="1" Title="!(loc.Feature_A_Title)"
Description="!(loc.Feature_A_Description)" Display="collapse">
      <ComponentGroupRef Id="FilesCG"/>
      <ComponentGroupRef Id="RegsCG"/>
      <ComponentGroupRef Id="LangCG"/>
      <ComponentGroupRef Id="DriversCG"/>
      <ComponentGroupRef Id="ModuleCG"/>
    </Feature>

    <Feature Id="Feature_B" Level="1" Title="!(loc.Feature_B_Title)"
Description="!(loc.Feature_B_Description)" Display="collapse">
      <ComponentGroupRef Id="FilesCG"/>
      <ComponentGroupRef Id="RegsCG"/>
      <ComponentGroupRef Id="LangCG"/>
    </Feature>

  </Fragment>

*installer*

  <Product>

...

    <Feature Id="MainFeature" Level="1" Title="!(loc.MainFeature_Title)"
Description="!(loc.MainFeature_Description)" Display="expand">
      <FeatureRef Id="Feature_B" />
    </Feature>

  </Product>

So when I make now build of installer I get installer with both features
Feature_B and also Feature_A. But Feature_A is without parent because I
didn't referenced it. So I hoped that if some feature form wixlib is not
referenced that it wont by included into final installer.
Is there any way how can be this Feature_A excluded from linking into final
installer. Or is whole my approach wrong? I also though that I put one of
them into another fragment (wixlib) but these features has shared components
so I didn't know if it helped something.

Thanks for any reply.
elanius.
-----------------------------------------------------------------------------
-
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to