Recent

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

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8738
  • Debugger - SynEdit - and more
    • wiki
Re: is there a "Lazarus.ini"?
« Reply #15 on: January 28, 2023, 10:16:03 am »
Editor settings (not window settings) are in EditorOptions.xml.
And that file shouldn't have any path.

Also many/most of the path can be (with a bit of once off work) made relative by using "($LazarusDir)".

But also you can remove sections that contain paths, after copying the file. Then the rest of the file will still be used.
Also path to fpc (and gdb, if still used) can be edited in the IDE if needed.

-----------------
I suggest not to copy files (to another install) if that contain packages and their paths.

Nicole

  • Hero Member
  • *****
  • Posts: 734
Re: is there a "Lazarus.ini"?
« Reply #16 on: January 28, 2023, 10:43:55 am »
Thank you for your reply.
The options, worth while saving, are not there.
Options are e.g. "jump into" or "where to place new methods" and so much more you prefer to work with.
All those looong lists, if you hit on "configuration"-icon (hope the word is the one in English).

The file you mention reads like this and does not look worth while saving:

Code: XML  [Select][+][-]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CONFIG>
  3.   <EditorOptions Version="13">
  4.     <Misc>
  5.       <ScrollOnEditLeftOptions KeepBorderDistance="2" KeepBorderDistancePercent="0" ScrollExtraColumns="5" ScrollExtraPercent="20" ScrollExtraMax="10"/>
  6.       <ScrollOnEditRightOptions KeepBorderDistance="0" KeepBorderDistancePercent="0" ScrollExtraColumns="10" ScrollExtraPercent="30" ScrollExtraMax="25"/>
  7.     </Misc>
  8.     <Display DoNotWarnForFont="Courier New"/>
  9.     <KeyMapping>
  10.       <default>
  11.         <Version Value="6"/>
  12.       </default>
  13.     </KeyMapping>
  14.     <CodeTools CodeTemplateFileName="C:\Users\.....\AppData\Local\lazarus\lazarus.dci" CompletionLongLineHintTypeCompletionLongLineHintType="sclpExtendRightOnly"/>
  15.     <Mouse>
  16.       <Default Version="1"/>
  17.     </Mouse>
  18.     <Color Version="13">
  19.       <LangObjectPascal>
  20.         <ColorScheme Value="Solarized2Day"/>
  21.       </LangObjectPascal>
  22.     </Color>
  23.     <General>
  24.       <Editor ShowTabCloseButtons="False"/>
  25.     </General>
  26.     <DividerDraw>
  27.       <LangObjectPascal>
  28.         <TypeUses>
  29.           <MaxDepth Value="1"/>
  30.         </TypeUses>
  31.         <TypeLStruct>
  32.           <MaxDepth Value="1"/>
  33.         </TypeLStruct>
  34.       </LangObjectPascal>
  35.     </DividerDraw>
  36.   </EditorOptions>
  37. </CONFIG>

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8738
  • Debugger - SynEdit - and more
    • wiki
Re: is there a "Lazarus.ini"?
« Reply #17 on: January 28, 2023, 10:57:35 am »
Maybe codetoolsoptions.xml ?
I haven't checked though.

I don't know from the top of my head what goes into which of the xml files.

But as I said, if you backup before making changes, then a (folder-) diff will give you the answer.



Lazarus does not store anything in the registry (innosetup does, but that is only for the unistaller)

There are more xml file in the PCP. (And it Lazarus 2.3 there now also is debuggeroptions.xml).
And the settings should be in those xml files.

The one xml file you do not wont to copy: packagefiles.xml
Because it's just paths.
You can put it in a backup, if you restore all installed packages too (and to the exact same location).
But a new install, you probably install the packages from scratch, and then packagefiles.xml will be an annoyance.


If you have your own code templates, they are in lazarus.dci
The other NON-XML files are likely better not copied to new installs.


Nicole

  • Hero Member
  • *****
  • Posts: 734
Re: is there a "Lazarus.ini"?
« Reply #18 on: January 28, 2023, 12:46:35 pm »
We share our feelings.
Me too, I think: These setting SHOULD be in one of those files.

So I opened them one by one... and cannot find anything.

and hm:
I want a slim backup, not huge VMs and complete installations of versions.

To save my projects takes 100 MB and 10 seconds.
The idea was  to add one more line into the backup-routine to save the IDE-settings.



dseligo

  • Hero Member
  • *****
  • Posts: 953
Re: is there a "Lazarus.ini"?
« Reply #19 on: January 28, 2023, 07:17:35 pm »
Options are e.g. "jump into" or "where to place new methods" and so much more you prefer to work with.

If by this you mean 'Jump directly to method body', then this option is in 'codetoolsoptions.xml' file.
Write English names of options you want to save and I can look up in which file they reside.

User color schemes are saved in 'userschemes' subdirectory.
Changes to key mappings are in 'editoroptions.xml'.

Nicole

  • Hero Member
  • *****
  • Posts: 734
Re: is there a "Lazarus.ini"?
« Reply #20 on: January 30, 2023, 12:21:07 pm »
My file "codetoolsoptions.xml" reads
Code: XML  [Select][+][-]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CONFIG>
  3.   <CodeToolsOptions>
  4.     <Version Value="2"/>
  5.     <JumpToMethodBody Value="True"/>
  6.     <UsesInsertPolicy Value="Last"/>
  7.     <IdentifierCompletion IncludeCodeTemplates="False" IncludeWords="No" ShowHelp="True"/>
  8.     <Indentation FileName="C:\Users\........\AppData\Local\lazarus\laz_indentation.pas"/>
  9.   </CodeToolsOptions>
  10. </CONFIG>

