Recent

Author Topic: Update Lazarus  (Read 1008 times)

microguy

  • Jr. Member
  • **
  • Posts: 56
Update Lazarus
« on: August 07, 2024, 03:45:04 am »
It has been awhile to use Lazarus. I have Version 2.2.4 and FPC Version 3.2.2.  What is the best way to update Lazarus? Do we need to uninstall old version and download new version 3.2? Where do we find more instruction on this?

Reid

dbannon

  • Hero Member
  • *****
  • Posts: 3071
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Update Lazarus
« Reply #1 on: August 07, 2024, 01:45:53 pm »
Reid, that depends on how you installed your Lazarus 2.2.4.  And, that probably depends on your operating system.

You can download and compile from source and, if you get your paths right, leave the existing one there. But some users do get in to trouble doing that, for, usually, very specific reasons relating to how the original was installed and their OS.

A (purely) source built Lazarus does make it easy to have multiple copies.

Lots of install instructions on the wiki.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

FrankBKK

  • New Member
  • *
  • Posts: 36
Re: Update Lazarus
« Reply #2 on: August 07, 2024, 02:01:31 pm »
My approach on this (Win):

- installed Lazarus fully portable (see https://forum.lazarus.freepascal.org/index.php?topic=55474.0 )
- backup existing copy
- install over the existing copy
- rebuild Lazarus
- Lazarus should now be up to date inc. all 3rd party components
- if something goes wrong roll back and ask here for help ;-)

Dzandaa

  • Sr. Member
  • ****
  • Posts: 351
  • From C# to Lazarus
Re: Update Lazarus
« Reply #3 on: August 07, 2024, 02:14:29 pm »
Hi,
I prefer to completely uninstall the Lazarus and its Packages before installing a new version.
I list the packages installed in the package manager,
uninstall the Lazarus, destroy the .lazarus directory
(Windows: C:\Users\xxxuserxxx\AppData\Local\lazarus)
And reinstall the new version and packages.

It takes a little longer, but at least I'm sure I have the latest versions of the packages.

@microguy:

Which O.S. do you use? Linux, Windows or Mac?

B->

« Last Edit: August 07, 2024, 04:18:05 pm by Dzandaa »
Regards,
Dzandaa

microguy

  • Jr. Member
  • **
  • Posts: 56
Re: Update Lazarus
« Reply #4 on: August 08, 2024, 03:48:21 am »
I am using Window 10. My old computer Core i7 with 32 gb rams is working just fine with Window 10. I will do more reseach rather to uninstall Lazarus or create a new one which I will have both old version and new version.   Thank you for your information and suggestions.

Reid

dbannon

  • Hero Member
  • *****
  • Posts: 3071
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Update Lazarus
« Reply #5 on: August 08, 2024, 07:40:18 am »
Micro, if you want to keep multiple versions, then your options are limited. Its easily achieved by building from source but if you already have a package installed, you must manage the path issues.

You can and should start Lazarus with a command line switch that points to the appropriate config directory for that particular Lazarus install. Easily done by creating a lazarus.cfg file in the lazarus build/working directory.

Code: Pascal  [Select][+][-]
  1. --pcp=/home/dbannon/bin/Lazarus/LazConfigs/lazarus_3.2
  2.  
  3. or
  4.  
  5. --pcp=c:\Lazarus\LazConfigs\lazarus_3_2



Subtract 5 points if you use the user name "dbannon". You can copy the old config directory and use that as a starting point for the new install (but I wonder if going from 2.2.4 to 3.4 might be a big jump).  To try you would copy the config to a suitable dir, the Lazarus code to another suitable dir and do -

Code: Pascal  [Select][+][-]
  1. $> make bigide
  2. // create the lazarus.cfg file
  3. $> make useride
  4. $> ./lazarus

If you get error messages,  you may need to restore the config manually, just blow away the config directory and -

Code: Pascal  [Select][+][-]
  1. $> make clean bigide
  2. $> ./lazarus

In all cases, don't run "make install" start lazarus directly from its build/working directory, where your lazarus.cfg file its too.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

wp

  • Hero Member
  • *****
  • Posts: 12354
Re: Update Lazarus
« Reply #6 on: August 08, 2024, 07:57:29 am »
I am using Window 10. My old computer Core i7 with 32 gb rams is working just fine with Window 10. [...]  I will have both old version and new version.
I have more than a dozen Lazarus versions in my Windows 11. The trick is, in case of a release version, to check the box "Secondary installation" in the second (?) page of the installer, and to specify an empty directory for the Laz config files in the next page; and do not link any file types to this new version. In case of the main or fixes version,  I clone the corresponding code  from gitlab and build Lazarus by a batch script which first sets the path to an FPC/bin version which is currently required (fpc 3.2.2) and then executes "make clean bigide"; in the directory with the newly created lazarus exe I create a lazarus.cfg text file with the content "--pcp=<path to laz config of this installation>" where "path to laz config of this installation" has been specified in the installer as mentioned above. In the setup screen which opens when this version is started for the first time, I point FPC to the FPC3.2.2 directory (or whatever fits the main/fixes).
« Last Edit: August 12, 2024, 11:11:26 am by wp »

dseligo

  • Hero Member
  • *****
  • Posts: 1365
Re: Update Lazarus
« Reply #7 on: August 08, 2024, 09:51:49 am »
I also use multiple installations of Lazarus, for years now.
One reason is if new version comes out, I want to set it up and test it first, so I still have older version running in case of troubles with new version.
Other reason is I that I have separate version for embedded (AVR) and Android (LAMW). And trunk.

I use "Secondary installation" as wp said too (for 32 bit and 64 bit Windows targets).
But I also use fpcupdeluxe to install Lazarus for AVR, LAMW, trunk as it is easier for me.

heejit

  • Full Member
  • ***
  • Posts: 247
Re: Update Lazarus
« Reply #8 on: August 12, 2024, 10:36:28 am »
you can use following program to install difference version of lazarus and cross compliers
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases

 

TinyPortal © 2005-2018