Exe, resource and code reduction

How can I reduce resources inside my application? I tried a few tricks I reduced and rewritten the code, reduced the line number, Reduce comments, Compressed the last EXE, but this is not the way I want, Improve variable type casting, Remove ICONs, BMP, JPG, from the application I need my applications were as small as possible on the final exe and in the total resource consumption. Any ideas, any good articles on this subject Thanks

+5
source share
13 answers

Place any images that the program uses several times in the lists of images or TGraphic components, and place them in the data module. Link all of your components using these glyphs into image lists. If you use the Object Inspector to add the same glyph to multiple components, you will get multiple copies, increasing the load time and the size of the executable and working set.

+8
source

How to disable debugging information in project parameters:

  • no debugging information
  • no runtime checks
  • reduce the number of external devices, if possible.

But debugging information can be a major killer.

+10
source

,

(, Amazon S3)

+9

( , PE-, DLL), relocation :

!

Delphi :

// Remove relocation table (generates smaller executables) :
// (See http://hallvards.blogspot.com/2006/09/hack12-create-smaller-exe-files.html)
{$SetPEFlags 1} // 1 = Windows.IMAGE_FILE_RELOCS_STRIPPED

!

+7

, Delphi . () :

procedure TMainForm.OptionDialog(Sender: TObject);
var
  Dlg: TOptionDialog;
begin
  Dlg := TOptionDialog.Create(nil);
  try
    // prepare dialog
    if Dlg.ShowModal = mrOK then begin
      // apply changed settings
    end;
  finally
    Dlg.Free;
  end;
end;

, .

+4

VCL KOL MCK: http://kolmck.net/

, exe .

+4

, . ?

...

.EXE ? ...

  • . .EXE, .bpls.

, ? ...

  • - .

? ...

  • Inno Setup
  • ?

PLUS PACKAGES/DLLS ? ...

  • UPX
+4
Project -> Options -> Compiler:
===============================
Optimization ON
Debug Information OFF
Local Symbols OFF
Reference Info OFF
Use debug DCUs OFF

Project -> Options -> Packages:
===============================
Build with runtime packages ON (but you will have to distribute your BPLs!)
Note to non-delphi folks:
a BPL is just a DLL, but with magic Delphi dust to make it easier to use.

.

+3

? 640 .

, EXE , . . (, ) DLL. , .

+2

, EXE, Delphi.

+2

UPX exe . , 2. , , .

+1
0

UPX ASPack , . Kaspersky !

0

All Articles