I doubt, that there is anything of verbose options saved inside.

dseligo

  • Hero Member
  • *****
  • Posts: 953
Re: is there a "Lazarus.ini"?
« Reply #21 on: January 30, 2023, 01:43:00 pm »
My file "codetoolsoptions.xml" reads
Code: XML  [Select][+][-]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CONFIG>
  3.   <CodeToolsOptions>
  4.     <Version Value="2"/>
  5.     <JumpToMethodBody Value="True"/>
  6.     <UsesInsertPolicy Value="Last"/>
  7.     <IdentifierCompletion IncludeCodeTemplates="False" IncludeWords="No" ShowHelp="True"/>
  8.     <Indentation FileName="C:\Users\........\AppData\Local\lazarus\laz_indentation.pas"/>
  9.   </CodeToolsOptions>
  10. </CONFIG>

I doubt, that there is anything of verbose options saved inside.

Option 'Jump directly to method body' is here under the key 'JumpToMethodBody'.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8738
  • Debugger - SynEdit - and more
    • wiki
Re: is there a "Lazarus.ini"?
« Reply #22 on: January 30, 2023, 01:47:15 pm »
"where to place new methods"

Well that looks like: <UsesInsertPolicy Value="Last"/>

Though not checked... But, you can test: change the option and see if this key/value follows your change.

The only other option is a long search through the sources. There is no complete map or the like.

Nicole

  • Hero Member
  • *****
  • Posts: 734
Re: is there a "Lazarus.ini"?
« Reply #23 on: January 30, 2023, 04:28:30 pm »
Please slowly for dummies: WHERE is it?
Does xml hide anything?
What I posted is the complete file. I do not see anything, which I would think, it is an user-set option.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8738
  • Debugger - SynEdit - and more
    • wiki
Re: is there a "Lazarus.ini"?
« Reply #24 on: January 30, 2023, 04:49:25 pm »
"where to place new methods"

Well that looks like: <UsesInsertPolicy Value="Last"/>

Though not checked... But, you can test: change the option and see if this key/value follows your change.

The only other option is a long search through the sources. There is no complete map or the like.

<UsesInsertPolicy Value="Last"/> is a user set option.
- "UsesInsertPolicy"  is the key (the internal name of the option)
- "Last" is the value set by the user (the internal value, not the display value).


And I believe (yet not verifyied) it is the one that spceifies where new methods are inserted.


All Options are either stored as
Code: Text  [Select][+][-]
  1. <KEY  value="VALUE"/>
or
Code: Text  [Select][+][-]
  1. <GROUPKEY  KEY="VALUE"/>

The names of the key are an internal representation. They usually have some (vague) association with the English description. Though if the description changed over time, then the Key may still be based on a completely different wording.

lainz

  • Hero Member
  • *****
  • Posts: 4127
Re: is there a "Lazarus.ini"?
« Reply #25 on: January 30, 2023, 04:49:45 pm »
I marked in the file with <----HERE---->

Please slowly for dummies: WHERE is it?
Does xml hide anything?
What I posted is the complete file. I do not see anything, which I would think, it is an user-set option.

My file "codetoolsoptions.xml" reads
Code: XML  [Select][+][-]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CONFIG>
  3.   <CodeToolsOptions>
  4.     <Version Value="2"/>
  5.     <JumpToMethodBody Value="True"/>
  6.     <UsesInsertPolicy Value="Last"/> <--------- HERE ---------->
  7.     <IdentifierCompletion IncludeCodeTemplates="False" IncludeWords="No" ShowHelp="True"/>
  8.     <Indentation FileName="C:\Users\........\AppData\Local\lazarus\laz_indentation.pas"/>
  9.   </CodeToolsOptions>
  10. </CONFIG>

I doubt, that there is anything of verbose options saved inside.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8738
  • Debugger - SynEdit - and more
    • wiki
Re: is there a "Lazarus.ini"?
« Reply #26 on: January 30, 2023, 04:53:20 pm »
Tough actually "UsesInsertPolicy " may be for the "uses unit, unit, ...;" clause.

Maybe your value for "method insert order" is the default. If you have a an option at its default value, then it is not stored in the config.

Nicole

  • Hero Member
  • *****
  • Posts: 734
Re: is there a "Lazarus.ini"?
« Reply #27 on: January 30, 2023, 07:10:31 pm »
There are lots of options NOT default. This has been the reason of my posting.

They work, - but I cannot see them in the named file.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8738
  • Debugger - SynEdit - and more
    • wiki
Re: is there a "Lazarus.ini"?
« Reply #28 on: January 30, 2023, 08:36:51 pm »
Well then it is probably in one of the other xml files.

Some options were originally displayed in a different category than today. And while the display may have changed, they are still in there old xml file.

There are only 2 ways to find out:

1) go through the source code
2) change the option, close the IDE (to save the file / though most files are saved when you close the options dlg), check which file changed.

Nicole

  • Hero Member
  • *****
  • Posts: 734
Re: is there a "Lazarus.ini"?
« Reply #29 on: January 31, 2023, 12:47:07 pm »
You are aware, that this is much more work, than setting the options again in a new installation?





 

TinyPortal © 2005-2018