WiX 生成的 MSI 未压缩
我使用WiX3生成MSI安装包。 我已在
和
元素中指定了压缩标志:
<Package InstallerVersion="200" Compressed="yes"/>
<Media Id="1" Cabinet="MySetup.cab" EmbedCab="yes" CompressionLevel="high" />
但生成的 MSI 根本未压缩 - WinZip 将其从 2M 向下压缩至 600K。
我错过了什么吗?
顺便说一句,我正在使用 VS2008。
I use WiX3 to generate MSI installation package.
I have specified comression flag on in both the <Package>
and <Media>
elements:
<Package InstallerVersion="200" Compressed="yes"/>
<Media Id="1" Cabinet="MySetup.cab" EmbedCab="yes" CompressionLevel="high" />
but the resulting MSI is not compressed at all - WinZip compressed it from 2M down to 600K.
Am I missing something?
I am using VS2008 btw.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
MSI 文件不是 OLE 结构化存储文件。 它们无法被压缩并且 Windows Installer 仍然能够读取它们。 但是,许多内容都存储在 MSI 文件中(例如 UI 图形和 CustomAction DLL 以及快捷方式图标),因此您应该注意要放入 MSI 中的内容。
WiX 工具集中没有任何东西可以分析您将它们放入 MSI 中并压缩它们的每个内容(当然,cab 文件除外,因为 Windows Installer 期望压缩该文件)。
老实说,Windows Installer 本身并不支持当今最好的压缩。 要做的一件事是构建包并使用引导程序分发压缩内容并在将其传递到 Windows Installer 之前解压缩。 这就是 WiX v3.5 的刻录引导程序的计划。
MSI files are not OLE Structured Storage files. They cannot be compressed and have the Windows Installer still be able to read them. However, many things are stored in the MSI file (such as your UI graphics and CustomAction DLLs and Shortcut Icons) so you should be conscious of the content you are putting into the MSI.
There is nothing in the WiX toolset to analyze each of the things you are putting them in the MSI and compressing them (except the cab file, of course since that is expected by the Windows Installer to be compressed).
Honestly, the Windows Installer does not natively support the best compression of today. One thing to do is to build the package and use a bootstrapper distributes compressed content and uncompresses before passing it to the Windows Installer. That is the plan for WiX v3.5's burn bootstrapper.
你的问题中缺少一些东西。 但你怎么知道它没有被压缩。 如果 Winzip 可以进一步压缩它,并不总是意味着它没有被压缩。 您可以使用 7-zip 来调查生成的 msi 文件。 里面应该有一个驾驶室,把它抽出来,看看减压前后的尺寸。
There is something missing in your question. But how do you know it is not compressed. If Winzip can compress it further, it does not always mean it is not compressed. You can use 7-zip to investigate the resulting msi file. There should be a cab inside, extract it, and look at the size before and after decompressing.
对于巨大的位图,我建议在Photoshop中对其进行编辑以缩小它们。 通过将两个 600K 位图更改为索引调色板(图像 > 模式 > 索引),然后将生成的文件保存为 8 位压缩 BMP,我设法将两个 600K 位图降至约 35k。
试一试 ;)
In regards to the huge bitmaps, I suggest editing them in photoshop to shrink them down. I managed to get two 600K bitmaps down to ~35k each by changing them to an indexed color pallete (Image > Mode > Indexed) and then saving the resulting file as a 8-bit compressed BMP.
Give it a shot ;)