mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 18:29:13 +02:00
* Fix to allow go32v2 compliation
git-svn-id: trunk@17670 -
This commit is contained in:
parent
449c20ce63
commit
068b373015
@ -2,10 +2,21 @@ unit InstantFPTools;
|
|||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
{$define UseFpExecV}
|
||||||
|
|
||||||
|
{$ifdef MSWINDOWS}
|
||||||
|
{$undef UseFpExecV}
|
||||||
|
{$define HASEXEEXT}
|
||||||
|
{$endif MSWINDOWS}
|
||||||
|
{$ifdef go32v2}
|
||||||
|
{$undef UseFpExecV}
|
||||||
|
{$define HASEXEEXT}
|
||||||
|
{$endif go32v2}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFNDEF MSWINDOWS}
|
{$IFDEF UseFpExecV}
|
||||||
Unix,
|
Unix,
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Classes, SysUtils, Process;
|
Classes, SysUtils, Process;
|
||||||
@ -200,7 +211,7 @@ begin
|
|||||||
if (p<>'') and (p[1]='-') then
|
if (p<>'') and (p[1]='-') then
|
||||||
Result:=p; // copy compile params from the script
|
Result:=p; // copy compile params from the script
|
||||||
end;
|
end;
|
||||||
AddParam('-o'+OutputFilename {$IFDEF MSWINDOWS} + '.exe' {$ENDIF},Result);
|
AddParam('-o'+OutputFilename {$IFDEF HASEXEEXT} + '.exe' {$ENDIF},Result);
|
||||||
AddParam(SrcFilename,Result);
|
AddParam(SrcFilename,Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -216,7 +227,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
inc(p);
|
inc(p);
|
||||||
end;
|
end;
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFNDEF UseFpExecV}
|
||||||
Inc(p); //lose the first command-line argument with the the script filename
|
Inc(p); //lose the first command-line argument with the the script filename
|
||||||
Halt(ExecuteProcess(Filename,[p^]));
|
Halt(ExecuteProcess(Filename,[p^]));
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
|
Loading…
Reference in New Issue
Block a user