[Lazarus] Lazarus config woes
DrDiettrich1 at aol.com
Sat Apr 2 02:48:06 CEST 2011
Mattias Gaertner schrieb:
> > Where is that default config created, in the primary or secondary config
> > path?
> It seems you don't know what the secondary configs are.
That's why I'm asking ;-)
> The secondary configs are templates for the primary configs. The
> installers and administrators can create templates.
There exist other opinions as well :-(
Where can I find the documentation for the templates?
> > Does it really make sense to use a Lazarus directory, different from the
> > one the IDE was built from?
> It depends on your workflow, so it does not make sense to every one.
Can you give at least one example?
> > If not, the build-path could be stored in the IDE, so that the Lazarus
> > Directory must not normally be specified, and the IDE can use the
> > correct directory automatically (variation of the EXE directory
> Does not work with installers.
Installers can do what they like, in order to make a binary installation
work out-of-the-box. The distribution package creator already can build
the binaries accordingly.
> I think there is a general problem with these "tests for valid config":
> Either the test is exact and it will show "invalid" after every rebuild
> of the IDE or the test is fuzzy and will not work in some situations.
That's why a rebuild should make sure that the result will be usable,
without *any* need for checks. The IDE can be built to contain all
essential information, like the Lazarus and config directories,
applicable to that specific build.
> > > I added a check for the ide/version.inc.
> > >
> > > Configs from another version are quietly loaded and updated.
> > What exactly is updated?
> The config loading functions check the config version and contains
> heuristics to map old values to current values. On saving the config to
> disk the new version is created.
The overwritten config may become unusable with the Lazarus installation
that created it. IMO the user should be asked whether it's okay to
overrite, or where to store the updated config else. When the config is
stored in a new location, this should be handled properly on the next
start of the IDE.
> > > Maybe a check could be added to warn if the environmentoptions.xml is
> > > from a future Lazarus with two options: Quit and continue.
> > This problem suggests to use versioned configs, at least in the default
> > config location, using the ide/version.inc. Then the config also could
> > be splitted, into an common part in the config root directory itself
> > (user preferences), and extensions or otherwise config/build specific
> > settings in the version subdirectories.
> There is no common idea what settings are "common" and which ones are
> not. Ask 2 users and you will get 3 answers.
It's not a matter of user opinions, but of the IDE requirements, which
settings may deserve modifications (see your answer above).
Current (Windows) installers leave an existing default config untouched,
so that all user settings are used in the new installation. What's
missing is an adaptation of the installation-specific pathes (LazDir,
FPC...), which consequently should always be stored in an non-shareable
Another way for the specification of non-shared settings could be the
existence of config files themselves. When a config file exists in the
pcp, it will be updated there, otherwise all changes will go into the
shared config. Then every advanced user can copy the desired files or
directories into the pcp. The IDE only has to check for existing files,
in order to know where to store every single updated file :-)
And finally all users *which don't want anything shared* can...
> Use --pcp if you want multiple versions.
More information about the Lazarus