Reputation: 21154
I want to compile my program with 'Link with runtime packages'.
It tells me that I need some DB-related packages. But I don't use DB in my program.
How do I figure out which BPLs are needed?
There is some kind of dependencies viewer?
Upvotes: 2
Views: 1871
Reputation: 21154
How I 'solved' the problem:
Link with runtime packages:
In 'Project Options' I put all BPIs in 'Packages->Runtime packages->Runtime package import libraries'. BCB will only link the PBLs that are actually needed.
The BPI must ALSO be added to the project (just drag and drop it in the ProjectManager).
Distribution:
When you place a new control on your form, that resides on a different BPL, you need to add that BPL also to your distribution package. If you forget to distribute your BPL, the program will crash and burn. So, testing is easy. Just run the application.
Dependency viewer
As dependency viewer I used 'Project info' but that is limited. Process Explorer is way better.
That's it. I made a test and it works great.
Link: http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Loading_Packages_in_an_Application
Upvotes: 0
Reputation: 6848
Another good tool if you use GExperts (RAD Studio IDE Expert) is the "PE information" included in this tools. Inside the IDE you can obtain the dependencies (BPL's and DLL's) of an EXE/BPL/DLL. And other information about the necessary pachages.
If you select and EXE on this tool, you can obtain a result like this:
Upvotes: 1
Reputation: 30715
I expect there are more sophisticated/user-friendly dependency viewers available, but you can use the TDump.Exe utility that comes with Delphi to do this. E.g. from the CMD line in the containing folder
tdump dbgrids2.bpl > dump.txt & notepad dump.txt
then search for entries in the imports section of the result.
Upvotes: 2