Recent

Author Topic: How migrate options to another computer?  (Read 2442 times)

ssawgift

  • New Member
  • *
  • Posts: 48
    • My Personal Website
How migrate options to another computer?
« on: December 02, 2022, 12:50:33 pm »
I have some personal options inside a VM intallation. Now I have installed another copy in a computer. Is there any easy way to migrate my options to this new computer?

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: How migrate options to another computer?
« Reply #1 on: December 02, 2022, 01:13:43 pm »
copy the configuration files.
Specialize a type, not a var.

ssawgift

  • New Member
  • *
  • Posts: 48
    • My Personal Website
Re: How migrate options to another computer?
« Reply #2 on: December 02, 2022, 01:54:05 pm »
copy the configuration files.
Have you done this before? Did it work?
I examined the config files and I see hard-coded paths in some config files, e.g. "c:\documents and settings\USERNAME" instead of %userprofile%.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: How migrate options to another computer?
« Reply #3 on: December 02, 2022, 02:29:56 pm »
There is something called  "Primary config path" (PCP)

Menu: View > Ide Internals > About IDE

Usually:
C:\Users\YOUR_NAME\AppData\Local\lazarus 
or on Linux ~/.lazarus

Some of the xml files may contain absolute paths. So if you have a different path on the target, those need to be updated.

You are mainly interested in the xml files.
You can check out others by content.....

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: How migrate options to another computer?
« Reply #4 on: December 02, 2022, 02:37:38 pm »
I do it often, it works.

I am computer technician, fixing my client's hardware and software. Also my own computer. I regularly upgrade my computer, format/install/re-install my hard drive. Once in every 2 years, but sometimes 3 times in a year.

I backup and keep my Lazarus' config files, especially:
- editoroptions.xml
- environmentoption.xml

As Thaddy said, copy the configuration files. That should be okay. But in some rare cases, the Lazarus won't start or it can start but cannot be rebuild. That happens because the config file (packagefiles.xml if I am correct) has one or more packages that aren't installed on the newly installed Lazarus. But that wouldn't be hard to fix, because all the config files can be manually edited using a text editor.

I use Linux.

ssawgift

  • New Member
  • *
  • Posts: 48
    • My Personal Website
Re: How migrate options to another computer?
« Reply #5 on: December 02, 2022, 02:40:17 pm »
I really don't want to copy all those files. I only care about these options:

*Jedi format options

* Editor autocompletion. For example, when I type:
Code: Pascal  [Select][+][-]
  1. self.Cap
  2.  
The editor prompts Caption and I hit ENTER, default config will use compact autocompletion:
Code: Pascal  [Select][+][-]
  1. self.Caption:=
  2.  
My personal taste is one space before and after the assignment operator:
Code: Pascal  [Select][+][-]
  1. self.Caption := 'text'
  2.  

Can anyone tell me which files to copy?

There is something called  "Primary config path" (PCP)

Menu: View > Ide Internals > About IDE

Usually:
C:\Users\YOUR_NAME\AppData\Local\lazarus 
or on Linux ~/.lazarus

Some of the xml files may contain absolute paths. So if you have a different path on the target, those need to be updated.

You are mainly interested in the xml files.
You can check out others by content.....

DomingoGP

  • Jr. Member
  • **
  • Posts: 60
Re: How migrate options to another computer?
« Reply #6 on: December 02, 2022, 09:30:53 pm »
Quote
Can anyone tell me which files to copy?
*Jedi format options

Usually on windows:
C:\Users\YOUR_NAME\AppData\Local\lazarus\jcfsettings.cfg
or on Linux:
~/.lazarus/jcfsettings.cfg

Quote
* Editor autocompletion

Usually on windows:
C:\Users\YOUR_NAME\AppData\Local\lazarus\codetoolsoptions.xml
on Linux:
 ~/.lazarus/codetoolsoptions.xml

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: How migrate options to another computer?
« Reply #7 on: December 02, 2022, 09:48:38 pm »
My personal taste is one space before and after the assignment operator:
Code: Pascal  [Select][+][-]
  1. self.Caption := 'text'
I would like to have that too, would someone be nice to explain "how-to" please?
( With config I have nearly no experience at all, I am happy that now my new projects having my windows needed things included  8-) )
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

DomingoGP

  • Jr. Member
  • **
  • Posts: 60
Re: How migrate options to another computer?
« Reply #8 on: December 02, 2022, 10:26:20 pm »
You can get that selecting where to insert spaces in the Tools/Options menu.
Then in the codetools / space options select the options you like.
Selecting in front of "symbol" and after "simbol" works for me  :).

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: How migrate options to another computer?
« Reply #9 on: December 02, 2022, 10:36:01 pm »
Thank you very much @DomingoGP!
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

DomingoGP

  • Jr. Member
  • **
  • Posts: 60
Re: How migrate options to another computer?
« Reply #10 on: December 02, 2022, 10:44:15 pm »
You are welcome.

ssawgift

  • New Member
  • *
  • Posts: 48
    • My Personal Website
Re: How migrate options to another computer?
« Reply #11 on: December 03, 2022, 07:43:06 am »
That's why I ask this question. I once knew where to tweak this, but eventually I forgot...
You can get that selecting where to insert spaces in the Tools/Options menu.
Then in the codetools / space options select the options you like.
Selecting in front of "symbol" and after "simbol" works for me  :).

ssawgift

  • New Member
  • *
  • Posts: 48
    • My Personal Website
Re: How migrate options to another computer?
« Reply #12 on: December 03, 2022, 07:18:57 pm »
Yes! That's what I need, plus editoroptions.xml. And I need to manually change absolute paths in these files.

Quote
Can anyone tell me which files to copy?
*Jedi format options

Usually on windows:
C:\Users\YOUR_NAME\AppData\Local\lazarus\jcfsettings.cfg
or on Linux:
~/.lazarus/jcfsettings.cfg

Quote
* Editor autocompletion

Usually on windows:
C:\Users\YOUR_NAME\AppData\Local\lazarus\codetoolsoptions.xml
on Linux:
 ~/.lazarus/codetoolsoptions.xml

 

TinyPortal © 2005-2018