Building with runtime packages. Which BPLs are needed?

柔情痞子 提交于 2019-12-11 01:59:35

问题


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?


回答1:


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:




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/51195144/building-with-runtime-packages-which-bpls-are-needed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!