【发布时间】:2020-03-18 11:40:06
【问题描述】:
我有多个 MSI 文件,我正在使用 WIX 创建 bundle .exe。捆绑包开始超过 2GB。从this answer 我了解到它不能在单个 .exe 文件中完成,因为刻录不支持大于 2GB 的容器。
是否可以使用(例如外部 .cab 文件)生成 .exe 安装程序?
.exe 文件小于 2GB,但需要外部文件?
【问题讨论】:
我有多个 MSI 文件,我正在使用 WIX 创建 bundle .exe。捆绑包开始超过 2GB。从this answer 我了解到它不能在单个 .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 文件旁边。
【讨论】: