mirror of
https://github.com/fast4x/datalock.git
synced 2025-02-01 08:26:54 +01:00
35 lines
505 B
ObjectPascal
35 lines
505 B
ObjectPascal
|
unit getvers;
|
||
|
|
||
|
{$mode objfpc}{$H+}
|
||
|
|
||
|
interface
|
||
|
|
||
|
uses
|
||
|
Classes, SysUtils {$ifdef linux}, getvers_lin {$endif} {$ifdef windows}, getvers_win, getvers_simple_win{$endif} ;
|
||
|
|
||
|
Type
|
||
|
|
||
|
FilePath = String;
|
||
|
|
||
|
Function GetVersion (Var FilePath : String): String;
|
||
|
|
||
|
|
||
|
implementation
|
||
|
|
||
|
Function GetVersion (Var FilePath : String): String;
|
||
|
var xvers : string;
|
||
|
|
||
|
begin
|
||
|
{$ifdef windows}
|
||
|
result:=GetVersionSimpleWin(FilePath);
|
||
|
{$else}
|
||
|
GetProgramVersion(xvers,FilePath);
|
||
|
result:=xvers;
|
||
|
{$endif}
|
||
|
|
||
|
end;
|
||
|
|
||
|
|
||
|
end.
|
||
|
|