mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 16:49:31 +02:00
+ Added fileinfo object
This commit is contained in:
parent
3e82220fd2
commit
3e5162f23d
1067
fcl/tests/Makefile
1067
fcl/tests/Makefile
File diff suppressed because it is too large
Load Diff
@ -6,6 +6,8 @@
|
||||
programs=stringl dparser fstream mstream list threads testrtf \
|
||||
cfgtest xmldump htdump testcgi tidea \
|
||||
b64test b64test2 b64enc b64dec restest testz testz2
|
||||
programs_win32=showver
|
||||
|
||||
rst=restest
|
||||
|
||||
[require]
|
||||
|
31
fcl/tests/showver.pp
Normal file
31
fcl/tests/showver.pp
Normal file
@ -0,0 +1,31 @@
|
||||
program showversion;
|
||||
|
||||
{$mode fpc}
|
||||
{$R showver.res}
|
||||
|
||||
uses sysutils,fileinfo;
|
||||
|
||||
Var version : TFileVersionInfo;
|
||||
I : longint;
|
||||
|
||||
begin
|
||||
Version:=TFileVErsionInfo.create(Nil);
|
||||
Version.FileName:=paramstr(1);
|
||||
With Version do
|
||||
begin
|
||||
if Not FileExists(Paramstr(1)) then
|
||||
begin
|
||||
Writeln (Format('%s : No such file or directory',[Paramstr(1)]));
|
||||
Halt(1);
|
||||
end;
|
||||
FileName:=Paramstr(1);
|
||||
If VersionStrings.Count=0 then
|
||||
begin
|
||||
Writeln (Format('%s : No version information found.',[paramstr(1)]));
|
||||
Halt(2);
|
||||
end;
|
||||
For i:=0 to VersionStrings.Count-1 do
|
||||
Writeln (VersionCategories[I],'=',VersionStrings[i]);
|
||||
free;
|
||||
end;
|
||||
end.
|
28
fcl/tests/showver.rc
Normal file
28
fcl/tests/showver.rc
Normal file
@ -0,0 +1,28 @@
|
||||
LANGUAGE 1033,1252
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 4, 0, 3, 17
|
||||
PRODUCTVERSION 3, 0, 0, 0
|
||||
FILEFLAGSMASK 0
|
||||
FILEOS 0x40000
|
||||
FILETYPE 1
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "040904E4"
|
||||
{
|
||||
VALUE "CompanyName", "Borland International\000\000"
|
||||
VALUE "FileDescription", "Delphi QuickReport Component Package\000\000"
|
||||
VALUE "FileVersion", "4.0.3.17\000"
|
||||
VALUE "InternalName", "QRPT30\000\000"
|
||||
VALUE "LegalCopyright", "Copyright \251 Borland International 1997\000\000"
|
||||
VALUE "OriginalFilename", "QRPT30.DPL\000\000"
|
||||
VALUE "ProductName", "Borland Delphi\000\000"
|
||||
VALUE "ProductVersion", "3.0\000\000"
|
||||
}
|
||||
|
||||
}
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 1033, 1252
|
||||
}
|
||||
}
|
BIN
fcl/tests/showver.res
Normal file
BIN
fcl/tests/showver.res
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user