[Lazarus] Lazarus config woes
lazarus at mfriebe.de
Sat Apr 2 11:02:36 CEST 2011
On 02/04/2011 04:33, Hans-Peter Diettrich wrote:
> Martin schrieb:
>> ...let me explain a bit more what I tried to explain before (and had
>> in my last mail too)
>> It would only help, if you totally abandon all global config. don't
>> even look for a global anymore, only check the exe folder, nowhere else.
> Why that?
> When multiple directories are in a search path, the search stops on
> the first item (file...) found. That's common practice, isn't it?
I explained below, but I do again.
In order for that to work, WITHOUT the user needing to be aware of doing
anything. EVERY lazarus must come by default with local config.
Then local config will ALWAYS be found, which is the same as having NO
If Lazarus comes without a local conf by default, then we are back to
where we are now => a global copy will be created, and used
*** There is one option though, since we have the setup dialog => it
could ask the user where (e.g. exe dir) to create the config.
BUT that is at best a partial solution.
Because, if a user installs a 2nd lazarus, it may not (yet) have a
problem with the global config. However the use may then change it, and
the glabal config gets updated. The global conf now is incompatible with
the 1st/original installation. That is almost never what the user wants.
the user wanted a new config for the 2nd installation. (but now the 1st
install will ask about creating a new one).
Since the 2nd installation (if the config is compatible at the time of
first startup) has no way of knowing there is another install, it just
requires the user to tell it.
>> But if the search order for config would be:
>> - exe-dir
>> - global as current
>> Then as soon as a global config exist you are back to were you are now.
> Something seems to be wrong with your list. Mine looks like this:
> 1) explicit -pcp
> 2) EXE dir (meaning the Lazarus dir from which the EXE was built)
> 3) global dir
the explicit pcp dir makes no difference to anything that I said below
>> - download a new lazarus, into some folder "lazfoo"
>> - now lazfoo does not yet contain config, but the global folder does.
>> so in your way, one has to first create a config in lazfoo.
>> This is an explicit action the user must undertake, same as adding
>> the -pcp.
> The IDE already *is* clever enough to handle non-existing or
> inappropriate configs. Remains only to specify where the updated
> config should be stored.
Yes, but see my above explanation
>> => But if the user is unaware of the issue, he will not ad that
>> config to lazfoo, and run with the global config => same as now
> When no global (default) config exists, the new config (eventually)
> can be stored there, else the obvious place is the Lazarus(~EXE)
Well that leaves the question why almost every software has moved from
exe config to global config?
Config in the user dir has many advantages. Various backup solutions
will take care of it, user profiles that can be used accross many
>> So were (or how) exactly, in which scenario, does an additional
>> search for a local config actual help the unaware user?
> The IDE can keep certain (required) modifications in the local config,
> e.g. an non-standard FPC required to compile this version. This
> compiler may be part of the installation, what's just the default in
> Windows installations.
>> Sure, once you know,it may be more convenient to some, but a startup
>> script is no less convenient to most.
> I have no problems with startup scripts, as long as I do not have to
> write them myself, must remember where I placed and how I named them,
> etc. ;-)
Well that's a new topic. If a profile manager was created, it could have
the functionality of creating desktop shortcuts (including fro linux)
Though personally, on linux I never use the desktop, I always use a
shell. And I have my own startup scripts for most apps that I use
> But I have a BIG problem with non-shareable configs. When I have to
> configure manually every new Lazarus installation, because it is too
> stupid to configure itself, or it overwrites the configs required for
> my other installations, then something is wrong :-(
But the config is currently shared? That was the whole point of this
With local/exe-dir configs, that problem remains/becomes bigger.
Otherwhise this is a change of topic: Keeping the config directory as it
is, but make sure the data in the config will not conflict between
More information about the Lazarus