Board index » cppbuilder » Runtime packages problem

Runtime packages problem


2004-02-24 03:06:27 AM
cppbuilder36
Hi all,
I made a project using BCB 5 Ent., before building my project I went to
Project>Options>Packages Tab and removed every Design Package my project
doesn't use, then I build the project which resulted in an exe size of (147
KB) which is so far great.
The problem started when I used 3rd party components (Raize components), so
I had to add it to the design time packages, then after a successful build,
the exe file size remained the same although when trying to run the exe on
any other machine (which doesn't have BCB installed) it required Raize BPL
file which is (1.8 MB), so my question is:
Is there anyway I can do so my project won't need this 1.8 MB bpl file and
remain a reasonable size in the same time?
Thanks
BR
 
 

Re:Runtime packages problem

Hi.
Thanks OBones for your reply. Concerning rtlt60.bpl, actually I never needed
it or included it inside my setup and I have tested the application on many
machines and I was never asked about this file.
Anyway I have unchecked the "Build with runtime package" option and build my
application and the size of the final exe changed from 147 KB to 1.84 MB
which is fair.
But when I checked my application with wise installer to know what files my
application would need in order to run on any machine I found that it didn't
show the raize components bpl or the Borland vcl files which is so good, but
it showed that the application need BORLNDMM.DLL, CC3250MT.DLL as required
files for the application to run ! so do you have any idea why those two
files were left as runtime files needed by my application although I
unchecked the "Build with runtime package" option ?
Thanks again for your reply.
BR.
"OBones" < XXXX@XXXXX.COM >wrote in message
Quote
Martin C wrote:

>Is there anyway I can do so my project won't need this 1.8 MB bpl file
and
>remain a reasonable size in the same time?

No.
But if don't check "Use runtime package", the raize lib will be linked
into your application and the linker should remove anything that is not
used by it. Hence, it shouldn't grow by more than the 1.8M of that bpl.
But the other bpl's would be included too.
BTW, I'm surprised your application even started on a computer that
never saw an installation of C++Builder, because it would have needed
rtl60.bpl

 

Re:Runtime packages problem

Thanks Bruce for your reply. I've tried un-checking the "Use dynamic RTL"
and the borlandmm.dll and cc3250mt.dll files are not more needed. Now my
exe file size is around 1.96 MB which is fair.
My last question now is there any tool (third party tool) or way I can lower
the final exe size by it ?
Thanks
" Bruce Salzman" < XXXX@XXXXX.COM >wrote in message
Quote
>But when I checked my application with wise installer to know what files
my
>application would need in order to run on any machine I found that it
didn't
>show the raize components bpl or the Borland vcl files which is so good,
but
>it showed that the application need BORLNDMM.DLL, CC3250MT.DLL as
required
>files for the application to run ! so do you have any idea why those two
>files were left as runtime files needed by my application although I
>unchecked the "Build with runtime package" option ?

Uncheck "Use dynamic RTL" in the linker options page.

Regards,
Bruce


 

{smallsort}

Re:Runtime packages problem

Martin C wrote:
Quote
Is there anyway I can do so my project won't need this 1.8 MB bpl file and
remain a reasonable size in the same time?
No.
But if don't check "Use runtime package", the raize lib will be linked
into your application and the linker should remove anything that is not
used by it. Hence, it shouldn't grow by more than the 1.8M of that bpl.
But the other bpl's would be included too.
BTW, I'm surprised your application even started on a computer that
never saw an installation of C++Builder, because it would have needed
rtl60.bpl
 

Re:Runtime packages problem

Quote
But when I checked my application with wise installer to know what files
my
application would need in order to run on any machine I found that it
didn't
show the raize components bpl or the Borland vcl files which is so good,
but
it showed that the application need BORLNDMM.DLL, CC3250MT.DLL as required
files for the application to run ! so do you have any idea why those two
files were left as runtime files needed by my application although I
unchecked the "Build with runtime package" option ?
Uncheck "Use dynamic RTL" in the linker options page.
Regards,
Bruce
 

Re:Runtime packages problem

Martin C wrote:
Quote
Thanks Bruce for your reply. I've tried un-checking the "Use dynamic RTL"
and the borlandmm.dll and cc3250mt.dll files are not more needed. Now my
exe file size is around 1.96 MB which is fair.
My last question now is there any tool (third party tool) or way I can lower
the final exe size by it ?

You may be tempted to use what's called an Exe Packer or Exe Compressor,
but I strongly discourage you from doing so. While the size on the disk
of the exe file will be slower (often by half), it's usage in memory
will be multiplied by 2, and so is it's loading time.
Why? Simply because when you run an executable, windows only loads the
parts that are needed by it, based on informations in the file (the PE
headers). With an exe compressor, these informations are replaced by
those of the compressor. Then the compressor unpacks your application in
memory, completely thus discarding any optimisation by windows.
 

Re:Runtime packages problem

Hi Harold,
Thank you for your reply. I 've visited the link you pointed to, but I am
not sure that I am following up, so please find below steps that I have took
to build me project and please tell me if A) Is there anything I am doing
wrong on those steps? B) Will what I have done cause any problem in
distributing my application to my clients?
Steps:
1) While "Build with runtime packages" checked and "Use dynamic RTL"
checked, I unchecked all unwanted packages (like DB, teechart...etc. as my
project doesn't use them) from the (Design Packages) check listbox, which in
return removed a lot of files from the ("build with runtime packages") edit
box.
2) I un-checked the "Build with runtime packages", and unchecked the "Use
dynamic RTL".
3) I build the application
and that is it, I took the exe, added to my wise setup project, build the
setup project and done. Now my final distribution setup file was reduced at
least 1.4 MB, originally it was 2.65 MB due to many runtime bpl that need to
be added to the setup project and now it is only 1.19 MB
Looking forward for your reply
BR
"Harold Howe [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote

