Closed zedxxx closed 2 months ago
Note - adding support for reading the library path would require us to read Delphi install data from the registry.
For a list of relevant registry keys, see: https://delphidabbler.com/articles/article-27
Yes, you need to read:
Environment Variables
from HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\23.0\Environment Variables
Search Path
from HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\23.0\Library\Win32\
and HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\23.0\Library\Win64\
where 23.0
is for Delphi 12.1 and should be replaced with the corresponding value of the Delphi version.
Note - adding support for reading the library path would require us to read Delphi install data from the registry.
For a list of relevant registry keys, see: https://delphidabbler.com/articles/article-27
Actually, this is going to be way easier than I initially thought. We shouldn't need to read the registry at all.
CodeGear.Common.Targets
reads the (generated) EnvOptions.proj
file in AppData, which contains DelphiLibraryPath
.
Looks like the IDE keeps that file in sync with the registry, much like environment.proj
which contains all of the registry environment variables.
Thanks to our existing support for the MSBuild project files, we've basically done the work already. That's great.
The analyzer currently reads only the project search path and ignores the library path.
See #250