確定要包含的Delphi執行時程式包(Determining Delphi Runtime Packages to Include)
I have a Delphi DLL that houses a form which uses a variety of third party components. This DLL is used by many different versions of Delphi. I compile the third party components into the DLL. I believe I still need to link to some "base" Delphi packages like rtl, vcl, etc, so my DLL will use the same memory manager and other global resources that the Delphi IDE is using. How do I find out what BPLs I need to link to?
Ideally I'd like to point some utility at my DLL or project and have it list every BPL that it would depend on if I was only using BPL's and had no source files available. Then I could view that list and pick the packages I want to load at runtime. The current list given in the project properties under "Runtime Packages" is incomplete (as it has been tweaked over the years).
Check the "Build with Runtime Packages", leaving the whole list of packages the way it is.
Do a Project|Build (not compile!). After the build completes, use Project|View Information on ; the resulting dialog will give you a list of the actual packages you need to distribute.
After Jeremy's comment about the default list of packages being empty when he enables building with packages, here's the list from that options dialog from Delphi 2010:
vclx;vcl;vclimg;dbrtl;Rave77VCL;bdertl;rtl;vclactnband;xmlrtl; vcldb;vcldbx;vcltouch;dsnap;dsnapcon;TeeUI;TeeDB;Tee;vclib; ibxpress;adortl;IndyCore;IndySystem;IndyProtocols;inet; intrawebdb_100_140;Intraweb_100_140;VclSmp;vclie;inetdb; webdsnap;websnap;inetdbbde;inetdbxpress;soaprtl;vclribbon; DbxCommonDriver;DbxClientDriver;DBXInterBaseDriver;DBXMySQLDriver; dbexpress;dbxcds;SynEdit_R2009
我有一個Delphi DLL,其中包含使用各種第三方元件的表單。許多不同版本的Delphi使用此DLL。我將第三方元件編譯到DLL中。我相信我仍然需要連結到一些"基本" Delphi程式包,例如rtl,vcl等,因此我的DLL將使用Delphi IDE使用的相同的記憶體管理器和其他全域性資源。我如何找出需要連結的BPL?
理想情況下,我想將一些實用程式指向我的DLL或專案,並讓它列出每個依賴於我僅使用BPL而沒有源的BPL。可用檔案。然後,我可以檢視該列表並選擇要在執行時載入的軟體包。專案屬性在"執行時程式包"下給出的當前列表不完整(由於多年來的調整)。
解決方案
檢查"使用執行時程式包進行構建",使程式包的整個列表保持原樣。
執行一個Project | Build(不編譯!)。構建完成後,使用Project | View Information on;
在傑里米(Jeremy)啟用了使用軟體包構建功能的預設軟體包列表為空後,他發表了評論,以下是Delphi 2010中該選項對話方塊中的列表:
vclx; vcl; vclimg; dbrtl; Rave77VCL; bdertl; rtl; vclactnband ; xmlrtl;
vcldb; vcldbx; vcltouch; dsnap; dsnapcon; TeeUI; TeeDB; Tee; vclib;
ibxpress; adortl; IndyCore; IndySystem; IndyProtocols; inet;
intrawebdb_100_140; Intraweb_100_140; VclSmp; vclie; inetdb;
webdsnap; websnap; inetdbbde; inetdbxpress; soaprtl; vclribbon;
DbxCommonDriver; DbxClientDriver; DBXInterBaseDriver; DBXMySQLDriver;
dbexpress; dbxcds; SynEdit_R2009