Recent

Author Topic: is there a "Lazarus.ini"?  (Read 5424 times)

Nicole

  • Hero Member
  • *****
  • Posts: 970
is there a "Lazarus.ini"?
« on: January 26, 2023, 06:08:10 pm »
Yes, there is, but it does not contain, what I want to save.

What I want to save is the configuration of the IDE, everything if I click (I hope these are the correct word in English): IDE-configuration and read: environment, editor,.... There I can set the position of my new methods as well as I can click, if I want to change the configuration of my icons.

I searched a while for "ini" and "xml", but nothing seems to hold this information.
Which file to backup to save this?
Thanks.

And a wish to Santa-Clause: What about an icon "backup my IDE-settings"?  :-*

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: is there a "Lazarus.ini"?
« Reply #1 on: January 26, 2023, 06:32:02 pm »
The config is in the primary-config-path. And it is stored in several xml files.

Default
Linux: ~/.lazarus
Win: C:\Users\USERNAME\AppData\Local\lazarus

If non-default: Menu: View > Ide Internals > About Ide


There is an optional lazarus.cfg (search wiki), that can be used to set an alternative primary-conf-path

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: is there a "Lazarus.ini"?
« Reply #2 on: January 26, 2023, 06:35:49 pm »
Note, some xml files may contain absolute path (eg to the lazarus dir, or to fpc). So if you copy them to a 2nd install, you need to check those path.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: is there a "Lazarus.ini"?
« Reply #3 on: January 26, 2023, 08:20:54 pm »
Win: C:\Users\USERNAME\AppData\Local\lazarus
Not when installed with fpcupdeluxe application but thanks god that you also wrote
If non-default: Menu: View > Ide Internals > About Ide
thanks for that tip, I did not knew that one  :-*
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

qk

  • New Member
  • *
  • Posts: 32
Re: is there a "Lazarus.ini"?
« Reply #4 on: January 26, 2023, 08:53:20 pm »

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: is there a "Lazarus.ini"?
« Reply #5 on: January 27, 2023, 09:59:40 am »
Thank you for all answers.

To my mind: "desktop" does it all, but where is it?
There is no file by such a name as the name I chose for it.

About this deluxe Lazarus:
Would this mean, that I have to start from the beginning again? Plain VM, all components new and setting all options again?

CharlyTango

  • New Member
  • *
  • Posts: 46
Re: is there a "Lazarus.ini"?
« Reply #6 on: January 27, 2023, 10:58:15 am »
No, you don't really have to.
You'll find Desktops under Menu: Tools - Desktops

fpcupdeluxe is an advanced installer for Lazarus that also allows you to have multiple independent Lazarus installations on the same machine or VM.

Leave your Lazarus installation as it is and download fpcupdeluxe in the latest version.

I install my Lazarus instances like this:
Create a directory where you want to put all instances.
Mine is /lazarus
Create another directory where you want to store one instance.
for example /lazarus/laz224_fpc322_stable

copy the exe or executable of fpcupdeluxe into the new directory and run it from there.

When fpcupdeluxe is started choose the install directory (button "Set InstallDir")
Be sure that the checkbox "GitLab" is checked and press the big button with the green thumbs up.

You can play with the many installation options later.
Get a cup of tea and let fpcupdeluxe do the work. Everything is fetched up to date from the net and compiled correctly.

When fpcupdeluxe is done select the tab "Modules" and install OPM (Online Package Manager) with which you can later automatically fetch the necessary components from the net.

In my opinion the best way to install Lazarus.

You can delete your old Lazarus installation if needed by simply deleting the directory because Lazarus does not install anything outside of its directory.

This way you can run different versions of Lazarus side by side. For example one with which you develop and another one in which you can look at the latest news (trunk). With a version change one can also let the old and new version exist until one really wants to change.
Lazarus stable, Win32/64

TRon

  • Hero Member
  • *****
  • Posts: 2434
Re: is there a "Lazarus.ini"?
« Reply #7 on: January 27, 2023, 11:08:12 am »
You can delete your old Lazarus installation if needed by simply deleting the directory because Lazarus does not install anything outside of its directory.
afaik that is a untrue statement. The configuration of lazarus will be installed (by default) outside the Lazarus directory (and becomes a global setting). If you truly wish for Lazarus to be 'standalone' then start Lazarus with the --pcp option. You have to do that anyway if you are using multiple installations of Lazarus. Neglecting to do so will mess up your Lazarus configuration (between multiple installations).

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: is there a "Lazarus.ini"?
« Reply #8 on: January 27, 2023, 11:11:02 am »
The desktop settings are likely stored in one of the xml files.
Make a backup, change desktop settings, save. Then diff to the backup. That should tell you.

Editor Colors, and keymap are in EditorOptions.xml

Take care when reusing EnvironmentOptions.xml => you may have to adjust some paths.

-----------------
If you need more than one Lazarus install:
https://wiki.freepascal.org/Multiple_Lazarus#Using_lazarus.cfg_file

You create that lazarus.cfg once for each install, pointing to a new empty directory (or a dir containing some of the xml that you copied).

You have to check the startup file from fpc deluxe. Maybe it already sets a config path?? Then you wouldn't need the lazarus.cfg.
I don't use fpcupdeluxe, so I don't know.

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: is there a "Lazarus.ini"?
« Reply #9 on: January 27, 2023, 06:14:51 pm »
Thank you for the explanation of best install. I'll keep this for a rainy day.

What I do not understand:
What will the deLuxe version do for me in points of backup?

I want a KISS, keep it simple, keep it stupid.
Only one installation. I am no programmer, but am forced programming to realize a project of mine.

