Recent

Author Topic: Moving Lazarus installation  (Read 1615 times)

ronhud

  • Full Member
  • ***
  • Posts: 105
Moving Lazarus installation
« on: February 25, 2025, 05:00:47 pm »
I reinstalled Lazarus into a new path rather than over the previous installation.  I realise that my most recent Lazarus installation has an unwieldy long path and I would prefer one with less levels down.    I assume that just copying all files would raise problems with configuration.   Is the only way to reinstall over the original path?

TRon

  • Hero Member
  • *****
  • Posts: 4377
Re: Moving Lazarus installation
« Reply #1 on: February 25, 2025, 05:29:19 pm »
A conclusive answer can not be provided because that depends on what method was used to install Lazarus (and the Free Pascal compiler). E.g, compiled manually from source, FPCUpDeluxe, Zip-File from somewhere, Portable version, official installer (from where), package-manager (which one)  etc..

edit: in basics (for a normal setup) there are two important files a) "lazarus.cfg" and b) fpc.cfg. Depending on the version of Lazarus file a might not be available/supported in which case the start parameter -pcp in the startup-link comes into play. The settings in there now refer to your current location where things are stored and these should be adjusted to match the new location. Other than that it is a simple move from the original location to the new location. Perhaps could trigger the Lazarus setup dialog (again depending on your version of Lazarus) for reconfiguration because it was unable yo locate the debugger, FPC compiler and/or other tools it depends on.

Whatever you do make at least a backup of all your FreePascal and Lazarus configuration directories/files.
« Last Edit: February 25, 2025, 05:52:39 pm by TRon »
Today is tomorrow's yesterday.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12108
  • Debugger - SynEdit - and more
    • wiki
Re: Moving Lazarus installation
« Reply #2 on: February 25, 2025, 07:53:35 pm »
If you move the install you need at least

- update/recreate fpc.cfg (On Windows deep inside the fpc.cfg folder // On Linux separet install, so you may not need to move it)
- in case of a 2ndary installation the path to config inside lazarus.cfg (this does not exist in a normal install)
- update environmentoptions.xml  (maybe some other xml in your "primary config path")

"primary config path" is
~/.lazarus on linux
%APPDATA%\lazarus  (or similar) on Windows (that is in C:\user\......

Menu: View > Ide Internals > About IDE -- and in that window search for "primary config path"

With a bit of luck that is it.


ronhud

  • Full Member
  • ***
  • Posts: 105
Re: Moving Lazarus installation
« Reply #3 on: February 27, 2025, 03:51:41 pm »
Thank you for the info - looks like I need a bit of reflection before embarking on this

 

TinyPortal © 2005-2018