Is it possible to include “source” files in a wixlib?

こ雲淡風輕ζ 提交于 2019-12-23 17:08:15

问题


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:

  • the version of the files to change between time of compilation of the wixlibs, and linking wixlibs into the MSI, and
  • Being specific to the environment used to build the wixlib (eg: if wixlib compilation and linking happened on different machines, both would need to have built the required binary files)

回答1:


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


来源:https://stackoverflow.com/questions/4710611/is-it-possible-to-include-source-files-in-a-wixlib

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!