I have an app that is released in two flavours for reasons that are not relevant here. They differ in very small ways, mainly in "badging", the odd string, etc.
The two builds each consist of:
- the application execu开发者_运维百科table
- the app help CHM file
- a separate smaller CHM help file for the installer
- a PDF version of the application help
- a "readme.txt"
- an example batch file
As I would expect, the file sizes in each of two builds are almost identical. The total size of the above files is aound 13 Mb but the difference in file sizes between the two flavours is only 1900 bytes or so.
The installer EXEs generated by InnoSetup are different in size by 42.6k!
What would cause this? I have a nagging fear that something has been "left out" of one of the installables, though they seem to check out OK. Because IS doesn't provide any detailed info about how it builds the installer pack I have no way of tracking this anomaly down.
Any ideas, anyone?
It's probably because InnoSetup compresses the files. Small differences in the files can lead to quite large differences in how they end up being compressed.
Try zipping up your two versions, and comparing the sizes of the zip files - I bet they differ by more than your 1900 bytes.
Another option is to use http://innounp.sourceforge.net/ to unpack the installers, and compare the unpacked files.
@RichieHindle hit on the reason for the differences. Here are the details of Zip archives produced from the files that were being packed into the installable.
Flavour 1 of the installers files zipped up looked like this:
And Flavour 2:
so the application EXE (the first file in the archive) had identical sizes, yet produced compressed files that were different in size by 38k!
精彩评论