Recent

Author Topic: Upgrading Lazarus IDE  (Read 5057 times)

fcs

  • New Member
  • *
  • Posts: 10
Upgrading Lazarus IDE
« on: October 08, 2019, 07:41:43 pm »
Hello,

I have installed Lazarus IDE version 2.0.0 which is configured for my needs (IDE and components).

Is there any way to upgrade to version 2.0.4 without full reinstall the IDE and components ?

Regards
Michal

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Upgrading Lazarus IDE
« Reply #1 on: October 09, 2019, 07:17:27 am »
What I always do (and works fine for me) is just install the new version over the old one, start Lazarus (you won't see your components yet) and then rebuild the IDE.
After that when you start Lazarus again you should see all your installed components again and can continue working.
If you want to play it safe you can of course first make a copy of your Lazarus installation.
In case of problems just drop the original folders with the new version and rename the copy folder to the original folder name of the previous version and all should work again.
Mind you, I work on a Windows machine, don't know if the same solution will work on Linux.
« Last Edit: October 09, 2019, 07:23:56 am by JanRoza »
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

fcs

  • New Member
  • *
  • Posts: 10
Re: Upgrading Lazarus IDE
« Reply #2 on: October 09, 2019, 08:10:41 am »
Hello,

Thank you.

What Lazarus version can I upgrade in this way ?

Does it work only for 2.0.0 to 2.0.xx or 2.xx.xx to 2.yy.yy too ?


Regards
Michal



JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Upgrading Lazarus IDE
« Reply #3 on: October 09, 2019, 09:39:34 am »
With me it has worked with any upgrade.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

Thaddy

  • Hero Member
  • *****
  • Posts: 14390
  • Sensorship about opinions does not belong here.
Re: Upgrading Lazarus IDE
« Reply #4 on: October 09, 2019, 09:47:21 am »
With me it has worked with any upgrade.
except some revisions of trunk that is: that  is a moving target... and if you miss an update....
But generally upgrading works indeed, just not always trunk.
You could have a checkout while programmers were still working to complete it.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: Upgrading Lazarus IDE
« Reply #5 on: October 09, 2019, 10:27:59 am »
I don't care about the 10 minutes to reconfigure the installation and to install the components and ALWAYS do a secondary installation. This way I still have the old installation available for the case that the new installation poses some unexpected problems.

A secondary installation can be made when you check the corresponding box in the installer. This means that the configuration files are stored in a folder different from the default.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9909
  • Debugger - SynEdit - and more
    • wiki
Re: Upgrading Lazarus IDE
« Reply #6 on: October 09, 2019, 11:22:33 am »
Your configuration is stored separate from the installation:
C:\Users\martin\AppData\Local\lazarus
or  on Linux
~/.lazarus

The installer does not touch this (the win installer has an option, which is off by default)
You can also backup that path

The config also contains which packages you have installed. After a new install you rebuild the IDE, and the package will get build in again.
Of course if you downloaded the package then they must still exist. That is if you downloaded them into c:/lazarus (or wherever your installation is, then you can not delete this folder. The uninstaller (at least Windows) only uninstalls the files that the installer put in place, so that usually would leave them in place even if they are in the folder.


fcs

  • New Member
  • *
  • Posts: 10
Re: Upgrading Lazarus IDE
« Reply #7 on: October 09, 2019, 12:21:46 pm »
Hello,

Thanks you all for information.

At this moment I have installed both versions 1.8.4 and 2.0.0. I want to update 2.0.0 to 2.0.4. The Lazarus config files I have stored in folders where each versions of Lazarus is installed:

d:\lazarus\config\   for 1.8.4
d:\lazarus_2\config\   for 2.0.0

In both IDEs I use the AnchorDocking package and a lot of third party components (UniDac, FastReport, etc). In the IDE I have set my own style for fonts and colors.

As I understand your information:
- I can save my current version by zipping d:\lazarus_2 folder
- Install into this folder version 2.0.4
- run Lazarus 2.0.4 (the settings will be restored from version 2.0.0)
- rebuild the Lazarus to restore components

Is this true ?

Regards
Michal

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Upgrading Lazarus IDE
« Reply #8 on: October 09, 2019, 01:20:31 pm »
That should work yes.
Don't forget to include subfolders when zipping the Lazarus folder.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9909
  • Debugger - SynEdit - and more
    • wiki
Re: Upgrading Lazarus IDE
« Reply #9 on: October 09, 2019, 01:31:54 pm »
Yes that would work.

Lazarus only stores info in its config folder. And what is in the install folder. Nothing in the registry (the installer does, so it is listed in installed apps, but not Lazarus itself).
So zipping those folders, saves all you have. You need to put them back in the same place. The config has full paths stored.

If you used the installer to create 2ndary installs (with the config path that you have), then the info about where that config path is, is stored in a file called lazarus.cfg in the same directury as the lazarus.exe (main dir of install).

So that gives you all the info you need to backup/restore/update your install(s).

--------
About hardcode path:
If you move the folder of any package (e.g. 3rd party package), the IDE will not find it. But if you use menu package > open package to open it, the IDE will remember the new path (rather than you having to edit config files by hand.

If you move the FPC folder, you need to find fpc.cfg inside it, and update it. And under Tools > Options, correct the path to fpc, fpc source and make.

fcs

  • New Member
  • *
  • Posts: 10
Re: Upgrading Lazarus IDE
« Reply #10 on: October 09, 2019, 01:45:59 pm »
Hello,

Thank you all for information and help in solving this problem.

Regards
Michal

 

TinyPortal © 2005-2018