Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating ComponentGroups of ComponentRefs

Tags:

wix

heat

So, I'm trying to use heat to generate fragments for the files in my project. Looking at files I generated in the past, and various WiX articles from around the net, I see that I have Fragments of Directory/Component's and then a Fragment defining a ComponentGroup using ComponentRef's.

<Fragment>
    <DirectoryRef Id="dir0D9F6D272B6344EBFCF7EED0D14AA801">
        <Component Id="cmp0BA12DCC33EB11DEB149261CF6904AAE" Guid="392C95D2-37C1-464E-9979-3E9D2BF57FEE">
            <File Id="filB95C5D2C0575B59E63201E24176D55FB" KeyPath="yes" Source="SourceDir\something.dll" />
        </Component>
        <Component Id="cmp895927B450519C5487FDEC914051E715" Guid="DDC12130-C5D5-4727-95D8-660F7229BBD7">
            <File Id="fil8C5E22B3AFE9AA6056E1458BD93E3646" KeyPath="yes" Source="SourceDir\whatever.dll" />
        </Component>
</Fragment>
<Fragment>
    <ComponentGroup Id="SampleProduct">
        <ComponentRef Id="cmp0BA12DCC33EB11DEB149261CF6904AAE" />
        <ComponentRef Id="cmp895927B450519C5487FDEC914051E715" />
    </ComponentGroup>
</Fragment>

Isn't Heat supposed to generate this ComponentGroup fragment? Or did I do it manually and forgot I did so? The various Heat examples I find around the web seem to indicate that Heat does generate this fragment.

I'm doing something like: heat dir . -gg -g1 -cg WhatThe -out test.wxs

which produces Fragments of ComponentGroup/Component - nary a ComponentRef to be found:

<Fragment>
    <ComponentGroup Id="WhatThe">
        <Component Id="cmp9BDA89E67E0D566068C97D3FA3AEBE70" Directory="dir54021DE1C7E3016732B498A5B2680893" Guid="392C95D2-37C1-464E-9979-3E9D2BF57FEE">
            <File Id="filDE3AEB1672B47F4803B1EDAB6016DDD3" KeyPath="yes" Source="SourceDir\something.dll" />
        </Component>
        <Component Id="cmpA8D6F6019E02CAD0DDA17E2F285D7EC8" Directory="dir54021DE1C7E3016732B498A5B2680893" Guid="DDC12130-C5D5-4727-95D8-660F7229BBD7">
            <File Id="filDB325609DF363696B3F5E8D1FC22D4C5" KeyPath="yes" Source="SourceDir\whatever.dll" />
        </Component>
    </ComponentGroup>
</Fragment>

What am I missing? Besides medium-term memory?

Thanks

like image 865
ayang Avatar asked Mar 21 '11 16:03

ayang


1 Answers

Adding the -sfrag flag to your heat.exe command line will give you the desired output.

heat dir . -gg -g1 -sfrag -cg WhatThe -out test.wxs
like image 140
heavyd Avatar answered Sep 23 '22 02:09

heavyd