Recent

Author Topic: macro that returns the lazarus/lcl version  (Read 10539 times)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: macro that returns the lazarus/lcl version
« Reply #15 on: June 19, 2014, 10:52:48 pm »

Been too long since I played with Delphi - can't remember this being a feature, or how it would have been implemented...  Sounds useful though.


There you go the Delphi 2007 option for that specific ability (attached).
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Stephano

  • New Member
  • *
  • Posts: 32
Re: macro that returns the lazarus/lcl version
« Reply #16 on: June 20, 2014, 05:42:08 pm »
OK the problem is that you guys release faster than I test or install. Good for you but I end up with multiple installations until I get thinks going at this time I have two 1.0.14 and 1.2.0 the problem starts when I try to install the 3rd party component to one of my installations they overwrite the existing ppus making switching from one version to an other a bit slower to get up to speed. I was thinking to editing all the packages and adding something like $(FPCVer) in the output path bat since most of your releases use the same fpc this wouldn't help at all.

Instead of editing packages, just override the output directory in project options/additions and overrides (stored in the IDE) and use the FPCVER macro (or any other macro) there. You can then set these project options as default.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: macro that returns the lazarus/lcl version
« Reply #17 on: June 20, 2014, 05:50:39 pm »
Instead of editing packages, just override the output directory in project options/additions and overrides (stored in the IDE) and use the FPCVER macro (or any other macro) there. You can then set these project options as default.

Yeah seen that didn't even try to understand it. It looks like some ones nightmare puked on screen. No real value to me not unless I find some documentation explaining what I'm looking.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1263
Re: macro that returns the lazarus/lcl version
« Reply #18 on: June 21, 2014, 09:08:12 am »
Instead of editing packages, just override the output directory in project options/additions and overrides (stored in the IDE) and use the FPCVER macro (or any other macro) there. You can then set these project options as default.
Nicely found.  I see you can add your own IDE Macros there as well, and change their values according to your different build modes. 

I agree, that UI is pretty non-intuitive.  But now I've had a quick play, it certainly reproduces some of the functionality that I can deduce from the D2007 screenshot.  Only thing missing from there is environment variables...
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

Stephano

  • New Member
  • *
  • Posts: 32
Re: macro that returns the lazarus/lcl version
« Reply #19 on: June 21, 2014, 10:56:30 am »
Only thing missing from there is environment variables...

You can use env variables too:
$Env(env_var)

http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames#Environment

Edit:
If you want to override env variables, use run/runparameters/Environment
« Last Edit: June 21, 2014, 11:04:15 am by Stephano »

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1263
Re: macro that returns the lazarus/lcl version
« Reply #20 on: June 21, 2014, 11:32:28 am »
Excellent :-)
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1263
Re: macro that returns the lazarus/lcl version
« Reply #21 on: June 23, 2014, 06:28:47 am »
Patch for $(LAZVer) accepted in trunk...
http://bugs.freepascal.org/view.php?id=26379
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: macro that returns the lazarus/lcl version
« Reply #22 on: June 23, 2014, 06:33:39 am »
Patch for $(LAZVer) accepted in trunk...
http://bugs.freepascal.org/view.php?id=26379

Congratulations, very well done and thank you.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018