Re: Small executables

From: gswork (gswork_at_mailcity.com)
Date: 06/15/04


Date: 15 Jun 2004 01:53:05 -0700


"The Sphinx" <TheSphinx92@hotmail.com> wrote in message news:<cajs70$ne6$1@brutus.eur.nl>...
> Hi,
>
> Ok, I know that the size of executables isn't that important nowadays but it
> still surprises me how big executables, generated by Delphi, become. Is
> there a way to reduce this size? The only way I've found up to now is to
> limit the number of units in the uses clause. But you need some units
> anyway. And it seems to me that the linker includes all the procedures /
> functions etc of the unit in the executable, even those who are never
> called. Isn't there way to let the linker know that only those needed should
> be included?
> And what else is possible to reduce the size?

You can trim to some extent as othes have described, and upx can help
too.

if you really want a self contained windows GUI app and you want to
use Delphi then you can, AFAIK, write a 'pure' Win32API application
just as you might using C or C++, along with all the tangled headaches
that the API can give you.

When i want a Delphi app to be smaller i usually revert to Delphi 3
(my earliest 32 bit version) and use upx which doesn't appear to add
much time or stretch pc resources when running the .exe

Normally it doesn't really matter enough. IMO Delphi simply *is* the
best way to write GUI applications for Win32 and i forgive the .exe
size !



Relevant Pages

  • Re: Skybucks Island Evolver and the multi-warrior-battle-single-survivor challenge !
    ... and Delphi 2007 for latest compiling for win95 or so. ... little bit by using multiple harddisks... ... work distribution ammong multiple executables and maybe even harddisks... ... Text mode vs graphics mode... ...
    (rec.games.corewar)
  • Re: Modifieing windows.pas to use dynamic linking instead of static linking ?
    ... Delphi 2007 vs Delphi 2009. ... It makes the executables produced work much longer on all windows operating ... The problem must probably be with some windows api function call which calls ... I expect this little executable to crash... ...
    (alt.comp.lang.borland-delphi)
  • Re: ANN: Help & Manual 5 released
    ... Kevin Powick wrote: ... Do your Delphi created executables indicate they were created with ... Delphi and all the third party components used within? ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Locating procedures within an EXE
    ... >and i am not sure if the Export functions work in a EXE file.. ... > simply putting it, EXE from Delphi is mostly pure CPU code., the only ... Further to this - I actually suspect that Delphi executables contain a ... debug info, of TD32 debug info), then you should have huge amounts of ...
    (comp.lang.pascal.delphi.misc)
  • Re: Max forms
    ... delphi saves forms at the end of the exe file. ... to split the monolithic EXE into several executables, e.g. a core EXE and a ... Build your app with run-time packages as a test. ...
    (borland.public.delphi.language.objectpascal)