Hi, if your wanting a quick and easy way to size down your exe, the best and simplist has to be ASPACK, all you do is open ASPack and load the exe into the program and compress, and thats it your exe is now almost 50% its normal size.
but with all exe compressions each time you execute a command it has to pass though the memory like 5-8 times.
but you got 2 way up the odds, if you don't compress your Apps, people will ResHaX your Program :( and change your programes layout and stuff, which is a downer, so compress it, is a must for that.
you could learn another lang in delphi like API, take ya like 2-4 months of solid learning and then you will get some small exe sizes.
but if all you want is to make the exe smaller and stop people from ResHaxing then ASPack is the way 2 go, takes 5seconds 2 compress a exe by 50%, easier than learning another part of the lang just for file size.
http://www.aspack.com/
Hope this helps some
Main Topics
Browse All Topics





by: rllibbyPosted on 2004-01-16 at 15:11:34ID: 10133832
Yes, but it will all depend on:
1.) How much effort you are willing to put into it
2.) If you don't mind runtime baggage....
3.) If you don't mind learning new things
4.) If you don't mind using other tools after the exe is built
First, you should realize if your looking at a VB/VC app (with a window and controls) that is 20 K in size, then it *most* likely requires run-time dll's in order for the app to run.
For starters, the biggest (one of anyways) size offender in Delphi is the forms unit, which accounts for appx 200K (varies by Delphi version). SysUtils and Classes adds another appx 60K, the Controls unit, your code, the base 16K required by the System unit, etc... you get the picture I'm sure. It all adds up. So your choices for Delphi?
1.) Use runtime packages. But this also means the runtime packages need to be available with your application. Small exe, but baggage drag-along requirements. (similar to the VB/VC projects)
2.) Write the code using straight api's. This is do-able for very small apps, but gets messy pretty quick when dealing with larger apps. Does make some VERY small exe's though. Downsize is that it requires coding experience with writing a windows main function, message handling, etc. No drag-drop coding.
3.) Use an exe-packer on the .exe file after the project has been built. Requires additional steps when compiling, the tools are usually not free (there are free ones though). Produces average size reduction.
4.) Strip the rellocation table from the exe after it has been built. (believe there was even one written in Delphi). Only provides a modest size reduction. (5-20K).
5.) Use another code library, say KOL for example. Downside is the rework that can be involved, plus the extra learning curve.
---
Or, just leave it as it is, and realize that you don't have to distribute anything but your executable.
Hope this helps,
Russell