How to reduce the size of the application (EXE)?

xiaoxiao2021-03-06  48

How to reduce the size of the application (EXE)? In general, the exe file generated by Delphi is larger than its programming language. This is mainly due to the use of VCL (of course, VCL has many advantages!)

The following is a few ways to reduce the size of the EXE file:

01) Writing programs using KOL03) using KOL03) Use KOL03) Use the ACL (API Control Library) 05) Use Stripreloc06) Removing Work Debugging Information and TD3207) Write the allowed code 08 in DLL) Do not place the picture on the Form on the design, but load 09 when running 09) Use the compressed picture (using JPG without bmp) 10) Reduce attributes in the DFM file (see the link behind the link " Make your EXE file more light ") 11) Use the TstringList Replacement by ~ Lom ~ Use the minireg - Tregistry Replacement by Ben Hochstrasser

01) UPX is a free, lightweight, scalable, and high-performance executable /-cutting tool that supports a variety of different executable file formats. It can achieve very good compression ratio, and can decompress very quickly.

http://upx.sourceforge.net/

Aspack is a high-level WIN32 executable file compressor that reduces the size of 32-bit Windows programs up to 70%. (Aspack's compression ratio is 10-20%) of the ZIP file format industry.) Aspack makes Windows 95/98 / NT programs smaller than the library, which reduces the amount of network of the network. It can also protect procedures to a certain extent, which are also protected from those non-professional hackers. The compressed program is basically not performed at runtime.

http://www.aspack.com/aspack.htm

{********************************************************** **************}

02) Kol - (Key Object Library Key Objects Library) is an object library for Delphi development powerful 32-bit Windows graphical user interface applications. It makes the program smaller than using VCLs.

http://bonanzas.rinet.ru/

{********************************************************** **************}

03) Do not use VCL If you want to implement a small exe file, don't use VCL, Delphi fully allows you to implement Delphi 100% rich features by calling WinAPI functions.

Http://nonvcl.luckie-online.de/ http://www.erm.tu-cottbus.de/delphi/stuff/tutorials/nonvcl/index.html http://www.swissdelphicenter.ch/en/delphizeus http://www.tutorials.delphi-source.de/nonvcl/

{********************************************************** **************}

04)

ACL (API Control Library API Controls Library) is fully possible in the API writer, but I want to reach two purposes - write out thin programs and generate new control libraries, and create me when writing programs. Your own TwinControl and all standard Windows control classes.

Http://www.apress.ru/pages/bokovikov/delphi/index.html {******************************* ****************************************}

05) Stripreloc is a free (GPL license protocol) command line application that removes the extra weight of the Win32 PE format file (".Reloc") to reduce their size. Most compilers / link programs (including Delphi) written in the EXE file, but because the EXE file will never be redeployed, the section will only waste space.

http://www.jrsoftware.org/striprlc.php

{********************************************************** **************}

06) Remove debugging information

Debug information takes up part of space, for the final release, you can do not need this information. Delphi IDE Menu Project-Options-Compiler - Debugging and Project-Options - Linker - Exe and DLL Options Remove the following two, you can reduce the size of the file "include TD32 Debug Info" with "Build With Runtime Packages".

{********************************************************** **************}

08/09) For pictures

It is best not to add pictures to the form, especially big pictures, because Delphi has also compiled pictures to your executable, and increase the size of the exe file. It is recommended to load the picture in the way, in the way, in the way.

{********************************************************** **************}

10) How to make your EXE file lighter: http://www.undu.com/dn970301/00000064.htm

{********************************************************** **************}

11) TSTRINGLIST REPLACEMENT BY ~ LOM ~ miniReg - Tregistry Replacement

转载请注明原文地址:https://www.9cbs.com/read-85365.html

New Post(0)