[英]How do I keep compiled code for multiple Delphi versions?
I have a Delphi code library that I want to put in a central directory, say: 我有一个Delphi代码库,我想放在一个中央目录中,例如:
C:\\delphi\\codelibs\\fastMM
C:\\ delphi \\ codelibs \\ fastMM
I have 5/7/2009 versions of Delphi installed. 我已经安装了5/7/2009版本的Delphi。 Now, I want to use the library from all these Delphi versions without the .dcu file conflicts .
现在, 我想使用所有这些Delphi版本中的库,而没有.dcu文件冲突 。 (Each delphi versions compile to slightly different .dcu files, you know that!)
(每个delphi版本都编译为稍有不同的.dcu文件,您知道的!)
Also each compiled .dcu files should be in directories like : 另外,每个已编译的.dcu文件都应位于以下目录中:
C:\\delphi\\codelibs\\libs\\D5
C:\\ delphi \\ codelibs \\ libs \\ D5
C:\\delphi\\codelibs\\libs\\D7
C:\\ delphi \\ codelibs \\ libs \\ D7
C:\\delphi\\codelibs\\libs\\D2009
C:\\ delphi \\ codelibs \\ libs \\ D2009
How can I add these dirs to delphi browsing path? 如何将这些目录添加到delphi浏览路径?
The directory with the source code should appear in the browsing path . 带有源代码的目录应出现在浏览路径中 。 The directory with the compiled code should appear in the search path and the library path .
带有已编译代码的目录应出现在搜索路径和库路径中 。 (If you include source code in the search path, then Delphi might recompile it, even when it doesn't really need recompiling, and that can lead to even more unnecessary compilation. Keep as little code as possible in the search path. My search path typically has no source code .)
(如果在搜索路径中包含源代码,则即使确实不需要重新编译,Delphi也可能会重新编译它,这可能导致不必要的编译。在搜索路径中保留尽可能少的代码。我的搜索path通常没有源代码 。)
Delphi can put the DCU files in the correct directory for you. Delphi可以将DCU文件放置在正确的目录中。 Open the package project for the library and configure the unit output directory to be the version-specific folder you've chosen.
打开库的软件包项目,并将单元输出目录配置为您选择的特定于版本的文件夹。
The BPL files generated from the packages will not need to be put into separate directories because they will simply take the names of their corresponding DPK files, and those files should already have version-specific names. 从软件包生成的BPL文件将不需要放在单独的目录中,因为它们仅使用其相应DPK文件的名称,并且这些文件应该已经具有版本特定的名称。 If they don't, then you can specify a suffix for Delphi to apply to the binaries' names.
如果没有,则可以为Delphi指定后缀以应用于二进制文件的名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.