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