How to compress the generated file

Jan 17, 2010 at 3:03 AM

The generated setup.exe file is huge. It seems like there is no compression here or am I missing something?

Jan 17, 2010 at 3:09 PM

Embedding files (CABing) will compress them. But if you're compressing MSIs, there's not much more that you can do. Compare a simple zip of those files that you're embedding and the setup.exe generated by InstallerLinker. How different in size are they?

Jan 18, 2010 at 2:22 AM

I zipped my MSI and support files, it's around 13M but the result setup.exe is 17M+. I know either some issues with the compression or dotnetinstaller adds a lot size

Jan 18, 2010 at 2:40 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jan 18, 2010 at 2:41 AM

Can you please list the contents of the setup? File names and sizes, as well as the output from InstallerLinker. Thx.

Jan 18, 2010 at 2:55 AM
Embedded files are:
Elegant.Ui.Common.dll                                                            1632kb
Elegant.Ui.Common.Theme.Office2010TP.dll                         728kb
Elegant.Ui.Ribbon.dll                                                               472kb
Elegant.Ui.Ribbon.Theme.Office2010TP.dll                            968kb
GacInstaller.exe                                                                       14kb
itextsharp.dll                                                                            3608kb
SourceGrid.dll                                                                           528kb
MSI file:
iPDF.Pro.msi                                                                            11394kb ( I also embedded this msi )
All these files' zipped size is 13647kb
But the generated setup.exe is 17512kb
Do you need my configuration file?
Jan 18, 2010 at 2:58 AM

I made four setup.exe and each of them added about 3M - 4M size compared to the zipped files. It's just too big a footprint.

Jan 18, 2010 at 3:04 AM

Zip compression is probably a lot better than CAB, but that doesn't explain everything. I'll check it out this week. Feel free to play with the source in the meantime, maybe you'll find something obvious.

To start, dotNetInstaller is ~1.3megs, it's statically linked with the CRT, so I can't make it much smaller. It has 400KB of MSLU for Windows 98 support which I should (will) make optional. The rest is the CABs that are embedded and there shouldn't be any other overhead.

Jan 18, 2010 at 3:11 AM

Well explained. Thank you for your quick response. If the sales of my little shareware is good enough, I would probably thank you for your fantastic piece of software by donating a few bucks( probably less than 100$ though cause I'm not that rich, :) ). Anyway, thank you!

Jan 18, 2010 at 3:13 AM

I hope your shareware sells well. Please donate the money to your favorite charity though, on behalf of everyone who contributed to dotNetInstaller.

Jan 18, 2010 at 3:24 AM
Ok. I already donate $15 to American Red Cross for the Haiti people ( Not much, but it's pretty much for me. I'm jobless now and I'm in debt ). If my shareware sells well, I will donate more on your behalf - the people who made this great tool. 
Jan 18, 2010 at 9:00 PM

I looked into this, and I am not seeing this behavior. Are you sure you're not compressing anything twice? Would it be possible for you to put your resulting setup.exe somewhere online? Thx.

Jan 19, 2010 at 3:44 AM

I'll check that. One more thing, if I added a MSI component, do I have to embed the msi file or it's automatically embedded?

Jan 19, 2010 at 11:31 PM

There's no automatic embedding. The semantics of automatic embedding changed in 1.6, so you have to explicitly add EmbedFile or EmbedFolder nodes.

Jan 20, 2010 at 12:39 AM
Then I don't know what's wrong? I double checked yesterday. Nothing seems wrong. Do I need to send you
the configuration file?

From: [email removed]
Sent: Tuesday, January 19, 2010 04:31 PM
To: [email removed]
Subject: Re: How to compress the generated file [dotnetinstaller:81065]

From: dblock

There's no automatic embedding. The semantics of automatic embedding changed in 1.6, so you have to explicitly add EmbedFile or EmbedFolder nodes.

Jan 20, 2010 at 12:50 AM

Can you upload the generated setup.exe somewhere please? Thx.

Jan 20, 2010 at 1:13 AM

Ok, I'll do that. Please tell me your email address, I'll upload the file to skydrive and send you a link to your mail box.

Jan 20, 2010 at 1:18 AM

dblock at dblock dot org

Jan 20, 2010 at 2:50 PM

It solved my problem. You are the legend!!! Thank you very much for your time, energy and great tool!!!!

Jan 20, 2010 at 2:57 PM

Closing the thread. The problem was a double-embedded file. Running setup.exe /DisplayCab helped resolve which one was dup-ed.