wixwix3wixlib

Is it possible to include "source" files in a wixlib?


Is it possible to include "source" files in a wixlib?

I have a number of c++ solutions, each containing a project or projects, and a wixlib, with a fragment containing entries such as:

<File Id="MY_ID" KeyPath="yes" Source="$(var.my_path)\foo.exe" />

I would like to collect "foo.exe" and include it in the wixlib, then create a WiX project that links together several such wixlibs and produces an MSI.

The reading I have done seems to suggest WiX3 and later supports this, and the technique is preferred to using merge modules.

Currently, I use an environment variable describing the path to the binary files, which gets used by light.exe at the time of linking to locate the files. However, it has the following disadvantages:


Solution

  • I don't have much experience with wixlib myself, but isn't it what -bf switch of lit.exe for? From lit.exe help text:

       -bf      bind files into the library file