PDA

View Full Version : Want a nice tight EXE?



Xorcist
07-11-2002, 09:58 PM
Give ASPack (http://www.aspack.com/aspack.htm) a try. I've found it reduces the size of most my apps and games well over 50%, without any horrendous side effects! Yeah it's gonna cost you about $30 for a license if you distribute freeware, and $50 if you plan to sell your goods. But hey it's helped me fit more than one of my "too big for a diskette" applications onto a diskette.

Alimonster
07-11-2002, 10:00 PM
If you're cheap, there's always UPX (http://upx.sourceforge.net) too!

Xorcist
07-11-2002, 10:07 PM
Cheap is good too. :)

TheLion
07-11-2002, 10:20 PM
Cheap is good! :)

Viro
14-11-2002, 01:53 PM
I don't know about hte latest versions of UPX, but the old versions used to cause the runtime memory footprint of your application to grow tremendously. I've seen my applications' memory foot print increase anywhere from 30% to 1000% (yes, one thousand).

Me thinks an exe packer may not be a good idea.

TheLion
14-11-2002, 01:56 PM
Exe packers are indeed not the best way to accomplish a nice tight exe, but if you have to make a really small application and no-one asks about the memory usage, well than its a nice idea...

But they all use up more memory than your application would have without the packer... Thats the downside ...

LiquidIce
02-02-2003, 07:04 PM
When I use UPX it also makes the exe code much harder to hex.

My game only increases the VM and mem by only about 1mb .. not a lot

ggs
07-05-2003, 09:01 PM
Under windows, exe packers defeat several memory saving technigues windows uses.

Normally there is only 1 copy of code in memory, regardless of how many instances there are. When a memory page of code is needed, it is read out of the file, when a code page is discarded it just gets dropped completely and doesnt get swapped out. And then re-read out of the executable when needed (which will be in the file cache normally).

But an exe packer, writes its own code pages. Windows then has to keep the entire thing in memory at once, for each instance of the code. And when a code page is discarded, it must be swapped into the virtual memory to preseve it.

Not to mention it will slow the application start up if you have a moderate sized exe (several megabytes)

Harry Hunt
08-05-2003, 03:16 AM
Best way to get a small exe is not to use SyUtils and to create the Form manually using windows functions.

Sly
08-05-2003, 10:55 PM
The best I have done is 14KB for an OpenGL application without using an exe packer. Just used Win32API, no SysUtils, no Forms, just the bare minimum.

Clootie
09-05-2003, 12:04 PM
Same here for DirectX - with Delphi7 compiler I've got 16Kb sized exe that renders something using Direct3D (previous Delphi versions often produce smaller sized exe's).