浏览代码

* show full compiler version in About dialog

git-svn-id: trunk@4166 -
Tomas Hajny 19 年之前
父节点
当前提交
76ac54b78f
共有 2 个文件被更改,包括 29 次插入8 次删除
  1. 27 6
      ide/fpintf.pas
  2. 2 2
      ide/fpviews.pas

+ 27 - 6
ide/fpintf.pas

@@ -32,6 +32,7 @@ procedure SetPrimaryFile(const fn:string);
 function LinkAfter : boolean;
 {$ifdef USE_EXTERNAL_COMPILER}
 function version_string : string;
+function full_version_string : string;
 {$endif USE_EXTERNAL_COMPILER}
 
 
@@ -227,12 +228,32 @@ end;
 function version_string : string;
   begin
     if not ExecuteRedir(ExternalCompilerExe,'-iV','','ppc___.out','ppc___.err') then
-      version_string:=version.version_string;
-    Assign(CompilerOut,'ppc___.out');
-    Reset(CompilerOut);
-    Readln(CompilerOut,s);
-    Close(CompilerOut);
-    version_string:=s;
+      version_string:=version.version_string
+    else
+     begin
+      Assign(CompilerOut,'ppc___.out');
+      Reset(CompilerOut);
+      Readln(CompilerOut,s);
+      Close(CompilerOut);
+      version_string:=s;
+     end;
+  end;
+
+function full_version_string : string;
+  begin
+    if not ExecuteRedir(ExternalCompilerExe,'-iW','','ppc___.out','ppc___.err') then
+      full_version_string:=version.full_version_string
+    else
+     begin
+      Assign(CompilerOut,'ppc___.out');
+      Reset(CompilerOut);
+      Readln(CompilerOut,s);
+      Close(CompilerOut);
+      if Pos ('-iW', S) <> 0 then
+(* Unknown option - full version not supported! *)
+       S := Version_String;
+      full_version_string:=s;
+     end;
   end;
 {$endif USE_EXTERNAL_COMPILER}
 

+ 2 - 2
ide/fpviews.pas

@@ -4094,7 +4094,7 @@ begin
   Insert(New(PStaticText, Init(R2, ^C'With Graphic Support')));
   R2.Move(0,1);
 {$endif USE_GRAPH_SWITCH}
-  Insert(New(PStaticText, Init(R2, FormatStrStr2(^C'(%s %s)',label_about_compilerversion,Version_String))));
+  Insert(New(PStaticText, Init(R2, FormatStrStr2(^C'(%s %s)',label_about_compilerversion,Full_Version_String))));
 {$ifndef NODEBUG}
   if pos('Fake',GDBVersion)=0 then
     begin
@@ -4105,7 +4105,7 @@ begin
   else
 {$endif NODEBUG}
     R2.Move(0,2);
-  Insert(New(PStaticText, Init(R2, ^C'Copyright (C) 1998-2005 by')));
+  Insert(New(PStaticText, Init(R2, ^C'Copyright (C) 1998-2006 by')));
   R2.Move(0,2);
   Insert(New(PStaticText, Init(R2, ^C'B‚rczi G bor')));
   R2.Move(0,1);