mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 19:11:03 +02:00
* Linux now also uses the DosExecute and ExecuteRedir procedures
(merged from fixes branch)
This commit is contained in:
parent
9eaa410ca7
commit
dce21480a1
@ -800,7 +800,9 @@ end;
|
|||||||
|
|
||||||
function TIDEApp.DoExecute(ProgramPath, Params, InFile,OutFile: string; ExecType: TExecType): boolean;
|
function TIDEApp.DoExecute(ProgramPath, Params, InFile,OutFile: string; ExecType: TExecType): boolean;
|
||||||
var CanRun: boolean;
|
var CanRun: boolean;
|
||||||
|
{$ifndef linux}
|
||||||
PosExe: sw_integer;
|
PosExe: sw_integer;
|
||||||
|
{$endif linux}
|
||||||
begin
|
begin
|
||||||
SaveCancelled:=false;
|
SaveCancelled:=false;
|
||||||
CanRun:=AutoSave;
|
CanRun:=AutoSave;
|
||||||
@ -820,26 +822,26 @@ begin
|
|||||||
if ExecType=exDosShell then
|
if ExecType=exDosShell then
|
||||||
WriteShellMsg;
|
WriteShellMsg;
|
||||||
|
|
||||||
{$ifdef linux}
|
|
||||||
Shell(ProgramPath+' '+Params);
|
|
||||||
{$else}
|
|
||||||
{ DO NOT use COMSPEC for exe files as the
|
{ DO NOT use COMSPEC for exe files as the
|
||||||
ExitCode is lost in those cases PM }
|
ExitCode is lost in those cases PM }
|
||||||
|
|
||||||
|
{$ifndef linux}
|
||||||
posexe:=Pos('.EXE',UpCaseStr(ProgramPath));
|
posexe:=Pos('.EXE',UpCaseStr(ProgramPath));
|
||||||
{ if programpath was three char long => bug }
|
{ if programpath was three char long => bug }
|
||||||
if (posexe>0) and (posexe=Length(ProgramPath)-3) then
|
if (posexe>0) and (posexe=Length(ProgramPath)-3) then
|
||||||
begin
|
begin
|
||||||
|
{$endif linux}
|
||||||
if (InFile='') and (OutFile='') then
|
if (InFile='') and (OutFile='') then
|
||||||
DosExecute(ProgramPath,Params)
|
DosExecute(ProgramPath,Params)
|
||||||
else
|
else
|
||||||
ExecuteRedir(ProgramPath,Params,InFile,OutFile,'stderr');
|
ExecuteRedir(ProgramPath,Params,InFile,OutFile,'stderr');
|
||||||
|
{$ifndef linux}
|
||||||
end
|
end
|
||||||
else if (InFile='') and (OutFile='') then
|
else if (InFile='') and (OutFile='') then
|
||||||
DosExecute(GetEnv('COMSPEC'),'/C '+ProgramPath+' '+Params)
|
DosExecute(GetEnv('COMSPEC'),'/C '+ProgramPath+' '+Params)
|
||||||
else
|
else
|
||||||
ExecuteRedir(GetEnv('COMSPEC'),'/C '+ProgramPath+' '+Params,InFile,OutFile,'stderr');
|
ExecuteRedir(GetEnv('COMSPEC'),'/C '+ProgramPath+' '+Params,InFile,OutFile,'stderr');
|
||||||
{$endif}
|
{$endif linux}
|
||||||
|
|
||||||
if ExecType<>exNoSwap then
|
if ExecType<>exNoSwap then
|
||||||
ShowIDEScreen;
|
ShowIDEScreen;
|
||||||
@ -1080,7 +1082,11 @@ end;
|
|||||||
END.
|
END.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 2000-08-22 09:41:39 pierre
|
Revision 1.3 2000-09-22 15:24:04 jonas
|
||||||
|
* Linux now also uses the DosExecute and ExecuteRedir procedures
|
||||||
|
(merged from fixes branch)
|
||||||
|
|
||||||
|
Revision 1.2 2000/08/22 09:41:39 pierre
|
||||||
* first big merge from fixes branch
|
* first big merge from fixes branch
|
||||||
|
|
||||||
Revision 1.1.2.7 2000/08/21 12:10:19 jonas
|
Revision 1.1.2.7 2000/08/21 12:10:19 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user