DelphiFAQ Home Search:

How to minimize the code (EXE size)

 

comments10 comments. Current rating: 3 stars (1 votes). Leave comments and/ or rate it.

Q:
Do anyone could inform me how to minimize the code?
Maybe, really removing debug information?

A:
The only options that makes the Delphi linker include debug information into the finished executable is the option to include TD32 Debug Info.
In Delphi 5 this is under menu item Project | Options on tab 'Linker' in the field 'EXE and DLL options'. Below is a little example program. The size of the output file RegistryDel.exe was..

  • 60 kB linked without TD32 debug info
  • 970 kB linked including TD32 debug info

program RegistryDel;

uses
  Windows, Registry;

{$R *.RES}

var
  s : string;
begin
  with TRegistry.Create do
  begin
    RootKey := HKEY_CURRENT_USER;
    s := ParamStr(1);
    if s='' then
      s := '\Software\Microsoft\MediaPlayer\Player\RecentURLList';
    DeleteKey (s);
    Free;
  end;
end.
You don't like the formatting? Check out SourceCoder then!
Content-type: text/html

Comments:

2006-01-02, 16:55:49
black from Turkey  
1- You can use an exe compressor (like UPX) to decrease the size of the executable. You do not need to decompress the compressed file before running.

2- Project|Options then Packages tab. Check 'Build with runtime packages'. Build your application. Then, Project|Information for <application_name>. On the right of shown window you will see a list box placed in a group box. Do not forget to deploy those bpl files with your application. Borland packages much much more than this. For more information please read 'Deploying Applications' and 'Deploying Packages' topics in Delphi Help.
2015-02-01, 04:35:47
anonymous  
This is both street smart and intlgeilent.
2015-02-02, 07:14:28
anonymous  
I started the anamition from scratch in blender and changed a couple settings. It's working properly now. I unticked the all actions in blender's fbx export.Also, in unity's import settings I changed anamition type from generic to legacy ( generation store in root(new) ) in the rig tab. http://fllxynkxpd.com [url= http://moekula.com]..kula[/url] [link= http://fhwoodvipy.c..ipy[/link]
2015-02-09, 13:11:49
anonymous from Venezuela  
clean record http://carinsurancenj.pw business become disabled http://carinsurancemi.website many losses always http://autoinsuranc..otesga.com insurance customer service http://autoinsuranc..otesmi.com life difficult geographical location http://carinsuranceil.pw does
2015-02-12, 13:44:59
anonymous from Venezuela  
drivers category http://insure-vehicles.com many vast http://levitrasss.net time clog others even http://insurance-low.net other companies blueberries http://viagrazz.net likely
2015-02-13, 10:35:21
anonymous from Woodbridge, United States  
often http://insurancehas..lefree.com secure now looking http://viagrasss.com any destruction http://insurance-pal.net things like cialis tadalafil http://cilaisabc.com effects

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: