Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Compile-Datum (https://www.delphipraxis.net/4736-compile-datum.html)

theomega 10. Mai 2003 12:01


Compile-Datum
 
Hallo Leute
ich bräuchte in meinem programm im "Über" Dialog eine Angabe, wann die EXE-Compiled wurde. Natürlich könnte man das Änderungsdatum der EXE nehmen, dummerweise geht das nicht, weil durch die Installation da nur das Installationsdatum drin steht!
Am einfachsten wäre ein Compiler-Parameter! Oder sonst noch eine Idee?

Danke
TO

jbg 10. Mai 2003 12:21

Bei mrExperts ist eine solche Funktion enthalten.

Dezipaitor 11. Mai 2003 21:31

ich habe in der delphi hilfe
unter

version ->
Reading version information-- Delphi example


das gefunden :

Code:
procedure TForm1.Button1Click(Sender: TObject);

const
  InfoNum = 10;
  InfoStr: array[1..InfoNum] of string = ('CompanyName', 'FileDescription', 'FileVersion', 'InternalName', 'LegalCopyright', 'LegalTradeMarks', 'OriginalFileName', 'ProductName', 'ProductVersion', 'Comments');
var
  S: string;
  n, Len, i: DWORD;
  Buf: PChar;
  Value: PChar;
begin
  S := Application.ExeName;
  n := GetFileVersionInfoSize(PChar(S), n);
  if n > 0 then
  begin

    Buf := AllocMem(n);
    Memo1.Lines.Add('VersionInfoSize = ' + IntToStr(n));
    GetFileVersionInfo(PChar(S), 0, n, Buf);
    for i := 1 to InfoNum do
      if VerQueryValue(Buf, PChar('StringFileInfo\040904E4\' + InfoStr[i]), Pointer(Value), Len) then
        Memo1.Lines.Add(InfoStr[i] + ' = ' + Value);
    FreeMem(Buf, n);
  end
  else
    Memo1.Lines.Add('No version information found');
end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:38 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz