Micha Nelissen пишет:
Jouke Rensma wrote:Yes, this is a good idea. I think this way is the same way that is used in Delphi. Also, as I see Lazarus stores this information in <projectname>.or file that is, IMHO, simple *.res file. I have some small code that can extract that kind of information (version number) at runtime. Here it is Procedure FillStrListWithFileVersionInfo; var sAppExeName,sChapter:Array[0..256] of Char; iAppVerInfoSize, Len, i :LongWord; sBuffer :PChar; sValue :PChar; Begin sAppExeName := Application.ExeName; iAppVerInfoSize:= GetFileVersionInfoSize(sAppExeName,iAppVerInfoSize); if iAppVerInfoSize > 0 then begin sBuffer := AllocMem(iAppVerInfoSize); GetFileVersionInfo(sAppExeName, 0, iAppVerInfoSize, sBuffer); for i := 1 to InfoNum do Begin sChapter:='StringFileInfo\040904E4\' + InfoStr[i]; if VerQueryValue(sBuffer, sChapter, sValue, Len) then AppVersionStrList.Add(InfoStr[i] + ' = ' + sValue); End; FreeMem(sBuffer, iAppVerInfoSize); end; End; It works both in Delphi and in Lazarus. Regards. Alexey. |
- Re: [lazarus] Version information Mattias Gaertner
- Re: [lazarus] Version information Marc Weustink
- Re: [lazarus] Version information Jouke Rensma
- Re: [lazarus] Version information Mattias Gaertner
- Re: [lazarus] Version information Jouke Rensma
- Re: [lazarus] Version information Mattias Gaertner
- Re: [lazarus] Version informati... Jouke Rensma
- Re: [lazarus] Version infor... Mattias Gaertner
- Re: [lazarus] Version information Alex Smirnov
