简体   繁体   中英

WiX generated MSI is not compressed

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.

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.

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.

检查这个网址,我认为你有同样的问题wix max compression

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM