cmake - Wix:如何创建超过 2GB 的 bundle.exe(外部文件)
问题描述
我有多个 MSI 文件,我正在使用 WIX 创建包 .exe。捆绑包开始超过 2GB。从这个答案我知道它不能在单个 .exe 文件中完成,因为刻录不支持大于 2GB 的容器。
是否可以使用(例如外部 .cab 文件)生成 .exe 安装程序?
.exe 文件小于 2GB,但它需要外部文件?
解决方案
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="Bundle Name" Version="1.0.0.0" Manufacturer="Company Inc." UpgradeCode="YOUR_GUID_HERE">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<MsiPackage SourceFile="stage\msi1.msi" Vital="yes" Visible="yes"/>
<MsiPackage SourceFile="stage\msi2.msi" Vital="yes" Visible="yes"/>
<!-- etc... -->
<!-- msi which will not be compressed: -->
<MsiPackage DownloadUrl="{0}" SourceFile="stage\external.msi" Vital="yes" Visible="yes" Compressed="no"/>
</Chain>
</Bundle>
</Wix>
这会产生一系列 msi1、msi2 文件(包含在 .exe 中)。
External.msi 文件不包含在 bundle 中,因此在运行 bundle 时需要将其放在 .exe 文件旁边。
推荐阅读
- c - C 语言:在文本文件中搜索“var”并将下一个字符串存储为值
- qt - 使用 fontconfig 支持为 Linux x86 构建 Qt
- swift - 如何实现符合具有关联类型的协议的泛型类?
- java - Project Reactor:doOnNext(或其他 doOnXXX)异步
- java - 正确的 lambda 过滤器实现
- python-3.x - 如何截取行数据的一部分并在 Python 中只保留前 3 位数字
- postgresql - "\unset ON_ERROR_STOP" 命令在 postgreSQL 中做了什么
- amazon-web-services - AWS 在 S3 存储桶中找到最大文件大小
- python - Keras 拟合 LSTM 在循环中变慢
- php - 如何使用带有多个复选框的 SELECT(sql)?