Delphi库的路径

Wou*_*ick 9 delphi path

你们在哪里存储第三方(和你自己的)组件?

你是否为每个Delphi版本保留单独的副本?

多年来我一直在使用c:\program files\borland\delphi7\lib\Delphi 2006,2007,2009和2010,就像这样:

c:\program files\borland\delphi7\lib\AggPas\
c:\program files\borland\delphi7\lib\DeHL\
c:\program files\borland\delphi7\lib\DevExpress\
c:\program files\borland\delphi7\lib\FastCode\
c:\program files\borland\delphi7\lib\FastMM\
c:\program files\borland\delphi7\lib\Fundamentals\
c:\program files\borland\delphi7\lib\Graphics32\
c:\program files\borland\delphi7\lib\JCL\
c:\program files\borland\delphi7\lib\JVCL\
c:\program files\borland\delphi7\lib\OmniThread\
c:\program files\borland\delphi7\lib\Raize\
c:\program files\borland\delphi7\lib\TeeChartPro\
c:\program files\borland\delphi7\lib\TurboPower\
c:\program files\borland\delphi7\lib\VirtualTreeView\
c:\program files\borland\delphi7\lib\Zeos\
Run Code Online (Sandbox Code Playgroud)

但是,现在我甚至不再使用Delphi7了(2010年它不能做什么呢?),所以这条道路不再有意义了.我即将在家用机器上安装windows7,所以我在考虑这样的事情:

c:\src\DelphiLib\

有更好的想法吗?

Mar*_*ort 2

我有一个目录,我可以在其中进行所有结账。组件(版本控制)只是另一个检查(**)。

mysvndir\components                         (D7 components)
mysvndir\components2006                     (D2006 components)
mysvndir\components2009                     (D2009 components)
mysvndir\trunk                              (trunk of framework)
mysvndir\flex                               (check out of flex project that 
                                                is in a branch)
Run Code Online (Sandbox Code Playgroud)

delphi项目都是用相对路径设置的。组件路径在 delphi 中硬编码在 options->environment 下。

mysvndir 可以位于不同的驱动器(或目录级别)上,具体取决于工作站。(最值得注意的是,在我的笔记本电脑上,它位于 D:)。编译替代检查的能力(例如检查较旧的版本)是保持一切相对的另一个强烈动机。

对于普通的 Delphi 项目来说,这相当有效(*),但我现在正在考虑对某些项目使用硬编码路径(或替代品)。主要是由于开始使用 ITE。

(*) Delphi(所有版本)似乎有时会在打开文件时更改工作目录,这反过来又会弄乱相对路径(它们是相对于工作目录的,而不是相对于 .dpr(oj) 的)。如果我注意到这一点,我会在工作目录中打开一个文件(使用文件->打开),一切都会恢复正常。我还养成了在开启新项目之前关闭项目的习惯。

(**) 我有一组基本的设计时组件,用于所有应用程序并且不使用包。我没有特定于应用程序的设计时组件。