Recent

Author Topic: Lazarus portable?  (Read 1919 times)

BrunoK

  • Hero Member
  • *****
  • Posts: 747
  • Retired programmer
Re: Lazarus portable?
« Reply #15 on: November 05, 2025, 05:26:21 pm »
$(LazarusDir)\fpc\$(FPCVERSION)\bin\x86_64-win64\fpc.exe
But those $FPCVERSION macros aren't recognised.

Is there anything I can replace them with?
Should be something like $(LazarusDir)\fpc\$(FPCVer)\bin\x86_64-win64\fpc.exe. $(FPCVERSION) does not seem to be a valid one.

Except those specified in https://wiki.freepascal.org/IDE_Macros_in_paths_and_filenames, there may be others that require going to the source.

Today I found that some fields do not behave in a comprehensible manner regarding the substitutions. 

sl23

  • Newbie
  • Posts: 6
Re: Lazarus portable?
« Reply #16 on: November 05, 2025, 09:39:59 pm »
Thank you! :D

BrunoK

  • Hero Member
  • *****
  • Posts: 747
  • Retired programmer
Re: Lazarus portable?
« Reply #17 on: November 06, 2025, 05:00:03 pm »
Also forgot to mention that real environment macros are displayed in lazarus via Menu/View/IDE Internals/About IDE -> select IDE Macros to view macros known to lazarus.

Note :-; -> ConfigDir is NOT a  valid macro ... but ConfDir is OK

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12562
  • FPC developer.
Re: Lazarus portable?
« Reply #18 on: November 06, 2025, 06:06:20 pm »
Should be something like $(LazarusDir)\fpc\$(FPCVer)\bin\x86_64-win64\fpc.exe. $(FPCVERSION) does not seem to be a valid one.

Which is logical.  $FPCVERSION is determined by querying fpc.exe, so can't be used in the path of fpc.exe :-)

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1269
Re: Lazarus portable?
« Reply #19 on: November 07, 2025, 04:13:55 am »
I use a "portable" version of Lazarus under Windows, but I cheat :-)  I map a Folder to B:\ (sometime as USB mapping, but mostly using appropriate regkey to mount a folder as B:\.  I keep that folder synced across multiple PCs using Resilio Sync).

B:\ hasn't been used by Windows since the age of the floppies, so I'm never competing against other systems and my config paths don't need changing.
Lazarus Trunk/FPC latest fixes on Windows 11
  I'm getting old and stale.  Slowly getting used to git, I'll get there...

parcel

  • Full Member
  • ***
  • Posts: 144
Re: Lazarus portable?
« Reply #20 on: November 07, 2025, 02:04:35 pm »
https://github.com/rasberryrabbit/FPC_FPCUP_Set

I made tool for setting patch in lazarus configuration. I used it for fpcupdeluxe.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6229
  • Compiler Developer
Re: Lazarus portable?
« Reply #21 on: November 08, 2025, 06:29:28 pm »
I have not tested it, but in theory you could simply use drive absolute paths in the configuration on Windows. That are paths that start simply with a backslash without a drive letter and color and Windows will resolve that to the drive of the current working directory (and if you start an application using Windows Explorer or such the working directory will be set to the directory of the executable).

 

TinyPortal © 2005-2018