Mattias Gaertner schrieb:
Where does the IDE look for the configuration?
If no --pcp is given it uses
Under windows:
PrimaryConfigPath:=
ExtractFilePath(ChompPathDelim(SysToUTF8(GetAppConfigDir(False)))) +
'lazarus';
all other:
~/.lazarus
This will be the common configuration, that only can apply to *one*
installation. As long as we consider only that single installation,
*everything* is acceptable for the config path.
If no --lazarus-dir option is given the Lazarus source directory is
taken from the environmentoptions.xml.
If there is no environmentoptions.xml it is copied from the secondary
config directory.
The default for the Lazarus directory is under windows:
DefaultDrive + '\lazarus';
all other:
The IDE searches in a list of common directories.
What's the purpose of specifying a Lazarus directory, other than the one
with the IDE?
IOW is there a purpose for specifying a Lazarus directory other than the
one with the IDE?
If not, that directory must not be stored anywhere, making a single
configuration usable with multiple installations, and every installation
uses its EXE path for the Lazarus directory. That's perfectly compatible
with the commandline (make all...).
Each distribution/installer adds some gory details. For example to
explain all the paths of the debian packages would require at least one
wiki page on its own.
The basic Lazarus setup is pretty simple, but you can do it arbitrarily
complicated.
Why do you see complications all around? What's so complicated in
removing the "Lazarus directory" entry from the stored entries, and
replacing it (at IDE start) with the EXE directory?
Is it sufficient to have a MyLazarus\cfg\ directory, to make the
MyLazarus\Lazarus.exe use the configuration in that directory?
I'm not an expert for the windows installer, but the IDE sources do not
mention 'cfg'. I guess "cfg" is not used.
Okay, name it as you like. The config directory name only must not
conflict with any name in a Lazarus directory.
IMO the IDE should look for a configuration in the current (EXE)
directory first,
... which might be read only and therefore only contains the defaults,
not the user settings.
In which case the IDE is free to look somewhere else. All I want is
stopping the IDE from looking somewhere else, when the EXE directory
contains a config directory (of a name to be specified). Is that so hard
to understand?
DoDi
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus