Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Optimizing my EXE file

0 views
Skip to first unread message

Uri Hartmann

unread,
Jan 4, 1997, 3:00:00 AM1/4/97
to

Hello !

I made a very little program in delphi (the source code+ICO file+forms
are only 24KB) and after I compiled it the EXE file is 250KB.
I'm almost sure that this program can be much smaller.
So: how can I compress this EXE file ?

Uri Hartmann
send the answer please to my email too:hart...@netvision.net.il

Kings Lee

unread,
Jan 4, 1997, 3:00:00 AM1/4/97
to

I think if you are using 16-bit Delphi, you can try using a program from
PKWare. Or you can try turning off all debugging options and rebuild the
whole project.


Mark Lussier

unread,
Jan 4, 1997, 3:00:00 AM1/4/97
to hart...@netvision.net.il
Uri Hartmann wrote:

> I made a very little program in delphi (the source code+ICO file+forms
> are only 24KB) and after I compiled it the EXE file is 250KB.
> I'm almost sure that this program can be much smaller.
> So: how can I compress this EXE file ?

Remember that if you have any forms in your exe then you'll get at a minimum roughly 150-200k just from the VCL inclusion. If you want to make it any smaller in size you can do some of the following
 
1. Under Delphi 1 run the W8LOSS.EXE (\Delphi\Bin) against the EXE. This removed duplicate chains
2. Turn off all debugging and rebuild the entire project (not much savings at all in your case)
3. Look at something like Shrinker from Blink, Inc that compresses your exe and then expands it on the fly at runtine.
 
Mark
AppVsiion

David O'Rourke

unread,
Jan 14, 1997, 3:00:00 AM1/14/97
to

I'm quite new to delphi, but I believe that if you're that desperate, you
can make a new
VCL, strip out every component that you don't use and recompile using that.
You can have several builds of VCL with different contents and just load
whichever is appropriate to your current project.

Of course this will only work if Delphi builds the entire VCL into every
executable rather than just the functionality required to resolve all of
the links.

Uri Hartmann <hart...@netvision.net.il> wrote in article
<32ce30b5...@news.netvision.net.il>...
> Hello !

Trepalium

unread,
Jan 19, 1997, 3:00:00 AM1/19/97
to

On 14 Jan 1997 09:46:04 GMT, "David O'Rourke" <dav...@unidec.co.uk>
wrote:

>VCL, strip out every component that you don't use and recompile using that.
>You can have several builds of VCL with different contents and just load
>whichever is appropriate to your current project.

Uhh, you don't want to even TRY to do that. The object heirarcy is
very bizzare, and usually confusing. Don't do it, it'd take you
months/years to finish!!! The thing that you should notice as you
further develop is that the file size doesn't increase very rapidly
after that first initial jump... Also make sure that a tdstrp32
[exename] doesn't decrease the filesize.

>Of course this will only work if Delphi builds the entire VCL into every
>executable rather than just the functionality required to resolve all of
>the links.

Unfortunately, I don't believe the Delphi linker properly strips out
the dead code if its part of an object that is either directly or
indirectly accessed in you program.

trepalium

David O'Rourke

unread,
Jan 29, 1997, 3:00:00 AM1/29/97
to

Trepalium <Trep...@null.net> wrote

> Uhh, you don't want to even TRY to do that. The object heirarcy is
> very bizzare, and usually confusing. Don't do it, it'd take you
> months/years to finish!!! The thing that you should notice as you
> further develop is that the file size doesn't increase very rapidly
> after that first initial jump... Also make sure that a tdstrp32
> [exename] doesn't decrease the filesize.
>

If it's such a dumb idea, then why did borland make it so easy to attempt?
You just go to the Component Menu, Install Option and remove the modules
that you don't want.
You can copy the .dcl files to wherever you want to keep them, and Open
Library lets you choose the one you want.

I've never tried it but it can't be that bad surely.

David


David A. Leon

unread,
Feb 7, 1997, 3:00:00 AM2/7/97
to
What?  Delphi's compiler has always stripped out the code for all un-used methods and properties.  This is no Visual Basic interpreter we're talking about. 

David A. Leon

unread,
Feb 7, 1997, 3:00:00 AM2/7/97
to

Angela Howell

unread,
Feb 21, 1997, 3:00:00 AM2/21/97
to

When you guys reply to questions regarding the Borland product Delphi,
please edit out the alt.online-service.delphi newsgroup.
"Online-Service" does not mean "Online-Technical-Support." All
questions asked there are referred to your groups. We'd hope you'd do
the same.

On 29 Jan 1997 10:00:33 GMT, "David O'Rourke" <dav...@unidec.co.uk>
wrote:

>Trepalium <Trep...@null.net> wrote

0 new messages