本文介绍了如何使用绑定路径创建WiX补丁?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用cmake / cpack和WiX来构建我的项目。

I'm using cmake/cpack to build my project with WiX.

cmake运行heat.exe(或类似方法),该文件会生成包含以下内容的files.wxs:我项目的文件格式如下:

cmake runs heat.exe (or something similar) which produces files.wxs that contains the files of my project in the following format:

我们假设在名为 bin的文件夹中有一个名为a.txt的文件。该项目在桌​​面上的NewFolder中构建。

We'll assume a single file named a.txt inside a folder named "bin". The project is built in NewFolder on the Desktop.

-告诉链接器在哪里输出 .wixout 文件。 
  • "/path/to/Some.wixobj" "/path/to/Another.wixobj" "/path/to/AndYetAnother.wixlib" - These are the compiled outputs of WiX source files, they may be either .wixobj files (generated through candle.exe) or .wixlib files (generated through lit.exe, a way of consolidating .wixobj files into one, shareable library).
  • -bf - This switch causes all of the files to be bound int the resulting .wixout file. This is what removes the need to have the exact folder structure on the target machine when building patches, because the files are carried with the .wixout file.
  • -xo - This switch tells the linker to output an XML representation of the MSI, instead of the actual MSI. This is required to use the -bf switch.
  • -out "/path/to/MyInstaller_v1.wixout" - This tells the linker where to output the .wixout file.

一旦您能够生成 .wixout 文件,则可以使用 torch.exe 命令可以修改为基于 .wixout 文件而不是 .wixpdb 文件及其关联的文件夹结构运行。以下是我如何修改您的 torch.exe 命令以使用 .wixout 文件而不是 .wixpdb 文件:

Once you have the capability of generating .wixout files, the torch.exe command can be modified to run based on .wixout files instead of .wixpdb files and their associated folder structures. The following is how I would modify your torch.exe command to use .wixout files as opposed to .wixpdb files:

torch.exe -p -xi路径/到/oldInstaller.wixout path / to / newInstaller.wixout -out path / to / patch.wixmst

所以,总的来说,我真的很喜欢这种方法,通常我会在构建过程中生成 .msi 和 .wixout 文件。这使我们可以将安装程序的各种内部版本/版本缓存为 .wixout 文件,然后在的各个版本之间创建补丁。 wixout 文件变得相对容易。

So, all in all I really like this approach, and generally I make my build process produce both an .msi and a .wixout file. This allows us to cache various builds/versions of our installer as .wixout files, and then the process of creating a patch between various versions of the .wixout files becomes relatively easy.

这篇关于如何使用绑定路径创建WiX补丁?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 15:47
查看更多