2
votes

I’m writing an MSI for using WiX 3.0 and I’m trying to figure out how to make it include all but some files from a directory without having to manually specify each and every attribute. Similar to a dynamic pickup in installshield.

An old installer I’m looking at for reference (which uses WiX 2.0) does the following:

  1. A makefile to call a script that will copy all the necessary files to a separate directory structure that emulates how the final product should be installed.
  2. another script to insert the attributes for each of the files in this temp folder to a partially completed wxs file.
  3. WiX runs

I want to avoid this step and was wondering if there were some commands or pre-processor directives to achieve this WiX itself?

Also the 1st step above spits out some generated files (from a tool) which is then included into the wxs file. Is there a way I can emulate that as well?

2
looking for the same, but you have to manually add all files :(juFo

2 Answers

7
votes

You need to specify each file.

However, you can use Heat.exe to automatically generate a wxs file you can include as part of your build process.

0
votes

I cheaped out with a non-solution, and zipped up the directory and it's files in the build script. The advantage of your current method is that MSI is aware of the files and they could potentially be key files (and thus patched/upgraded and/or repaired).

I'd look into saschabeaumont's suggestion about using heat. clearly a better solution