[Lazarus] Program version
pascaldragon at googlemail.com
Wed Nov 6 14:04:30 CET 2013
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 somewhere in the elf.
> So fa, so good.
> But do you now any method for a program running on a Linux platform to
> extract the version of a Window compiled program ? And vice-versa ?
For reading the version of a Windows executable on a Linux one you'd
need to copy what the resource API on Windows does plus parsing the
For reading the version of a Linux executable on Windows you'd need to
check how FPC implements this version information and parse the
executable image accordingly.
> Al I know about this is that the version is embedded somwhere into a
> resource into the executable
> Is it right if I assume that executable program signatures are
> Windows: first two bytes of the file are "MZ".
> Linux: first 4 bytes of the file are $7F'ELF'
For Windows definitely correct, for Linux I don't know, but seems legit...
More information about the Lazarus