Questions tagged [bpl]

Borland Package Library - special kind of object-oriented DLL with enforced type-safety

Delphi is component-based IDE for its proprietary dialect of Pascal language.
Differing from its competitor Visual Basic, it could "eat its own food" - create those components to extend itself.

Up to 1996 to install them one need to recompile part of IDE, similar to installation in Lazarus/FCL IDE. That resulted in two problems:

  • The more components you install - the heavier IDE becomes, and computers back then had significantly less memory. You could not arrange different components subsets per project.
  • If some component proved cruelly broken and crashed IDE, reconfiguring and rebuilding it without the component becomes less obvious task w/o using IDE.

It also made little help to deploy large programs: one either had to deploy large monolithic EXE which could cause problems in OSes with 16-bit kernel (Windows 9x/ME), or develop traditional Windows DLL sacrificing all type safety and complex types (passing objects and strings on EXE/DLL or DLL/DLL boundary would be extremely fragile, practically impossible for average programmer).

With the release of Delphi 3 in 1997 Borland introduced specific type of DLL, the one with enforced type safety (dependencies are codified at compile-time and checked at load time) and changed one letter: DLL -> DPL - Delphi Package Library.

Next year Borland C++ Builder 1 was released (with built-in Delphi 3.5) and those libraries were renamed again: DPL -> BPL - Borland Package Library.

BPL remains the basement for component-based RAD Studio IDE design up to today.

Drawbacks of BPL:

  • Increases "implementation leakage" problem of Turbo Pascal, source Units of which where introduced before OOP trend. That forces private members and datatypes (worker classes) used be promoted into public unit interface. Later Delphi language designer fixed the problem by introducing partial classes into C#, but in Delphi this feature is missing. Since BPL publishes all interface sections of all the contained units, even internal "worker" units, there is no way to make stable contained API and spaghetti dependencies may easily happen unnoticed.
  • Since every unit is public by definition - and since BPL may be re-used by other apps - the Smart Linker is defeated. If you only need 1% of the library - you either re-work it or you deploy the whole library with 99% of slab. In monolithic EXE mode compiler would record XRefs and the Smart Linker would eliminate unused 99% of the library.
  • This also means you can not have several unit with the same name, like you can with DLLs. It is not big issue but may be inconvenient.
  • This also means that if you re-work some class like adding new internal method (virtual or not) - the class signature changes and all the depending BPLs have to be re-compiled and re-deployed. It is especialyl annoying when you need some fix in stock RTL
  • If you change compiler options or version, this change affects internal classes/functions ABI and all dependent packages should be re-build and re-deployed.
101 questions
23
votes
5 answers

Plugins system for Delphi application - bpl vs dll?

I'm writing delphi app which should have capability of loading plugins. I'm using JvPluginManager as plugin system/manager ;) Now, in the new plugin wizard they say it's better to use .bpl type plugins instead of .dll plugins ... What are the pros…
migajek
  • 8,524
  • 15
  • 77
  • 116
19
votes
4 answers

Package (BPL) Automatic Naming Suffix

I write a lot of components and libraries for Delphi, most of which require the use of BPL Packaging so that they may be installed into the IDE. This is simple enough and works well, right up until you want to maintain a single set of Package…
LaKraven
  • 5,804
  • 2
  • 23
  • 49
15
votes
7 answers

Delphi App has "No Debug Info" when Debugging

We have built an application that uses packages and components. When we debug the application, the "Event Log" in the IDE often shows the our BPLs are being loaded without debug information ("No Debug Info"). This doesn't make sense because all…
James L.
  • 9,384
  • 5
  • 38
  • 77
14
votes
4 answers

How to divide a Delphi project into BPLs properly?

The company I work for develops a system in Delphi, that contains dozens of exe modules, and each of them is identical to a certain degree if it comes to source code. Sadly, nobody has ever cared about using libraries to put the shared code in. This…
Mariusz Schimke
  • 3,185
  • 8
  • 45
  • 63
12
votes
5 answers

Delphi plugin framework

