How to compute the Delphi root directory for a range of compilers?
For Delphi 2007, the IDE root directory can be found in the system registry at [HKLM\SOFTWARE\Borland\BDS\5.0\RootDir]. And similarly for Delphi 2010, the key is [HKLM\SOFTWARE\CodeGear\BDS\7.0\RootDir]. But what about the other compilers? If you have any other Delphi compilers, what is in your registry to point to the IDE root?
What are the registry keys to compute the IDE root directory for:
- Delphi 7
- Delphi 2005
- Delphi 2006
- Delphi 2009
- Delphi XE
Thanks in advance if you can开发者_Python百科 advise for all of these compilers.
Delphi 5: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\Delphi\5.0\RootDir
Delphi 6: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\Delphi\6.0\RootDir
Delphi 7: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\Delphi\7.0\RootDir
Delphi 8 (.NET-only product): HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\2.0\RootDir
Delphi 2005: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\3.0\RootDir
BDS 2006: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\4.0\RootDir
Delphi 2007: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\5.0\RootDir
Delphi 2009: HKEY_LOCAL_MACHINE\SOFTWARE\CodeGear\BDS\6.0\RootDir
Delphi 2010: HKEY_LOCAL_MACHINE\SOFTWARE\CodeGear\BDS\7.0\RootDir
Delphi XE: HKEY_LOCAL_MACHINE\SOFTWARE\Embarcadero\BDS\8.0\RootDir
The above are for win32 systems that use HKEY_LOCAL_MACHINE\SOFTWARE
as base node. For win64 systems, use HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
as base node.
Upon first IDE start of each Delphi version, the values are copied over from HKEY_LOCAL_MACHINE\SOFTWARE\x\BDS\y.0\RootDir
to HKEY_CURRENT_USER\Software\x\BDS\y.0\RootDir
, so do not be tempted to use the HKEY_CURRENT_USER
based values as they are never there for users that build from a script and never start the IDE (automated build systems and building from the command-line come to mind).
I am trying to keep an up-to-date version of the registry keys in my blog.
I don't know if this is the registry entry that you're looking for but here's one named "RootDir" in Delphi 7:
Computer\HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\RootDir
![alt text][1]
精彩评论