[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Delphi's EXE large file size

Posted on 2001-09-12
11
Medium Priority
?
406 Views
Last Modified: 2010-04-04
Hi,
I just started Delphi and compared to Visual Basic and Visual C++ the file size is huge. If I compile a file will I be able to execute it on any computer without any dependancy files. Is this why the file size is so big.

Also if I use activex controls would I need to include them in the setup file of the finished app..
0
Comment
Question by:adam8
11 Comments
 
LVL 1

Author Comment

by:adam8
ID: 6478294
Is there a way to make the file sizes smaller?


PS. I am using Delphi 5 Enterprise with Update Pack 1 installed.
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6478314
Two ways:

1. go to Project -> Options -> Packages
   check Build with Runtime packages

   You will now notice that your Delphi app is *very* small... 50KB perhaps. The downside of this is that you would now have to distribute the necessary .bpl files to your client computers as well. As for VB and VC, M$ already includes the runtime files in the OS... well, that's Microsoft for you...

2. pack the EXE file using an EXE compressor

   There are many executable compressors available, the more notable one would be UPX (Ultimate Packer for eXecutables). What the compressor does is, it will compress your EXE file, and when you execute the compressed EXE file, it will decompress itself in memory.

check out UPX at http://upx.sourceforge.net




DragonSlayer
0
 
LVL 5

Expert Comment

by:Gwena
ID: 6478325
You can get exe's down to as low as 14kb if you use the KOL library and the free exe compressor UPX
look at a file named 'file-combiner-util' on my site.. it's a 20kb delphi app that uses KOL... this app needs no runtime file to run. My site is
http://delphi.does.it

Kol is at http://gregor.mastak.ru/~kol/
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 34

Expert Comment

by:Slick812
ID: 6478373
why so big? Since you have the Delphi 5 Enterprise edition you can look at the source code for the Forms.pas unit, which is what adds many of those Kbs to a project. I have come to beleive that delphi wanted to make their apps "Strong" and "Reliable", not prone to crash or failure. So there may be alot of of unused code included in their apps for safety, just in case you make calls to create controls (there are many) at runtime and other reasons. I think the delphi compiler and linker are very good, so if you want a smaller app you can create one that does not include unneeded code, by codeing a windows API program with the .dpr file. However you give up the Rapid Application Developement conveince and have to hand code all the windows message handling and window creation options, Very time consuming. There is a web site that has the Key Objects Library, which will integrate into delphi and let you make smaller apps, , , , at
http://bonanzas0.tripod.com/
- - - - - - - - - - - - - - -
but my point of view is that apps are now easily a megabyte (VB with the librarys), and puters have 64 megs or more of memory, so the file size don't much matter like it used to with 1 gig hard drives. So let the Kbs Roll !. . . And I use UPX myself
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6478511
Hello

  When you create sample project with VB, it's take around 16kb, but when you create the same project with delphi, it will take around 270KB, but in delphi you don't need to distrubte any RUN TIME LIBARAY, but in VB you need to distrubte them, for VB 6 it's called msvbvm60.dll size around 1.3MB this file not found in the system your vb project will not compile.

 if you use RAW API to develop appication your exe file will be very small 15-30kb and don't need any files to distrubte with, but it's hard way
0
 

Expert Comment

by:DelFreak
ID: 6478605
Listening...
0
 
LVL 1

Author Comment

by:adam8
ID: 6479299
If I use a 3rd party activex control in Delphi will I need to distribute that file with the setup package, or will it include itself in the file?
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6479309
if you are using activex, you have to distruabte it with ur application, but you will find native delphi component for every thing you need, and that's doesn't need to distrbute them with ur application, also it's better to find the VCL component than to use ActiveX with ur application
0
 
LVL 1

Author Comment

by:adam8
ID: 6479390
whats VCL and can it be compiled with the exe?
0
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 100 total points
ID: 6479472
The VCL (Visual Component Library) it's the Libaray for all delphi component, and it's compiled with the exe
so if you want any tools from 3rd party always check to VCL not activeX
0
 
LVL 5

Expert Comment

by:alanwhincup
ID: 6480071
Have a look at this download:

http://www.torry.net/samples/samples/soft/window.zip

It is how to create a windowed program without the use of Forms.pas by creating the windows via API.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month19 days, 14 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question