[Lazarus] Lazarus config woes

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Apr 1 13:31:26 CEST 2011


 


Hans-Peter Diettrich <DrDiettrich1 at aol.com> hat am 1. April 2011 um 05:46
geschrieben:

>[...]
> Where is that default config created, in the primary or secondary config
> path? 
It seems you don't know what the secondary configs are.
The secondary configs are templates for the primary configs. The installers and
administrators can create templates.
 
 

> > Since 0.9.29 packages in the Lazarus directory are stored relative.
> > Changing the Lazarus directory will load the lpk files of the new
> > Lazarus directory.
>
> Ah! :-)
>
> Does it really make sense to use a Lazarus directory, different from the
> one the IDE was built from? 
Yes.
It depends on your workflow, so it does not make sense to every one.
 
 

>
> 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 approach). 
Does not work with installers.
 
 

>
> A bit more detailed: the Lazarus Directory (in the config) could be made
> automatic, by adding a checkbox "Use this Lazarus directory". When
> unchecked, the IDE uses the Lazarus directory from which it was built
> (and shows the selected path in the options dialog). In the rare cases
> where the Lazarus directory has been moved, this option can be used to
> specify the new directory, to be used in the next IDE rebuild. 
I think even the eclipse solution of always asking for the workspace is better
than this.
 
 

> > The checkbox could be initialized automatically, to unchecked when a
> valid config was found, and to checked when an invalid config was
> detected. No need to store this new option in the config. 
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.
 
 

> > 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. 
 
 

> (also see above suggestion)
>
> Does this update permanently affect the stored config? 
Yes.
 
 

> > 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. 
Use --pcp if you want multiple versions. 
 
 

 
> >  > IMHO for example any error about installed/not found packages at start
> >  > up, could also offer to run the setup dialog again (and point out which
> >  > config is used / warn about a potential conflict)
> >
>> >
> > Yes.
>
> IMO such a repair feature should be built into the IDE, so that it can
> be used even without an installer (which might be unavailable or may
> repeat the wrong initial configuring). It might become part of the
> startlazarus application as well...

Dito. 
Mattias
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110401/bd8df7be/attachment-0003.html>


More information about the Lazarus mailing list