WiX: Utilizing multiple cabs in a very large application

和自甴很熟 提交于 2020-12-30 14:50:38

问题


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.

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).

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?

Thanks.


回答1:


You just declare multiple media elements like this:

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

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" />

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

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


来源:https://stackoverflow.com/questions/2290647/wix-utilizing-multiple-cabs-in-a-very-large-application

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