Tuesday, April 10, 2007

Tighter VW .exe distributions

Here is an alternate procedure that should produce smaller .exe files when delivering a VisualWorks application as a single .exe file.

  1. Make a copy of the VM.
  2. Add an uncompressed image file to it as a resource (type and name 332 as usual).
  3. Save the resulting .exe file.
  4. Pack it with upx -9.
I am happy to report I tested this in Windows and it works just fine :).

By the way, upx is licensed under the GPL.


Carl Gundel said...

I suppose that's useful for some cases, but of course it is only a band aid. We need to be able to make the image smaller without compressing it to begin with.

STS 2007 said...


Of course, if you start with a smaller image then you get even better results :).

I think the issue of compressed distributions and tiny images are separate problems though. Even with a small image built in a bottom-up fashion, it will shrink when compressed. The advantage of UPX is that is also compresses the VM and leaves the whole thing still executable --- that, coupled with its better compression and super fast decompression speed, is what gives it an advantage space wise.