My idea is this: If there is a rainy day and I loose all my data, which files shall be found in my out-of-house-backup?
They shall enable me to work on in the most quickest way how I was used to work.

TRon

  • Hero Member
  • *****
  • Posts: 2434
Re: is there a "Lazarus.ini"?
« Reply #10 on: January 27, 2023, 06:44:14 pm »
What I do not understand:
What will the deLuxe version do for me in points of backup?
afaik nothing at all.

fpcdeluxe is a very convenient way of installing FPC and/or Lazarus especially when targeting multiple targets (cross-compilers). It is very helpful for installing different versions of FPC/Lazarus and doing so in such a way that they can work independent of eachother.

Quote
My idea is this: If there is a rainy day and I loose all my data, which files shall be found in my out-of-house-backup?
They shall enable me to work on in the most quickest way how I was used to work.
1. backup your own projects (better use a VCS for that).
2. backup your Lazarus/FPC configuration files
3. if you do not wish to redo your Lazarus install, then install/configure it once. Backup the whole thing and restore it in case of problems.

Unfortunately 3 depends on what 3th party components you have installed. The IDE get recompiled each time you add/remove components and thus isn't stable. So, when you have Lazarus setup in a way that is stable enough for you then make a backup of the whole installation directory so that you can return to a state that you consider happy/stable.

Personally I do not bother wrt 3. If all goes havoc I extract the source-code and rebuild Lazarus.
« Last Edit: January 27, 2023, 06:46:14 pm by TRon »

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: is there a "Lazarus.ini"?
« Reply #11 on: January 27, 2023, 08:26:58 pm »
What is a "VCS"?
From context it should be a third party provider.
I have one and can recommend it very much: Personal Backup.
This freeware was written by a Delphi-programmer for the purpose to backup - projects.
It has all those filters for types, which we need for a slim backup.

"slim", this is the word.

"2. backup your Lazarus/FPC configuration files" - I have a backup of my colors and an instruction how to restore.
Then I am back at the root of this question: Where are they? The ones I inspected, do NOT contain the work-intensive things as "where is the option which does...." There are hundreds of options and a dozens of them I changed. Some took me a day to find. I do not want to spend a week by re-searching.

"3. if you do not wish to redo your Lazarus install, then install/configure it once. Backup the whole thing and restore it in case of problems."

I can save the whole VM, - but it is that huge.
And I may want to install the next version and keep my settings.

It would be helpful if anybody can tell me at least: In which file are the desktops saved?

About the xmls:
I used a search-tool to find all xml - files. No one of it seemed to contain those environment-values.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: is there a "Lazarus.ini"?
« Reply #12 on: January 27, 2023, 09:36:08 pm »
What is a "VCS"?
Version Control System  :-*
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

TRon

  • Hero Member
  • *****
  • Posts: 2434
Re: is there a "Lazarus.ini"?
« Reply #13 on: January 28, 2023, 09:35:10 am »
What is a "VCS"?
KodeZwerg explained the acronym perfectly.

It is a piece of software that allows you to take care of different revisions of your source-code files. That is called a repository and allows you to store the files that belong to a project either locally (local hard drive or network drive/server) or online.

But, do not worry about it. If you have never heard of it before then I assume you are not familiar with it. In that case better leave that part alone for the moment. Just make sure you backup your project directories on a regular base.

Quote
Then I am back at the root of this question: Where are they? The ones I inspected, do NOT contain the work-intensive things as "where is the option which does...." There are hundreds of options and a dozens of them I changed. Some took me a
day to find. I do not want to spend a week by re-searching.
Indeed there are hundreds of options. Some options are global options and some options are project based (can be changed for every project).

That is also why Lazarus allows for some project related options to be generalized and stored in a more global manner so that you can re-use those settings by selecting your preferences when configuring an individual project. Sounds complicated but it isn't. You simply can set some options that you prefer and store that under different settings that you can use for every project (If you so wish so).

And that brings us to you issue because what option is stored where depends entirely on which option you are referring to (and how you have that configured). Having said that all Lazarus (global) settings are stored inside the Lazarus configuration directory while project related settings are stored inside the directory of a project.


Quote
"3. if you do not wish to redo your Lazarus install, then install/configure it once. Backup the whole thing and restore it in case of problems."
You can ofc opt to make a backup of your whole VM (depending on your VM there even might be a some sort of snapshot function available that takes a momentary snapshot of your installation that can be restored). But backing up your lazarus directory (plus configuration directory) should be enough.

Quote
It would be helpful if anybody can tell me at least: In which file are the desktops saved?
I would have to look into that if you wish for a detailed answer but believe it was answered by another user (here or in one of the other threads that you opened on this subject).

Quote
About the xmls:
I used a search-tool to find all xml - files. No one of it seemed to contain those environment-values.
Sorry, perhaps I missed something that you wrote earlier. Could you elaborate of what environment variables you speak of exactly ?

fwiw: user Martin_fr is one of the Lazarus developers/maintainers so take what he writes into consideration carefully. If he does not know or has a hunch then we are all doomed  :)
« Last Edit: January 28, 2023, 09:41:28 am by TRon »

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: is there a "Lazarus.ini"?
« Reply #14 on: January 28, 2023, 10:05:54 am »
Thank you for the hint about Martin.
I re-read his post and found a directory with xml-files not in Lazarus, but in
C:\Users\.....\AppData\Local\lazarus

Those files I opened and they do not like encouraging to be copied over a new installation.
They contain paths and much more, which looks to become messy in a new environment.

Martin:
Is there anywhere a wish-List where I can place my with: "let me backup my default editor settings"?
I am aware, that such a thing may be quite huge, because the code seems not to be prepared for it.

 

TinyPortal © 2005-2018