views:

623

answers:

5

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.

+1  A: 

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.

Wimmel
A: 

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.

I was just using my common engineerical sense. If something could be compressed from 2M down to 600K using a WinZip - there's no way I can call it "compressed".

Just did what you said (thanks a lot!!) about extracting msi and checking the a cab size. It turned out the cab size (~500K) was not a culprit. Most of the MSI size was contributed by 2 huge .bmp's - 450K each. This is how I reference them in the WiX script:

is there any native to WiX way to compress -es ?

as indicated in my answer, Photoshop will take care of the bitmaps :)
sascha
+3  A: 

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.

Rob Mensching
+1  A: 

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

sascha
A: 

Check this url, I think you have same issue wix max compression

Almaz