Browse Source

+ Added fileinfo object

michael 25 years ago
parent
commit
3e5162f23d
5 changed files with 394 additions and 547 deletions
  1. 333 547
      fcl/tests/Makefile
  2. 2 0
      fcl/tests/Makefile.fpc
  3. 31 0
      fcl/tests/showver.pp
  4. 28 0
      fcl/tests/showver.rc
  5. BIN
      fcl/tests/showver.res

File diff suppressed because it is too large
+ 333 - 547
fcl/tests/Makefile


+ 2 - 0
fcl/tests/Makefile.fpc

@@ -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 - 0
fcl/tests/showver.pp

@@ -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 - 0
fcl/tests/showver.rc

@@ -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


Some files were not shown because too many files changed in this diff