WiX automatic file inclusion
Asked Answered
C

2

8

Is there a way to include files automatically based on directory structure?

I do not want to add each and every file name with file Id tab.

My build process create the required directory structure:

ProductName
           Directory1
           Directory2
           Directory3
           Directory4

How can I add those directories and their subdirectories?

Changteh answered 17/10, 2009 at 17:28 Comment(0)
O
6

No, not automatically. There are some tools however (called "tallow" for Wix" or "heat" for Wix3) that will scan a directory and create a Wix fragment (a separate WiX *.wxs file) for you. You can then compile that "filelist.wxs" file (or whatever you call it) into your WiX install.

See this page for the WiX3 heat documentation and there should also be a WiX2 equivalent for tallow on that site.

Marc

Obovate answered 17/10, 2009 at 19:49 Comment(0)
I
16

There is also Paraffin by John Robbins. It has some nice features:

My goal for PARAFFIN.EXE was that it would build immediately consumable WiX fragments with a minimum of fuss on your part. I wanted PARAFFIN.EXE to meet the following requirements for initially creating a .WXS fragment for a directory:

  • PARRAFIN.EXE created unique values to the Component, Directory, and File elements Id attribute so you do not have to worry about conflicts across large projects
  • PARAFIN.EXE creates a ComponentGroup element in the output file with all Component elements in the file automatically specified with ComponentRef values
  • You can optionally exclude specific file extensions from being added to the .WXS fragment
  • You can optionally exclude directories from inclusion by specifying a partial name
  • You can optionally specify if you want GUID values automatically generated for all components
  • You can optionally specify multiple files per Component (the default is one file per component)
  • You can optionally specify that you do not want to recurse directories other than the one specified
  • You can optionally specify an alias for the directory name when setting the File element - - Source attribute so you do not have hard coded drive and directory names in the output .WXS file

After you've created a .WXS fragment with PARAFFIN.EXE, you don't want to have to edit the fragment manually, so I wanted PARAFFIN.EXE to meet the following requirements for creating an updated output file from an existing .WXS fragment:

  • The updated output is written to a .PARAFFIN file so the original .WXS fragment is not disturbed
  • All command line options specified when creating the initial .WXS fragment are automatically set when updating a file created by PARAFFIN.EXE
  • Any new directories and files found are automatically added to the output file
  • Any directories and files that are no longer part of the directory structure are removed from the output file
Ingraft answered 23/10, 2009 at 7:16 Comment(1)
Link to Parrafin is broken - I am getting a 404 error. Do you know if that tool still exists?Autism
O
6

No, not automatically. There are some tools however (called "tallow" for Wix" or "heat" for Wix3) that will scan a directory and create a Wix fragment (a separate WiX *.wxs file) for you. You can then compile that "filelist.wxs" file (or whatever you call it) into your WiX install.

See this page for the WiX3 heat documentation and there should also be a WiX2 equivalent for tallow on that site.

Marc

Obovate answered 17/10, 2009 at 19:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.