Re: [Lazarus] Program version

2013-11-07 Thread Michael Van Canneyt
On Thu, 7 Nov 2013, Sven Barth wrote: Am 07.11.2013 15:08, schrieb Antonio Fortuny: Hi again. I succeeded to make one source unit which when used into any Lazarus unit, gives the version of any file as far as the file : - has been compiled whith Lazarus or Delphi - version information is i

Re: [Lazarus] Program version

2013-11-07 Thread Sven Barth
Am 07.11.2013 15:08, schrieb Antonio Fortuny: Hi again. I succeeded to make one source unit which when used into any Lazarus unit, gives the version of any file as far as the file : - has been compiled whith Lazarus or Delphi - version information is in the resource data ad hoc (as Lazarus and

Re: [Lazarus] Program version

2013-11-07 Thread Antonio Fortuny
Hi again. I succeeded to make one source unit which when used into any Lazarus unit, gives the version of any file as far as the file : - has been compiled whith Lazarus or Delphi - version information is in the resource data ad hoc (as Lazarus and Delphi provide) The file to analyze can be an

Re: [Lazarus] Program version

2013-11-07 Thread Hans-Peter Diettrich
Antonio Fortuny schrieb: I'm pretty sure that you do guess what I'm trying to do: have only one fuction to retrieve the version of any program on any platform. Please understand that every platform has its own executable file formats. This means that your program must include an executable fi

Re: [Lazarus] Program version

2013-11-06 Thread Antonio Fortuny
Le 06/11/2013 16:31, Sven Barth a écrit : If you look at my other mail you'll see the solution. The reader unit for Windows PE files is WinPEImageReader. You're rigth and I used your comment to buil the test and it runs nice.  8-) Ne

Re: [Lazarus] Program version

2013-11-06 Thread Sven Barth
Am 06.11.2013 16:07, schrieb Antonio Fortuny: Le 06/11/2013 15:46, Anton Kavalenka a écrit : Handle of EXE (hInstance) or .SO hMod:=Loadlibrary(dll_name); Works fine on Win32 with *hInstance*: great ! 8-) I guess it will run on Linux too Thanks. regards, Anton The code I use for Linux is the

Re: [Lazarus] Program version

2013-11-06 Thread Sven Barth
Am 06.11.2013 15:46, schrieb Anton Kavalenka: On 06.11.2013 17:39, Antonio Fortuny wrote: Le 06/11/2013 14:41, Anton Kavalenka a écrit : The unit versionresource is part of package fcl-res I already use it for Linux with a Linux executable file Unit allow x-platform version resource extract

Re: [Lazarus] Program version

2013-11-06 Thread Antonio Fortuny
Le 06/11/2013 15:52, Sven Barth a écrit : Am 06.11.2013 15:46, schrieb Anton Kavalenka: On 06.11.2013 17:39, Antonio Fortuny wrote: Le 06/11/2013 14:41, An

Re: [Lazarus] Program version

2013-11-06 Thread Antonio Fortuny
Le 06/11/2013 15:46, Anton Kavalenka a écrit : Handle of EXE (hInstance) or .SO hMod:=Loadlibrary(dll_name); Works fine on Win32 with hInstance: great ! 8-) I guess it will run on Linux too Thanks. regards,

Re: [Lazarus] Program version

2013-11-06 Thread Sven Barth
Am 06.11.2013 15:39, schrieb Antonio Fortuny: Le 06/11/2013 14:41, Anton Kavalenka a écrit : The unit versionresource is part of package fcl-res I already use it for Linux with a Linux executable file Unit allow x-platform version resource extraction and parsing. rsrc:=TVersionResource.Creat

Re: [Lazarus] Program version

2013-11-06 Thread Anton Kavalenka
On 06.11.2013 17:39, Antonio Fortuny wrote: Le 06/11/2013 14:41, Anton Kavalenka a écrit : The unit versionresource is part of package fcl-res I already use it for Linux with a Linux executable file Unit allow x-platform version resource extraction and parsing. rsrc:=TVersionResource.Create;

Re: [Lazarus] Program version

2013-11-06 Thread Antonio Fortuny
Le 06/11/2013 14:41, Anton Kavalenka a écrit : The unit versionresource is part of package fcl-res I already use it for Linux with a Linux executable file Unit allow x-platform version resource extraction and parsing. rsrc:=TVersionResource.Create; Stream := TResourceStream.CreateFromID(*hMod

Re: [Lazarus] Program version

2013-11-06 Thread Sven Barth
Am 06.11.2013 13:39, schrieb Antonio Fortuny: Hi Folks. Currently I can extract any Windows program version as far as it has been compilerd on a Win platform using either Delphi or Lazarus. I can do the same on a Linux program on a Linux platform as fas as far as the version has been embedde s

Re: [Lazarus] Program version

2013-11-06 Thread Anton Kavalenka
On 06.11.2013 15:39, Antonio Fortuny wrote: Hi Folks. Currently I can extract any Windows program version as far as it has been compilerd on a Win platform using either Delphi or Lazarus. I can do the same on a Linux program on a Linux platform as fas as far as the version has been embedde som

[Lazarus] Program version

2013-11-06 Thread Antonio Fortuny
Hi Folks. Currently I can extract any Windows program version as far as it has been compilerd on a Win platform using either Delphi or Lazarus. I can do the same on a Linux program on a Linux platform as fas as far as the version has been embedde somewhere in the elf. So fa, so good. But do yo

Re: [Lazarus] program version

2012-01-02 Thread Antonio Fortuny
Thanks to you both. Useful and it works perfecly. Thanks again. Antonio. Le 02/01/2012 10:06, Antonio Fortuny a écrit : Hi folks. First of all happy new year 2012. Lazarus provides the possibility to include the program version in the project options. I've the ability to extract it at runt

Re: [Lazarus] program version

2012-01-02 Thread michael . vancanneyt
On Mon, 2 Jan 2012, Antonio Fortuny wrote: Hi folks. First of all happy new year 2012. Lazarus provides the possibility to include the program version in the project options. I've the ability to extract it at runtime using the WIndows core functions GetFileVersionInfoSize, GetFileVersionIn

Re: [Lazarus] program version

2012-01-02 Thread Sven Barth
Am 02.01.2012 10:06, schrieb Antonio Fortuny: Hi folks. First of all happy new year 2012. Lazarus provides the possibility to include the program version in the project options. I've the ability to extract it at runtime using the WIndows core functions GetFileVersionInfoSize, GetFileVersionInfo

[Lazarus] program version

2012-01-02 Thread Antonio Fortuny
Hi folks. First of all happy new year 2012. Lazarus provides the possibility to include the program version in the project options. I've the ability to extract it at runtime using the WIndows core functions GetFileVersionInfoSize, GetFileVersionInfo and VerQueryValue. I would like to know if