Can you please add the LazarusDirectory getter. True, it should be in class TIDEEnvironmentOptions which is part of BuildIntf. This setting has no dependency for GUI and may be needed by cmd line tools as well.
Maybe GetPrimaryConfigPath and GetSecondaryConfigPath should be there, too, but that is another issue.
OK, TIDEEnvironmentOptions is defined in
IDEOptionsIntf.pas And a var IDEEnvironmentOptions of that type is declared.
In
ide/EnvironmentOpts.pp we define
TEnvironmentOptions = class(TIDEEnvironmentOptions)
and add the property LazarusDirectory, along with quite a lot of other useful stuff.
We then declare a var EnvironmentOptions of that type.
But in
ide/BuildManager.pas we go backwards, we create the (EnvironmentOpts.pp)EnvironmentOptions var and assign it to the (IDEOptionsIntf.pas) IDEEnvironmentOptions var so losing access to LazarusDirectory.
Now, we cannot (easily) see either ide/BuildManager.pas nor ide/EnvironmentOpts.pp so need to get by with the quite uninformed TIDEEnvironmentOptions.
From where I sit, it would make more sense to move "LazarusDirectory" to the parent, TIDEEnvironmentOptions, but that raises questions about the Get and Set functions.
Easier to add a "TheLazarusDirectory" (as a string ??, no such thing as an abstract property ? ) to TIDEEnvironmentOptions and do
IDEEnvironmentOptions.TheLazarusDirectory := EnvironmentOptions.LazarusDirectory;
in BuildManager, ugly IMHO.
So, must be a better approach, what ?
Davo