WiX:在一个非常大的应用程序中使用多个驾驶室 [英] WiX: Utilizing multiple cabs in a very large application

查看:28
本文介绍了WiX:在一个非常大的应用程序中使用多个驾驶室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始学习和使用 WiX,我的第一个真正的 WiX 项目是重新打包 Qt 的自定义配置.这是一个相当大的挑战,因为 Qt 项目非常庞大.

I've recently started learning and utilizing WiX, and my first true project with WiX is repackaging a custom configuration of Qt. It's been quite a challenge, as the Qt project is massive.

我在整个过程中设法以非常不雅的方式粉碎了我的方式,但最近在链接过程中遇到了障碍.我一直收到 Light.exe 错误LGHT0296",很可能是因为我创建的 CAB 远大于 2 GB.在尝试了最高压缩级别并且没有任何区别之后,剩下的唯一选择是将安装包拆分为多个 CAB 文件(旁注:返回的错误非常有助于告诉我什么课程行动尝试).

I've managed to smash my way very inelegantly through the process, but have recently reached a snag during linking. I've been receiving Light.exe error "LGHT0296", most likely because I was creating a CAB that was much greater than 2 GB. After trying for the highest compression level, and having that not make a difference, the only option left to me is to split the installation package into more than one CAB file (Side note: The error returned was extraordinarily helpful in telling me what courses of action to try).

无论如何,在创建多个 CAB 文件时,我发现自己有点不知所措.我不完全确定在这种情况下我应该做什么,并且我无法找到任何有用的文档或完成此拆分的示例.我这样做的最佳方式是什么?

Anyway, I've found myself a bit lost when it comes to creating multiple CAB files. I'm not entirely sure what I should do in this case, and I haven't been able to find any helpful documentation or examples where this splitting is done. What's the best way for me to go about doing this?

谢谢.

推荐答案

您只需像这样声明多个媒体元素:

You just declare multiple media elements like this:

  <Media Id='1' Cabinet='package1.cab' EmbedCab='no'/> 
  <Media Id='2' Cabinet='package2.cab' EmbedCab='no'/>

如果您的安装介质上有足够的空间,并且宁愿消除安装程序用于解包文件的时间和磁盘空间,那么您也可以像这样将解包的文件放在相对于 MSI 的某个文件夹中(您甚至可以创建一个 自行安装的 MSI方式):

If you have enough space on your installation media and would rather eliminate the time and disk space that the installer uses to unpackage files, then you can also put unpackaged files in some folder relative to the MSI like this (you can even create an MSI that installs itself that way):

  <Media Id='3' Layout="./somefolder" />

最后,您通过添加如下的 DiskId 属性来选择将每个文件放置在哪个媒体中:

Finally, you chose in which media to put each file by adding a DiskId attribute like this:

  <File Source="./somefile" DiskId="2" />

这篇关于WiX:在一个非常大的应用程序中使用多个驾驶室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