views:

271

answers:

1

I have a WiX 3 project that has hundreds of files, and I can't seem to figure out how to include them all using a wildcard. I have tried this:

heat.exe" dir ".\!Build" -gg -ke -template:fragment -out "Files.wxs"

This produces a fragment .wxs file, but I'm not sure what to do with it. Any help would be much appreciated.

+2  A: 

Try this command

heat dir "Your_Directory" -gg -ke -template:Product -out "Files.wxs"

It will create this structure in the generated wxs file {Files.wxs}:

<Fragment>
    <DirectoryRef Id="Files">
        <Component Id="Test.ico" Guid="{YOUR_GUID}">
            <File Id="Test.ico" Name="Test.ico" KeyPath="yes" Source="..[path to file]\Test.ico" />
        </Component>
    </DirectoryRef>
</Fragment>

You should get one for each file, that was in the directory that you ran heat against. Once that is done, you just have to add the wxs file to your project, make sure you have the directory that the directoryref points to is created.

CheGueVerra
If this command generates a product wxs file, how would I combine my existing product wxs with this one?
Jon Tackabury
Thanks - this led me in the right direction. :)
Jon Tackabury
The power of SO ;)
CheGueVerra