Recent

Author Topic: How to upgrade my Lazarus under WIN10?  (Read 1674 times)

senglit

  • Full Member
  • ***
  • Posts: 135
How to upgrade my Lazarus under WIN10?
« on: June 19, 2020, 06:59:50 am »
Hi all,

I'm using Lazarus 2.0.6 now. When I install 2.0.8 I expected that I can upgrade my old version to the new version so that I can keep my packages which were installed from OPM. But the installer did not give me this choice but asking me if I want to uninstall the old version. So I stopped and come here to ask how can I install version 2.0.8 with all my installed packages remain available.

PS: I don't want to re-install those packages because my internet connection often failed to connect the online package server(fire wall problem). And sometime if I download packages from github or sourceforge, I often get problems when compile and install. The OPM is very good to use and I never got problem with it.
I use Win11 + Lazarus3.6 + FPC Trunk. fpcupdeluxe

wp

  • Hero Member
  • *****
  • Posts: 13226
Re: How to upgrade my Lazarus under WIN10?
« Reply #1 on: June 19, 2020, 04:40:18 pm »
What is the name of the directory in which you had installed Laz 2.0.6? Where is your config folder? ("View" > "IDE Internals" > "About IDE": the config folder is listed under "Global IDE options" as "Primary config directory")

senglit

  • Full Member
  • ***
  • Posts: 135
Re: How to upgrade my Lazarus under WIN10?
« Reply #2 on: June 21, 2020, 10:57:55 am »
What is the name of the directory in which you had installed Laz 2.0.6? Where is your config folder? ("View" > "IDE Internals" > "About IDE": the config folder is listed under "Global IDE options" as "Primary config directory")

I see. So, If I upgrade Lazarus IDE and re-install the packages saved in the primary config directory, it will work as well as installing from the OPM?
I use Win11 + Lazarus3.6 + FPC Trunk. fpcupdeluxe

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4633
  • I like bugs.
Re: How to upgrade my Lazarus under WIN10?
« Reply #3 on: June 21, 2020, 11:31:04 am »
I see. So, If I upgrade Lazarus IDE and re-install the packages saved in the primary config directory, it will work as well as installing from the OPM?
Yes, OPM has already downloaded the packages. No need to download them again.
The new Lazarus version can use the existing local configuration. You just need to rebuild Lazarus and the packages will be installed.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

wp

  • Hero Member
  • *****
  • Posts: 13226
Re: How to upgrade my Lazarus under WIN10?
« Reply #4 on: June 21, 2020, 01:38:23 pm »
You should be aware, though, that incompatibilities may be introduced in the config files from version to version, in particular when changing to a new major version. Therefore, it is highly recommended that you make a backup copy of you old config directory before installing a new lazarus version. In the rate case that the new version does not work correctly with the old config files you should delete the contents of the config directory - it will be rewritten with default settings. Restore the OPM files from the backup in there. Hoping that the packagefiles.xml and the staticpackages.inc were not changed copy these files, too. Rebuild the IDE, and everything should work again. In the next rare case that the two package files are incompatible you must repeat the previous step without copying these files and install your OPM packages manually ("Package" > "Open package file", navigate to the OPM folder in your config and open the .lpk files one by one. Click "Compile" for the runtime packages or "Use" > "Install" for the designtime packages.

But usually these steps are not needed. I just wanted to emphasize that it is a good idea to backup the config folder before installing a new version.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11827
  • Debugger - SynEdit - and more
    • wiki
Re: How to upgrade my Lazarus under WIN10?
« Reply #5 on: June 21, 2020, 01:46:04 pm »
The installer asks you to uninstall, yes. But there is a checkbox, and you can skip that step.

After you installed, into the existing directory, you will need to rebuild the IDE on first start.

The downloaded packages will still be there, but they need to be build with the updated version of the IDE.

 

TinyPortal © 2005-2018