>But if don't check "Use runtime package", the raize lib will be linked
>into your application and the linker should remove anything that is not
>used by it.

In practice, this doesn't work due to the way most BCB packages are
built and the problem of unwanted package exports. See

groups.google.com/groups

h^2
 

Re:Runtime packages problem

Hi Bill,
Thank you for your reply. I've posted a message as a reply to (Harold Howe)
kindly look at it as it includes all steps I have taken to build my
application, and I will appreciate it if you can tell me if I am doing
anything wrong.
Thanks
BR
 

Re:Runtime packages problem

On Mon, 23 Feb 2004 21:06:27 +0200, "Martin C" < XXXX@XXXXX.COM >
wrote:
Quote
Is there anyway I can do so my project won't need this 1.8 MB bpl file and
remain a reasonable size in the same time?
I ran into a similar problem with some TMS components that I was
using. In my situation, I was distributing my app via the Internet so
download size was pretty important. My software consisted of several
related .exe files, and turning off .bpl files for all of these
increased the size of each .exe, giving a much larger total download
size for my users than shipping the .bpl files and the smaller .exe
files.
My solution was to use Borland's .bpl files for most everything, but
to link in the TMS components so their .bpl wasn't required. In the
project options, I did the following:
1) turned on "Build with runtime packages" (Packages tab)
2) turned on "Use dynamic RTL" (Linker tab)
3) removed the packages that I wanted statically linked from the list
of runtime packages in the edit box at the bottom of the Packages tab.
I found a few Borland .bpl files not specifically listed as deployable
that this caused my app to require, so I removed those from the edit
box too and linked them in statically too. They were mostly small so
this wasn't a problem.
Here's what my runtime packages edit box looks like:
vcl;rtl;vclx;bcbsmp;dbrtl;adortl;vcldb;qrpt;bdertl;vcldbx;dsnap;cds;bdecds;teeui;teedb;tee;teeqr;ibxpress;visualclx;visualdbclx;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;inetdb;nmfast;soaprtl;dclocx;dbexpress;dbxcds;indy;bcb2kaxserver;VclSmp;Vcwb6;wcncmpt
Hope that helps.
Bill P.
 

Re:Runtime packages problem

Quote
But if don't check "Use runtime package", the raize lib will be linked
into your application and the linker should remove anything that is not
used by it.
In practice, this doesn't work due to the way most BCB packages are
built and the problem of unwanted package exports. See
groups.google.com/groups
h^2
 

Re:Runtime packages problem

Quote
A) Is there anything I am doing wrong on those steps?
No.
Quote
B) Will what I have done cause any problem in
distributing my application to my clients?
No.
h^2
 

Re:Runtime packages problem

On Tue, 24 Feb 2004 15:53:35 +0200, "Martin C" < XXXX@XXXXX.COM >
wrote:
Quote
Thank you for your reply. I've posted a message as a reply to (Harold Howe)
kindly look at it as it includes all steps I have taken to build my
application, and I will appreciate it if you can tell me if I am doing
anything wrong.
Looks okay to me!
Bill P.
 

Re:Runtime packages problem

Hi Obones.
I have found a tool called ASPack which really compress the exe size very
good, although I am not sure if this will be good for BCB exe projects or
not.
I have tried to run the compressed exe on my machine and to tell you the
truth I didn't notice any delay or difference between the compressed and
un-compressed exe performance. May be this is cause of my machine but I
really didn't notice this difference that can be noticed by any user.
Despite of the mechanism exe packers use to compress the exe, do you really
think that compressed exe is that slower?
Thanks
"OBones" < XXXX@XXXXX.COM >wrote in message
Quote
Martin C wrote:

>Thanks Bruce for your reply. I've tried un-checking the "Use dynamic
RTL"
>and the borlandmm.dll and cc3250mt.dll files are not more needed. Now
my
>exe file size is around 1.96 MB which is fair.
>My last question now is there any tool (third party tool) or way I can
lower
>the final exe size by it ?
>

You may be tempted to use what's called an Exe Packer or Exe Compressor,
but I strongly discourage you from doing so. While the size on the disk
of the exe file will be slower (often by half), it's usage in memory
will be multiplied by 2, and so is it's loading time.
Why? Simply because when you run an executable, windows only loads the
parts that are needed by it, based on informations in the file (the PE
headers). With an exe compressor, these informations are replaced by
those of the compressor. Then the compressor unpacks your application in
memory, completely thus discarding any optimisation by windows.

 

Re:Runtime packages problem

Martin C wrote:
Quote
Hi Obones.

I have found a tool called ASPack which really compress the exe size very
good, although I am not sure if this will be good for BCB exe projects or
not.
I have tried to run the compressed exe on my machine and to tell you the
truth I didn't notice any delay or difference between the compressed and
un-compressed exe performance. May be this is cause of my machine but I
really didn't notice this difference that can be noticed by any user.

Despite of the mechanism exe packers use to compress the exe, do you really
think that compressed exe is that slower?
When the PC is (not so) heavily loaded, yes.
But you decide, all I'm saying is this kind of program never lives very
long on my machin.