Jump to content
Ian Branch

Creating my own .bpl

Recommended Posts

Hi Team,

D11.1.1.

I am trying to create my own local .bpl with some odd components I have picked up over time.

I have the .bpl building and installing OK.  The components appear and work as desired.

The issue I have is that the component .dcu files keep getting rebuilt every time I build an App with them in it.  😞

I thought that I could just relocate the relevant .pas files and the .dcu files in the local .bpl directory would get used but when I go to build the Apps Delphi tells me it can't find the files, presumably the .pas files because when I put the .pas files back with their .dcu counterparts all is fine.

I have clearly missed some nuance in constructing my .bpl or something in the component files.

Appreciate some guidance/education...

 

Regards & TIA,

Ian

Edited by Ian Branch

Share this post


Link to post

There are undoubtedly different opinions about this but I would say that you should completely separate design- and compile-time stuff.

  • Build and install your design-time package and never mind where the dcu files for that are located. Just don't have them output to the same folder as the source.
    I would probably place them (via the package project options) in a sub-folder of the package source but you could just as well delete them once the package is installed because they are only needed to build the package.
  • Reference the source files directly, or via the search path, in your project and have the dcu's output to the project dcu folder. Do not include the dcu output folder in your project search path.

Share this post


Link to post
15 hours ago, Ian Branch said:

The issue I have is that the component .dcu files keep getting rebuilt every time I build an App with them in it.  😞

Using a .bpl in an app, you should NOT have to use the .pas/.dcu files directly in the app.  If your app is still building/requiring the .pas/.dcu files, then it is not correctly referencing the component unit(s) from the .bpl.

  • Like 1

Share this post


Link to post
40 minutes ago, SwiftExpat said:

might help you in the right direction

Nope.

 

Have you read the section "How to handle source code changes"? O.M.<expletive>G.

Share this post


Link to post
4 hours ago, Anders Melander said:

Have you read the section

I skimmed it only and thought it relevant to the original question, at least in theory.

4 hours ago, Anders Melander said:

O.M.<expletive>G.

Every time I have tried to save time with this, I end up with the infamous dcu built with version x dcu error, along with all the random errors in the IDE with things out of sync.  I ended up purchasing the fastest clock CPU I could get and am happy enough. I just let it build the DCU's when necessary (TMS also does this so I figure if they did not come up with a more reliable solution, I would not either.)

Share this post


Link to post
1 minute ago, David Heffernan said:

for IDE plugins and components. 

:-)  Which is what I am trying to implement.

Share this post


Link to post
7 hours ago, Anders Melander said:

Have you read the section "How to handle source code changes"? O.M.<expletive>G.

That about covers it.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×