[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Reduce executable size

Posted on 1999-10-27
11
Medium Priority
?
240 Views
Last Modified: 2010-04-04
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?
0
Comment
Question by:feup
11 Comments
 
LVL 6

Expert Comment

by:edey
ID: 2163726
if it's a small app, you may want to try rewriting it without the vcl.

GL
Mike
0
 

Author Comment

by:feup
ID: 2163732
I've tried, but it requested me the VCL.
0
 
LVL 6

Expert Comment

by:edey
ID: 2163764
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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:feup
ID: 2163790
ops... that's not acceptable :)))

but thanks anyway.
0
 
LVL 6

Accepted Solution

by:
DrDelphi earned 200 total points
ID: 2163839
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
 
LVL 5

Expert Comment

by:Gwena
ID: 2163983
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
 
LVL 6

Expert Comment

by:edey
ID: 2164347
must admit, Gwena, them's some tasty links :)


GL
Mike
0
 
LVL 15

Expert Comment

by:simonet
ID: 2165648
Following...®
0
 
LVL 1

Expert Comment

by:yk030299
ID: 2167798
listen
0
 

Expert Comment

by:RayGeide
ID: 2170805
 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
 

Author Comment

by:feup
ID: 2171295
thanks.

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


Thanks you all.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…
Suggested Courses

640 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question