Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2021-02

Lazarus configuration - portable between versions?

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

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

Reply by email

Bo Berglund
to Bo Berglund
Bo Berglund wrote 10 lines
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

Reply by email

Juha Manninen
to Bo Berglund

On Sat, Feb 6, 2021 at 1:00 PM Bo Berglund via lazarus <

Show quoted text 6 lines
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210206/0336f34c/attachment.html>

Reply by email

Martin Frb
to Bo Berglund: On Sat, 06 Feb 2021 11:46:55 +0100, Bo Berglund via lazarus By looking inside the file on…
Bo Berglund wrote 16 lines
On Sat, 06 Feb 2021 11:46:55 +0100, Bo Berglund via lazarus 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.

Reply by email

Bo Berglund
to Juha Manninen: On Sat, Feb 6, 2021 at 1:00 PM Bo Berglund via lazarus < What paths are version dependent?
Juha Manninen wrote 10 lines
On Sat, Feb 6, 2021 at 1:00 PM Bo Berglund via lazarus < > 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

Reply by email

Juha Manninen
to Bo Berglund

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210207/1475c66f/attachment.html>

Reply by email