Browse Source

instantfpc: fixed compilation for 2.4.4

git-svn-id: trunk@18029 -
Mattias Gaertner 14 years ago
parent
commit
391f268bbb
1 changed files with 7 additions and 6 deletions
  1. 7 6
      utils/instantfpc/instantfptools.pas

+ 7 - 6
utils/instantfpc/instantfptools.pas

@@ -145,9 +145,7 @@ var
   StartPos: LongInt;
   Dir: String;
   CompFile: String;
-  i: Integer;
-  Param: String;
-  
+
 begin
   Result:=CmdCompiler;
   if (Result<>'') then
@@ -166,9 +164,9 @@ begin
   {$ELSE}
   CompFile:='fpc';
   {$ENDIF}
-  Result:=ExeSearch(CompFile);
   Path:=GetEnvironmentVariable('PATH');
-{  if PATH<>'' then begin
+  {$IFDEF VER2_4}
+  if PATH<>'' then begin
     p:=1;
     while p<=length(Path) do begin
       StartPos:=p;
@@ -181,7 +179,10 @@ begin
       inc(p);
     end;
   end;
-}
+  {$ELSE}
+  Result:=ExeSearch(CompFile);
+  {$ENDIF}
+
   if (Result='') then
     begin
     writeln('Error: '+CompFile+' not found in PATH');