I want to design Delphi plugin framework. There are three options: 1. DLL 2. BPL 3. COM interface Every option has some disadvantage. DLL - Promblem with MDI apllication, forms from plugin cannot be embeded to the host exe - mdi application. BPL -…
Peter
  • 269
  • 3
  • 13
12
votes
3 answers

Solving Delphi BPL Package problems where BPLs won't load but you've already recompiled (Windows VirtualStore filesystem issue)

My general question is how do you troubleshoot "My BPL won't load due to a dependency that just won't go away, no matter how much I clean up and recompile". Update You may think you have a clean recompiled system, but thanks to the inverse-miracle…
Warren P
  • 65,725
  • 40
  • 181
  • 316
11
votes
2 answers

The best approach to modular programming in Delphi

this is a continuation of the discussion I started here. I would like to find the best way to modularize Delphi source code as I'm not experienced on this field. I will be gratefull for all your suggestions. Let me post what I have already written…
Mariusz Schimke
  • 3,185
  • 8
  • 45
  • 63
11
votes
4 answers

Delphi - unmangle names in BPL's

Is it possible to unmangle names like these in Delphi? If so, where do I get more information? Example of an error message where it cannot find a certain entry in the dbrtl100.bpl I want to know which exact function it cannot find (unit, class,…
Jeroen Wiert Pluimers
  • 23,965
  • 9
  • 74
  • 154
9
votes
3 answers

Delphi XE: bogus "Never-build package must be recompiled" / "F2084 Internal Error: U10346" errors when building packages

I'm trying to build a package (package A) that contains the DWS compiler. It works, but when I then have a second package (package B) that requires package A, containing any unit that uses a specific unit from DWS, I get the error: [DCC Fatal…
Mason Wheeler
  • 82,511
  • 50
  • 270
  • 477
9
votes
2 answers

Delphi: .exe with built-in packages: 600kb, .exe + external BPLs: 6MB. Why is that?

if I compile .exe file in delphi with built-in packages, it generates about 600kb EXE file. However if I compile it with runtime packages, the sum of sizes (.exe + all required .BPLs) is about 6-8 MB (depending on version of compiler). Why is the…
migajek
  • 8,524
  • 15
  • 77
  • 116
8
votes
3 answers

How do I call Delphi functions in a bpl from an executable?

I have a Delphi application that I have written a fairly simple wrapper .exe for. Basically, there was a dll that had a bunch of functions, one of which I would call iteratively once my wrapper did what it needed to. I am not in control of this dll…
Dan
  • 1,222
  • 2
  • 17
  • 33
8
votes
3 answers

Get list of required BPLs for a given DLL, EXE or BPL

I'm wondering if anyone knows of an elegant way of determining what BPLs are required by a given (compiled) DLL, EXE or BPL. I'm not sure if this is even possible shy of simply scanning the binary for text references to .bpl filenames (which would…
LaKraven
  • 5,804
  • 2
  • 23
  • 49
6
votes
2 answers

Delphi package not Loading when i start Delphi

I was working on my own package. Then while i was processing i wrongly click on the message "Don't load this package on the next start of Delphi"... Even i uninstall, clean my package... After i recompile and reinstall it successfully : Delphi show…
ffert2907
  • 370
  • 4
  • 16
6
votes
5 answers

Delphi Project Needing runtime Packages, even with runtime Packages off

My Delphi7 project will not run on my clients computer if i don't have a few of the runtime packages in the path. eg rtl70.bpl I have Build with runtime packages unticked, so shouldn't they be complied into the exe? Edit: the Project uses Jedi…
Christopher Chase
  • 2,840
  • 6
  • 36
  • 57
5
votes
2 answers

Access to public methods and properties inside a Delphi BPL

I have an application that loads a BPL that as inside a simple form. This form is an optional option of the main application. The BPL loads correctly, the form is shown correctly, but I don’t know how to access the public methods and properties of…
DRokie
  • 705
  • 2
  • 9
  • 20
1
2 3 4 5 6 7