Solved

Package newbie question

Posted on 2004-04-06
8
237 Views
Last Modified: 2010-08-05
I want to split my app into a *.exe and a *.bpl file.

It runs fine on my PC but if I move to another machine without Delphi IDE it requires the vcl50.bpl file. I wonder if it is possible to compile an executable that requires just my *.bpl? If not, am I allowed to distribute the vcl50.bpl? Do I need anything else if I use other components?

TIA
0
Comment
Question by:__alex
8 Comments
 
LVL 19

Assisted Solution

by:Melih SARICA
Melih SARICA earned 50 total points
ID: 10763928
u can put all ur bpl's in to ur exe code..

there is an obtion " build with runtime packages" when u check it ll put all ur runtime packages in it..

Ur exe size ll be bigger but it ll solve ur problem ..

Under project->Options->(from window) Packages... u ll see the cehck box
0
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 50 total points
ID: 10764243
you can add all the rtl, vcl units to your package .. it should work
and yes, you're allowed to redist the rtl/vcl packages with your app
0
 
LVL 2

Author Comment

by:__alex
ID: 10764466
> it should work
Nope, but shot my IDE instead. Reinstalling...
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 12

Assisted Solution

by:Ivanov_G
Ivanov_G earned 50 total points
ID: 10766328

   It is useless to separate both EXE and BPL files (my opinion). If you are considered about the size of the program - now software is shipped on CDs and DVDs, so this is not important issue.

   It makes sense only if you have MANY big executables and thus you will reduce the size of all them. In this situation you can ship the *.bpl packages and build the project as described by non_zero.
0
 
LVL 2

Author Comment

by:__alex
ID: 10766617
If you have n different products and m different hardware you will get n times m different *.exe. If I can separate product (*.exe) from hardware (*.bpl) it's less. I will put all the hardware related stuff in a package, i.e. an abstract base class and a CreateInstance function. If everything goes fine you can combine every *.exe with every *.bpl (as long as the interface stays the same). I will not use dlls because I think OO.
0
 
LVL 3

Expert Comment

by:BJThomsen
ID: 10769162
I think the question here is, he has some .bpl's that are his. He want's to use them as bpl's but he want's the .bpl's that come with delphi compiled into his exe.

You can do this by going to the project dialog and selecting the Packages tab. At the bottom is a checkbox 'Build with runtime Packages' make sure thats checked.

Then remove all the packages listed in the edit box you dont want separated out, leaving only your packages.
0
 
LVL 3

Assisted Solution

by:BJThomsen
BJThomsen earned 50 total points
ID: 10769203
You might want to think about putting the hardware code into a COM object. Then you install the correct COM object for the hardware and your exe uses the COM object to work with.
0
 
LVL 2

Author Comment

by:__alex
ID: 10772622
A package can only use units from other packages, that's the reason why Borland put all the system units in a package (you might want to use it within your package). -> You need the vclXX.bpl as it is (not in the *.exe).

Anyway, thanks for the input!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

861 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