Log in

View Full Version : Size of Delphi exes..


riPPadoGG
December 24th, 2001, 16:26
HI ALL,

I have just learned Delphi..
but,
1. I found that a simple "hello world" app has 300k+ (in Delphi 5 default compiler settings). Can I reduce this? I wish I could use Delphi for key-genning.. (Currently I use Borland C++ or masm32 if code is rippable)

2.Does delphi has any external dll dependencies?(such as msvbvm for VB. I have seen Delphi control moving to vcl5.dll while tracing Delphi apps)

regards
doGG

IN ANY CASE CHEERS TO BORLAND..

stealthFIGHTER
December 24th, 2001, 19:34
Hello riPPadoGG,

I use D3. My compiled "hello world" program has < 200 kB. But when I want to make a small application (kg/patch), I don't use VCL. I code in non-VCL. After compilation the EXE size is +- 50 kB (uses Windows, Messages, SysUtils. And this file contains: 14 kB bitmap file and 1 kB icon file. So after packing my final program has about 30 kB.

sF

Solomon
December 24th, 2001, 22:01
hi riPPadoGG,

For small exes, I suggest you try KOL(http://gregor.mastak.ru/~kol/). It's a good partial alternative of VCL.

yes VCL(VCL*.DLL) can be dynamically linked to your exe or statically linked.

NikDH
December 29th, 2001, 07:13
Quote:
Originally posted by riPPadoGG
HI ALL,

...(Currently I use Borland C++ or masm32 if code is rippable)

2.Does delphi has any external dll dependencies?(such as msvbvm for VB. I have seen Delphi control moving to vcl5.dll while tracing Delphi apps)



But if i'm right even Borland C++ builder has external dll dipendencies too
Is it right ?

See ya
NikDH

riPPadoGG
January 1st, 2002, 03:22
Hi All...
I was on vacation to a beautiful place...Sorry for the delay...

Being a complete newbie towards Delphi...
How can I compile without VCL??

If I can make 50k Delphi keygens(unpacked), then it is COOOOL..

Btw, my Delphi version is 5..
regards and many thanks..

doGG

NikDH
January 1st, 2002, 19:44
Quote:
Originally posted by riPPadoGG
Hi All...
I was on vacation to a beautiful place...Sorry for the delay...

Being a complete newbie towards Delphi...
How can I compile without VCL??

If I can make 50k Delphi keygens(unpacked), then it is COOOOL..

Btw, my Delphi version is 5..
regards and many thanks..

doGG


Thats what i was saying before about Borland products way of working:
both C++ builder and Delphi have external dependencies
If u wanna have 50k keygens unpacked u've to pay the price
to have external vcl files installed on that pc
and thats an higher price than the mfc external dipendencies ones coz these last files r into the standard installation of
M$ Windows

See ya
NikDH

stealthFIGHTER
January 1st, 2002, 20:42
Quote:
Originally posted by NikDH


Thats what i was saying before about Borland products way of working:
both C++ builder and Delphi have external dependencies
If u wanna have 50k keygens unpacked u've to pay the price
to have external vcl files installed on that pc
and thats an higher price than the mfc external dipendencies ones coz these last files r into the standard installation of
M$ Windows

See ya
NikDH


Hmm, I don't think you have to install some vcl files.
I've compiled 20 kB Delphi project under Win98 and then I used it under Win2000 - no problem (I have no special vcl files installed under Win2000).

sF

NikDH
January 1st, 2002, 21:34
Quote:
Originally posted by stealthFIGHTER


Hmm, I don't think you have to install some vcl files.
I've compiled 20 kB Delphi project under Win98 and then I used it under Win2000 - no problem (I have no special vcl files installed under Win2000).

sF


Well i'm not very expert with delphi but i sometimes use Borland
C++ Builder and it requires its external dependencies 4 sure
Well i think its quite strange 20kB delphi code works well without its vcl but have u checked if on win2k machine there r some vcl files coz u've said there r no special vcl files but what does special mean?

See ya
NikDH

zacdac
January 1st, 2002, 21:40
G'day

Delphi uses standard libraries built by Borland which are complied with the executable when it is built.

The forms library is rather large and accounts for a large percentabe of the 300k hello world example.

Search for delphi examples using the win32 api calls for forms instead of the standard delphi forms library.

The win32 api can be a large learning curve but using it instead will mean the same hello world executable comes down from 300k to 10k.

Zac Dac

stealthFIGHTER
January 1st, 2002, 22:13
Quote:
Originally posted by NikDH


Well i'm not very expert with delphi but i sometimes use Borland
C++ Builder and it requires its external dependencies 4 sure
Well i think its quite strange 20kB delphi code works well without its vcl but have u checked if on win2k machine there r some vcl files coz u've said there r no special vcl files but what does special mean?

See ya
NikDH


Yeah, I have "clear" installation of Win2000 - no sw installed! And the little app still works!

Here is little example of non-VCL (WinAPI) application (it is quite big, because it contains a bmp logo [14 kB] and an icon [11 kB] and it is compiled with D6 ).

sF

riPPadoGG
January 2nd, 2002, 08:23
Hi SF..
Me TOTAL NEWBIEE..(in Delphi...) ie You are talking above me head..
What is the difference between VCL and non-VCL??
Can I have a piece of that source-code???

regards
doGG

zacdac
January 2nd, 2002, 08:49
Try this link...

h**p://www.delphi-resource.com/articles/raw_api.shtml

Zac Dac

Idcrisis
January 11th, 2002, 08:04
riPPadoGG,

Go to Project->Options->Packages and check the "Build with runtime packages" option.

You resultant exe will be then around 15K in size!

The runtime stuff to be given with the exe with be somethings like rtl50.bpl and vcl50.bpl.

These are somewhat like (in principle) msvcrt*.dll, msvbvm*.dll etc.

This single fact alone is the reason why so many ignorant people should stop saying Delphi and VB in the same breath and claim foolishly that both are RADs which produce bloated code. VB is not even flea on Delphi's back when it comes to RAD. VC++ is not one when it comes to optimised code.

Delphi and Builder and BC++ use the same compiler, different parsers, the compiler being superlative in its optimization, and jesus heals

riPPadoGG
January 11th, 2002, 10:30
Hi..
This is a late reply..
Thank you all.. The link was really helpfull.
I might finally code my next key-gen in Delphi... I am planning to rip the code..
regards and thanks to ALL.
HAVE A NICE TIME CRACKING...
doGG