Archive: nsis/compression/upx/bzip2


nsis/compression/upx/bzip2
Hey All,

I'm just wondering why nsis installers can't be compressed with upx? I realize you can compress just the header, but with:

SetCompress off
SetDatablockOptimize off

upx should be able compress it right? Well it gives an "Uncompressable exception". Any ideas why?

On another note, it's probably been discussed before, but are there any plans to move to a different compression algorithm? Bzip2 is released under a BSD-like license and does much better than gzip in 99% of cases. Another thought was to use the UPX compression, which is available under GPL. The upx code would probably do better with binaries, but bzip2 does an excellent job with text.

-zz


It actually does have and use UPX compression. If you look at the makensis.nsi file, there are some lines of code that show this. I cannot find it, however, because I am at another computer. But I'm sure of it. They have UPX compression.

-DJ


That's only for the installer's header, I meant for compressing the whole thing.


Sorry


I think the reason that UPX cannot compress the NSIS exe files is that the makensis simply adds the compressed data +code+strings on the end of the file and thus they are not paryt of the exe image that is mapped into memory by windows according to the exe image. If NSIS was rewritten so that the install stuff was in the resource section of the exe, it would work.. but, an installer of 500 mb (for example) would take 500mb of memory (like PIMP).