Recent

Author Topic: Two version of Lazarus - can't extract to different folder  (Read 2907 times)

rigczTheSky

  • Newbie
  • Posts: 5
Two version of Lazarus - can't extract to different folder
« on: October 02, 2023, 08:11:24 am »
Hi. I have some old version of Lazurus installed in C:\Lazarus. I was trying to install the newest one in different directory so i do:
 git clone -b fixes_2_2 https://gitlab.com/freepascal.org/lazarus/lazarus.git
on
  C:\Lazarus-fixes22.

Next i changed the path: 'c:\' to 'c:\Lazarus-nowy' - directory i created for new installation in three files:

C:\Lazarus-fixes22\Makefile
C:\Lazarus-fixes22\Makefile.fpc
C:\Lazarus-fixes22\ide\include\win\lazbaseconf.inc
 
Now i run 'make clean bigide' but it extract file to c:\Lazarus
Does anybody can tell me how to change this path?
« Last Edit: October 02, 2023, 11:37:18 am by rigczTheSky »

af0815

  • Hero Member
  • *****
  • Posts: 1379
Re: Two version of Lazarus - can't extract to different folder
« Reply #1 on: October 02, 2023, 08:28:15 am »
Some choices
a) Remove the old installation and make a new installation
b) search for second installation of Lazarus (eg. with google https://wiki.freepascal.org/Multiple_Lazarus see on the bottom of the page the possibility with the installer, deal with the path, with a fresh from git it is not so easy)
c) use fpcupdeluxe (for installation of fpc and lazaus side by side) https://wiki.freepascal.org/fpcupdeluxe
https://github.com/LongDirtyAnimAlf/fpcupdeluxe
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.4.0a
« Last Edit: October 02, 2023, 08:32:00 am by af0815 »
regards
Andreas

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: Two version of Lazarus - can't extract to different folder
« Reply #2 on: October 02, 2023, 08:37:59 am »
Code: [Select]
> cd work
> git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus
> cd lazarus
> git switch fixes_2_2
> make bigide
> make install INSTALL_PREFIX=C:/lazarus/2.2.0_fixes
> c:/lazarus/2.2.0_fixes/startlazarus --pcp=c:/lazarus/2.2.0_fixes/lazarus_configuration_directory

I am not sure if it is required to create the "lazarus_configuration_directory" before starting Lazarus.

Before starting your fresh build lazarus, make sure that you make a backup of your old Lazarus installation configuration files, and copy them to a more secure location such as shown in the example above and make sure to start your older installation of Lazarus using the --pcp option but using the correct configuration directory for that older installation.

Make sure to read the link posted by af0815 about multiple lazarus and also do not forget to update your startmenu link (for both your lazarus') accordingly (or whatever that menu is called in windows these days).
« Last Edit: October 02, 2023, 08:49:34 am by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Two version of Lazarus - can't extract to different folder
« Reply #3 on: October 02, 2023, 01:45:09 pm »
...
Next i changed the path: 'c:\' to 'c:\Lazarus-nowy' - directory i created for new installation in three files:

C:\Lazarus-fixes22\Makefile
C:\Lazarus-fixes22\Makefile.fpc
C:\Lazarus-fixes22\ide\include\win\lazbaseconf.inc

Hmm, you changed the c:\ in those files ?  OK, so be careful, I am NOT a windows user. But I don't think those files should have any explicit path information in them. I use the same Lazarus source on linux and something like c:\ would mean very little here. The make process is intended to make the necessary binaries in the current directory where you run the make command. And it should not be doing any 'extract' any where. Perhaps there is some confusion about names here ?

Going over your process, I suggest you should be, from the command line -
Code: [Select]
$> git clone -b fixes_2_2 https://gitlab.com/freepascal.org/lazarus/lazarus.git c:\Lazarus-fixes22
$> cd  C:\Lazarus-fixes22
$> make clean bigide

Then, create, in that same directory, a lazarus.cfg file, with, maybe -
Code: [Select]
--pcp=c:\LazConfigs\LazFixes22
(Make sure that file is a plain text one, you know windows, I don't and I have trouble with such things !)

Just to make sure, make the config dir -
Code: [Select]
$> md c:\LazConfigs
$> md c:\LazConfigs\LazFixes22

Then, while still in the same directory, start Lazarus (it will use the lazarus.cfg file for the config location) -
Code: [Select]
$> .\lazarus
Afterwards, after you exit Lazarus and do something else, to come back, first change to that directory and then start Lazarus there, all from the Command Line. This could easily be in a batch file, you know more about that than me !

Code: [Select]
cd C:\Lazarus-fixes22
.\lazarus

Probably important to ensure that NO Lazarus is in your path for this to work. I think the explicate ".\lazarus" should not use the PATH but Windows is not my OS.  If you have a path set to Lazarus, its possible the make may call lazbuild (?) or other tools from the original Lazarus during the build. 

FPC should be in your PATH. If you want to use multiple FPC, bit more complicated.

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: 12459
Re: Two version of Lazarus - can't extract to different folder
« Reply #4 on: October 02, 2023, 02:46:08 pm »
In addition to what dbannon wrote:

I have Delphi on my system and this makes massive changes to my path. Therefore all these simple commands like "make bigide" do not work since it calls Delphi's make utility (I refuse to add FPC to the path). In every Lazarus installation (I have more than 10 on the same sytem), I have a batch file, make_laz.bat, to compile Lazarus - it sets the FPC path only temporarily:

Code: [Select]
set path=C:\Lazarus\fpc-3.2.2\bin\i386-win32;%path%
make clean bigide

(where the path specified is the path to the FPC directory).

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: Two version of Lazarus - can't extract to different folder
« Reply #5 on: October 02, 2023, 08:26:24 pm »
I have Delphi on my system and this makes massive changes to my path. Therefore all these simple commands like "make bigide" do not work since it calls Delphi's make utility (I refuse to add FPC to the path).
Kudo's for the refusal to add FPC to the path (I refuse to do that as well).

Provided that FPC is setup correctly you can then use "make clean bigide FPC="path/and/name/to/fpc/executable"" without any need to adjust the path, not even temporary. In case needed you can use @ to force your own fpc.cfg file in case the makefile overrules.
« Last Edit: October 03, 2023, 02:08:06 am by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

 

TinyPortal © 2005-2018