* * *

Author Topic: Show proper version numbers in Lazarus  (Read 1606 times)

OLLI_S

  • New member
  • *
  • Posts: 19
Show proper version numbers in Lazarus
« on: June 23, 2018, 11:48:22 am »
Dear Lazarus Team,

I help improving an update manager (software that checks your system for installed applications and reports updates) by keeping the database up-to-date and by adding new apps to the database.
At Lazarus I saw that the version numbers stored in the EXE (C:\lazarus\lazarus.exe) do not match the version displayed at the website/in the application:
  • File version in the lazarus.exe: 1.8.0.5
  • Product version in the lazarus.exe: 1.8.0.2
  • Version number displayed at your website: 1.8.4
The update manager is not able to detect the proper version number (1.8.4) from lazarus.exe
So please store the version 1.8.4 in the lazarus.exe.

Thank you!

Gest regards

OLLI
« Last Edit: June 23, 2018, 12:41:56 pm by OLLI_S »

OLLI_S

  • New member
  • *
  • Posts: 19
Re: Show proper version numbers in Lazarus
« Reply #1 on: July 11, 2018, 11:29:39 am »
Is there any other file that can be used to read out the version number 1.8.4?
This would really help!
Thenk you!

GetMem

  • Hero Member
  • *****
  • Posts: 3155
Re: Show proper version numbers in Lazarus
« Reply #2 on: July 11, 2018, 12:01:45 pm »
Quote
Is there any other file that can be used to read out the version number?
($LazarusDir)\components\ide\version.inc
($LazarusDir)\components\lazutils\lazversion.pas

OLLI_S

  • New member
  • *
  • Posts: 19
Re: Show proper version numbers in Lazarus
« Reply #3 on: July 11, 2018, 03:55:29 pm »
It would be easier when the correct version is stored in the lazarus.exe because the update manager reads this information from EXE files and all other products work this way.

OLLI_S

  • New member
  • *
  • Posts: 19
Re: Show proper version numbers in Lazarus
« Reply #4 on: July 11, 2018, 03:57:27 pm »
($LazarusDir)\components\ide\version.inc
($LazarusDir)\components\lazutils\lazversion.pas

Thank you.
I am currently at work and will test tonight what is listed in those files.

It would be easier when the correct version is stored in the lazarus.exe because the update manager reads this information from EXE files and all other products work this way.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4781
    • wiki
Re: Show proper version numbers in Lazarus
« Reply #5 on: July 11, 2018, 04:28:56 pm »
It would be easier when the correct version is stored in the lazarus.exe because the update manager reads this information from EXE files and all other products work this way.
This should normally be done. But as it appears errors can happen. (It is not automated).
Anyway this can only be fixed for the next version.

OLLI_S

  • New member
  • *
  • Posts: 19
Re: Show proper version numbers in Lazarus
« Reply #6 on: July 11, 2018, 06:46:07 pm »
($LazarusDir)\components\ide\version.inc
($LazarusDir)\components\lazutils\lazversion.pas

I searched for the files in my Lazarus directory (C:\Lazarus) but the folder \components\ is not existing.
I found C:\lazarus\ide\version.inc and here the version number is shown.
But I did not find lazversion*.*

This should normally be done. But as it appears errors can happen. (It is not automated).
Anyway this can only be fixed for the next version.

I know that it can only be done for the next release, but I really would appreciate if the version number is stored in the lazarus.exe.
And If this is now done for all future releases.

Thank you!

Best regards

OLLI

ASerge

  • Hero Member
  • *****
  • Posts: 898
Re: Show proper version numbers in Lazarus
« Reply #7 on: July 11, 2018, 08:50:13 pm »
($LazarusDir)\components\ide\version.inc
($LazarusDir)\components\lazutils\lazversion.pas
This is taken from the file ($LazarusDir)\IDE\lazarus.lpi:
Code: XML  [Select]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <CONFIG>
  3.   <ProjectOptions>
  4. ...
  5.     <VersionInfo>
  6.       <UseVersionInfo Value="True"/>
  7.       <MajorVersionNr Value="1"/>
  8.       <MinorVersionNr Value="8"/>
  9.       <BuildNr Value="5"/>
  10.       <CharSet Value="04B0"/>
  11.       <StringTable ProductName="Lazarus IDE" ProductVersion="1.8.0.2"/>
  12.     </VersionInfo>

wp

  • Hero Member
  • *****
  • Posts: 4903
Re: Show proper version numbers in Lazarus
« Reply #8 on: July 11, 2018, 08:57:14 pm »
If you have Laz 1.8.4 or older add "lclversion" to the "uses" clause. CTRL-Left-Click on this word, and the unit lclversion will be loaded into the editor. In Laz trunk you should do the same wth the unit "lazversion".

In the source editor you see these constants for the current lazarus version:

Code: Pascal  [Select]
  1. const
  2.   laz_major = 1;
  3.   laz_minor = 9;
  4.   laz_release = 0;
  5.   laz_patch = 0;
  6.   laz_fullversion = ((laz_major *  100 + laz_minor) * 100 + laz_release) * 100 + laz_patch;
  7.   laz_version = '1.9.0.0';
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

OLLI_S

  • New member
  • *
  • Posts: 19
Re: Show proper version numbers in Lazarus
« Reply #9 on: July 11, 2018, 09:06:37 pm »
Your answers (that I should include some units in my project) show that you misunderstood me.
Sorry if I caused any misunderstanding.

I am a hobby programmer but I am not the programmer of the update manager.
I am helping the update manager keeping the database up-to-date (report missing apps and missing versions to the database).
So I coded a little too in Lazarus for helping me (but this is not the update manager).

Recently I reported Lazarus to the database and I discovered that the version number stored in the lazarus.exe is not the same number displayed in Help -> About.
So I suggested that you correct this, so the update manager can detect the installed version correctly.
And this update manager can be used by every user (also by users that have Lazarus installed).


Thaddy

  • Hero Member
  • *****
  • Posts: 6728
Re: Show proper version numbers in Lazarus
« Reply #10 on: July 11, 2018, 09:08:35 pm »
Side note:
I compile fpc trunk to also include the revision number:
Example:
Code: Bash  [Select]
  1. sudo make clean all install  REVINC=force REVSTR=39423  PP=/home/pi/fpcstart
Version is obtained from svnversion in a little script.

Should be doable for Lazarus too.
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

OLLI_S

  • New member
  • *
  • Posts: 19
Re: Show proper version numbers in Lazarus
« Reply #11 on: July 11, 2018, 09:49:13 pm »
The idea is that the update manager can be used with "normal" installations of applications.
So I just download and install Lazarus (out of the box) in Windows and the update manager is trying to read the version number.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus