[Lazarus] Program version

Antonio Fortuny a.fortuny at sitasoftware.lu
Wed Nov 6 16:43:15 CET 2013

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-)
Next step is to build some general procedure to retrieve the version of 
any pogram on any platform as far as far as the source file is 
accessible and has the platform executable signature.
I think I have all the peices right now. Leave some days (I have other 
things to do for which I'm paid and a boss looking over my shoulder >:o 
, he is very comprehensive though).

Anyway, thank you to you two.
I'ill come back here when I have something clean and working.

> And you can avoid ifdefs by additionally to unit "resources" using the 
> units "elfreader", "winpeimagereader" and "versionresource". Then you 
> can do "Rs.LoadFromFile(sProgram);" 
Does make sense. In fact that's exactly what I've done just before your 
> (the explicit reader isn't needed as the extension will be used) and 
> either loop through all resources like you currently do or use 
> "Rs.Find(RT_VERSION, 1)" which should(!) return you the correct 
> version resource.
Which avoids the ridiculous loop
> Regards,
> Sven
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Sita Software
*Antonio Fortuny*
Senior Software engineer

220, avenue de la Liberté
L-4602 Niederkorn
Tel.: +352 58 00 93 - 93
www.sitasoftware.lu <http://www.sitasoftware.lu>
Your IT Partner

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131106/2326d60d/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fbhdfeff.jpg
Type: image/jpeg
Size: 2306 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131106/2326d60d/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icbdgbgf.jpg
Type: image/jpeg
Size: 921 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131106/2326d60d/attachment-0007.jpg>

More information about the Lazarus mailing list