Here's how I have done what you seem to want to do:

"ComponentGroup" file:
  <Fragment>
    <ComponentGroup Id="MyFiles">
      <Component Directory="INSTALLDIR" Feature="DefaultFeature">
        <File Source="File1.dll" />
      </Component>
      <Component Directory="INSTALLDIR" Feature="DefaultFeature">
        <File Source="File2.dll" />
      </Component>
    </ComponentGroup>
  </Fragment>

Main file:
  <Product ...>
    ...
    <ComponentGroupRef Id="MyFiles"/>
    ...
    <Feature Id="DefaultFeature" Level="1"
ConfigurableDirectory="TARGETDIR"/>
    ...
  </Product>

But in my case, I often have several features and several directories and I
want to assign several related components to different features and/or
directories, so they become my "pivot points".

-----Original Message-----
From: Neil Sleightholm [mailto:n...@x2systems.com] 
Sent: Tuesday, November 30, 2010 7:28 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to use Component/@Feature

What I was hoping was to simplify this sort of structure as I always end
up adding a Component and forgetting the ComponentRef:
  <Fragment>
    <DirectoryRef Id="INSTALLDIR">
      <Component>
        <File Source="File1.dll" />
      </Component>
      <Component>
        <File Source="File2.dll" />
      </Component>
    </DirectoryRef>
  </Fragment>
  <Fragment>
    <ComponentGroup Id="MyFiles">
      <ComponentRef Id="File1.dll" />     
      <ComponentRef Id="File2.dll" />
    </ComponentGroup>
  </Fragment>

Then is my main file
    <Feature Id="DefaultFeature" Level="1"
ConfigurableDirectory="TARGETDIR">
      <ComponentGroupRef Id=" MyFiles " />
    </Feature>

In WiX 2 there was a FragmentRef and that could be used to pull in a
feature. I'm sure this is really obvious but I missing something.

Neil

-----Original Message-----
From: Rob Mensching [mailto:r...@robmensching.com] 
Sent: 30 November 2010 14:56
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to use Component/@Feature

Personally, I find the Component/@Directory more useful to put my
Components in a Feature instead.

On Tue, Nov 30, 2010 at 5:31 AM, Bob Arnson <b...@joyofsetup.com> wrote:

> On 30-Nov-10 02:43, Neil Sleightholm wrote:
> > The problem with this is that there isn't a reference to any of the 
> > components in the main install so none of the components are 
> > included in the msi.
>
> Component/@Feature doesn't change the requirement that references flow

> from the entry section to fragments, not vice-versa. You need some 
> reference to get the fragment linked in. ComponentGroupRef is a 
> natural one but any other would do.
>
> --
> sig://boB
> http://joyofsetup.com/
>
>
>
> ----------------------------------------------------------------------
> -------- Increase Visibility of Your 3D Game App & Earn a Chance To 
> Win $500!
> Tap into the largest installed PC base & get more eyes on your game by

> optimizing for Intel(R) Graphics Technology. Get started today with 
> the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for
grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>


--
virtually, Rob Mensching - http://RobMensching.com LLC
------------------------------------------------------------------------
------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for
grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

----------------------------------------------------------------------------
--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to