Reduce executable size

How can I reduce the executable size (and still include the librarys, since in Project/Options/Packages I was able to reduce it but it required me VCL40.BPL.)

I also used an executable packer but still the executable is too big?

Any ideas?
feupAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

edeyCommented:
if it's a small app, you may want to try rewriting it without the vcl.

GL
Mike
0
feupAuthor Commented:
I've tried, but it requested me the VCL.
0
edeyCommented:
yes, and it's a huge pain in the but to do it all api, but it's the only way to get away without VCL40.BPL.  This mean, unfortunatly, that you can't use any of the vcl objects, not even TForm.

GL
Mike
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

feupAuthor Commented:
ops... that's not acceptable :)))

but thanks anyway.
0
DrDelphiCommented:
Another thing that you can and definitely SHOULD do is to turn off the compile with debug information. This can really bloat an otherwise slim application. Also, if you are using any resources, such as bitmaps,wav's etc... you might want to look at compiling them separately as resource files. This way they don't bog down the application when not being used.

 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GwenaCommented:
Go and look here
http://members.xoom.com/_XOOM/mr_bonanzas/xclgo.htm

This guy is really into making small exe's with delphi and has a small freeware version of the vcl called xcl


Get UPX ... it's the best exe compressor I have found...makes smaller exe's than shrinker or aspack...and it's free

http://wildsau.idv.uni-linz.ac.at/mfx/upx.html

hint! ->  use the --best setting in UPX for smallest exe's
it is a bit slow but worth the wait.


Remember that if you have Delphi2 and can compile your project with it instead of newer versions that it will make a considerably smaller exe... I have 2,3 and now 5 and ver
2 is the one to use for tiny exe's :-)  and 3 is nearly as good...
I find that exe's are about 25% or more larger using version 5



0
edeyCommented:
must admit, Gwena, them's some tasty links :)


GL
Mike
0
simonetCommented:
Following...®
0
yk030299Commented:
listen
0
RayGeideCommented:
 If you have a small program, you can try removing items from the Uses section one at a time.  Remove one, for example, Classes, and recompile or run the project.  If it doesn't show a compile error, then remove another one.  If you get a compile error, you can either put that one back or figure out how else to do the command that is causing the error using API or other commands that do not need that Uses item.  Looking in the Source of VCL may help to see how the VCL accomplishes it.
  Be sure to do this for the program file not just the units.
  I have done this for small exe's and come up with an 50kb exe (it didn't have a form on it).

Regards,
Ray
0
feupAuthor Commented:
thanks.

Not exactly the result I meant, but all you guys allowed me to reduce the executable 50% size


Thanks you all.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.