Jump to content
Excelsior Forums
mhoeffner

Reducing install size for 3rd party installer

Recommended Posts

Hi.  I just upgraded to JET 4.5 and am running into some issues with the size of my distribution.  My original install size with JET 3.5 was 4.6 MB.  I ported everything to 4.5 which was pretty easy, but now my install size has ballooned to 24 MB when I stick with my original installer product (ClickTeam Install Creator).  If I switch to using JET's installer, the size drops from 24 MB to 14 MB.  The latter size is a whole lot more acceptable to me.  I'm too embarrassed to distribute the product at 20+ MB.  I imagine the JET installer is so much smaller because it can use Pack200.  I'd like to stick with Install Creator because it is a full-featured installer product that has some features that JET doesn't (such as opening a URL after an uninstall, registering ActiveX components, etc.).  Unfortunately it's not Java-centric so it can't use Pack200 internally.  I can have it call unpack200.exe though.

Any tips on how best to incorporate Pack200 pre-install?  What arguments does JETPack pass to pack200 and what files does it use it on other than rt.jar, jsse.jar, and dnsns.jar (which I see temporarily in the tmprtjarsdir directory)?  What other optimizations and/or compressions is JETPack using?  When I created my own rt.jar.pack.gz, my Install Creator install (that uses zlib and bzip2) got a lot smaller bit it was still 50% bigger than with JETPack.

Also, why does rt.jar change in size?  In the initial JDK distribution and JET profile, rt.jar is 37,757,974 bytes.  After packing and installing (unpacking) it, using the JET installer, it becomes 34,812,071 bytes.  If I use my installer product, it's 7 bytes smaller at 34,812,064 bytes.  I'm not too interested in the 7 byte difference.  I am interested however in why the installed rt.jar is 3 MB smaller than the initial rt.jar.

Thanks,

Mike

Share this post


Link to post
Share on other sites

Hello,

JetPackII uses "-g" ("--no-gzip") switch for pack200 to let installer to compress it better. And you are right -- it compresses rt.jar, jsse.jar and dnsns.jar (and charsets.jar if you choose additional locales). Other platform jars are signed and can not be compressed (pack200 does not recover jars byte-to-byte).

JetPackII uses LZMA (7z) algorithm for later compression that was specially tuned for the way JET produces executables. LZMA compresses 1.5 times better than zlib, so if your installer does not support LZMA, then you have no luck (it is known that NSIS use it). Possibly, it is easer for you to write install/uninstall callback DLLs for Excelsior Installer, where you will open URL, register ActiveX components etc.

If you use "SMART" build mode then platform classes are compiled with the application classes by JET. The compiled platform classes can be filtered out later from jars that JetPackII does. That is why rt.jar is smaller in installation than original rt.jar.

kit

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×