[Lazarus] Lazarus configuration - portable between versions?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Lazarus configuration - portable between versions?

Free Pascal - Lazarus mailing list
Every time I am setting up a new Lazarus version on one of my computers I have
to struggle to configure the IDE as I want it.

It concerns desktop, font sizes, tab behaviour, colors and a number of other
things like key shortcuts etc. I believe these are stored inside the
pcp/environmentoptions.xml file.

My question now is:
Can I simply copy the file from the pcp directory of the previous version of
Lazarus or are the config files version dependent and incompatible?

Right now I am setting up 2.0.10 on Ubuntu Mate where I already have 2.0.6 and
2.0.8

Maybe there is an "import settings" function somewhere I have yet to find?


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus configuration - portable between versions?

Free Pascal - Lazarus mailing list
On Sat, 06 Feb 2021 11:46:55 +0100, Bo Berglund via lazarus
<[hidden email]> wrote:

>Every time I am setting up a new Lazarus version on one of my computers I have
>to struggle to configure the IDE as I want it.
>
>It concerns desktop, font sizes, tab behaviour, colors and a number of other
>things like key shortcuts etc. I believe these are stored inside the
>pcp/environmentoptions.xml file.
>
>My question now is:
>Can I simply copy the file from the pcp directory of the previous version of
>Lazarus or are the config files version dependent and incompatible?

By looking inside the file on my old installationm I see clearly that this is
not the file I can modify, lots of version dependent paths inside...

>Right now I am setting up 2.0.10 on Ubuntu Mate where I already have 2.0.6 and
>2.0.8
>
>Maybe there is an "import settings" function somewhere I have yet to find?

I probably need the editoroptions.xml file instead...
Is *that* file useful? I see it contains a lot less version dependent paths but
also a lot less settings...


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus configuration - portable between versions?

Free Pascal - Lazarus mailing list
On Sat, Feb 6, 2021 at 1:00 PM Bo Berglund via lazarus <[hidden email]> wrote:
By looking inside the file on my old installationm I see clearly that this is
not the file I can modify, lots of version dependent paths inside...

What paths are version dependent?

Juha


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus configuration - portable between versions?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list

> I probably need the editoroptions.xml file instead...
> Is *that* file useful? I see it contains a lot less version dependent paths but
> also a lot less settings...


Version dependant?

Perhaps you mean installation dependant?


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus configuration - portable between versions?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 06/02/2021 12:00, Bo Berglund via lazarus wrote:

> On Sat, 06 Feb 2021 11:46:55 +0100, Bo Berglund via lazarus
> <[hidden email]> wrote:
>
>> Every time I am setting up a new Lazarus version on one of my computers I have
>> to struggle to configure the IDE as I want it.
>>
>> It concerns desktop, font sizes, tab behaviour, colors and a number of other
>> things like key shortcuts etc. I believe these are stored inside the
>> pcp/environmentoptions.xml file.
>>
>> My question now is:
>> Can I simply copy the file from the pcp directory of the previous version of
>> Lazarus or are the config files version dependent and incompatible?
> By looking inside the file on my old installationm I see clearly that this is
> not the file I can modify, lots of version dependent paths inside...
>
It would be nice to have a simple tool for that (ideally with selection
of subsections)...  But, well, not there...

anyway in the pcp you mainly look at the xml files.

Other files
- lazarus.dci => code templates. If you added new ones, you can copy,
but that overwrites templates added in later releases.
- staticpackages.inc => do NOT copy, maintained by installing packages

As for the paths included in xml files. Set up you first/source IDE to
use as many macros as possible
$(LazarusDir)
$Path($(LazarusDir))
$(CompPath)
$(FPCVer)
....

Then, I guess most of them can be copied. But not tested.



--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus configuration - portable between versions?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Sat, 6 Feb 2021 13:25:06 +0200, Juha Manninen via lazarus
<[hidden email]> wrote:

>On Sat, Feb 6, 2021 at 1:00 PM Bo Berglund via lazarus <
>[hidden email]> wrote:
>
>> By looking inside the file on my old installationm I see clearly that this
>> is
>> not the file I can modify, lots of version dependent paths inside...
>>
>
>What paths are version dependent?
>

It seems like in my Windows installation there are more of these than on Linux,
probably dependent on the usage (I use mostly Windows and here I do not build
fpc/lazarus from sources).

Here is the Linux case:

So in the environmentoptions.xml file there are a "lot" of items (5):
    <Version Value="110" Lazarus="2.0.8"/>
    <LazarusDirectory Value="../dev/lazarus/2.0.8">
      <History Count="3">
        <Item1 Value="../dev/lazarus/2.0.8/"/>
        <Item2 Value="../dev/lazarus/2.0.6/"/>
        <Item3 Value="/home/bosse/dev/lazarus/2.0.6/"/>
      </History>
    </LazarusDirectory>
    <LastCalledByLazarusFullPath Value="/home/bosse/dev/lazarus/2.0.8/lazarus"/>

But in .lazarus_2.0.8/editoroptions.xml I found only this:

<CodeTools CodeTemplateFileName="/home/bosse/.lazarus_2.0.6/lazarus.dci"
CompletionLongLineHintTypeCompletionLongLineHintType="sclpExtendRightOnly"/>

Apparently I have copied the file and the path now point into the wrong pcp
directory....

It looks on closer inspection that History and Recent sections in en
vironmentoptions.xml contain paths including version numbers.
But I guess I can disregard these or even remove them...

But as I wrote above I have found taht the editoroptions.xml is the one holding
the customizations of the editor so I copied it and modified the path inside
the <CodeTools CodeTemplateFileName= item
Then I used it and it seemed to work.

It would be nice to be able to import editor settings directly inside Lazarus,
though...

--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus configuration - portable between versions?

Free Pascal - Lazarus mailing list
LazarusDirectory tag indeed has version dependent paths.
I don't remember what exactly it is used for.
The Recent file lists are not important. They are updated dynamically and old entries will go away.

So, you can copy the whole configuration if you do some minor editing.

Juha


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus