Recent

Author Topic: Lazarus Version as String  (Read 2763 times)

Dick Maley

  • New Member
  • *
  • Posts: 26
Lazarus Version as String
« on: May 28, 2015, 03:25:27 pm »
Is it possible to get the version of Lazarus being used as a string in code?

Dick Maley

  • New Member
  • *
  • Posts: 26
Re: Lazarus Version as String
« Reply #1 on: May 28, 2015, 03:51:52 pm »
I did find the lazarus version in version.inc in the ide directory.  It is not exactly what I wanted, but accessing this file I can turn it into a string.

BitBangerUSA

  • Full Member
  • ***
  • Posts: 183
Re: Lazarus Version as String
« Reply #2 on: May 28, 2015, 04:54:01 pm »
that of course, will only work on machines where Lazarus is installed.
have you thought about using Version Information for the project?
this could be a problem if you are doing a multi-platform program - i don't know.


 
Lazarus Ver 2.2.6 FPC Ver 3.2.2
Windows 10 Pro 64-bit

Zoran

  • Hero Member
  • *****
  • Posts: 1829
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Lazarus Version as String
« Reply #3 on: May 28, 2015, 08:55:14 pm »
Is it possible to get the version of Lazarus being used as a string in code?

Add unit "LCLVersion" to uses section. Then take a look at the consts defined there

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Lazarus Version as String
« Reply #4 on: June 13, 2015, 09:11:09 am »
that of course, will only work on machines where Lazarus is installed.
have you thought about using Version Information for the project?
this could be a problem if you are doing a multi-platform program - i don't know.
This is only a problem if you interpret the file at runtime. Including at compile-time it to the code should be no problem.
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

 

TinyPortal © 2005-2018