Browse Source

--- Merging r43208 into '.':
U packages/fcl-process/src/processbody.inc
--- Recording mergeinfo for merge of r43208 into '.':
U .

# revisions: 43208

git-svn-id: branches/fixes_3_2@43217 -

marco 5 years ago
parent
commit
c31f787eb2
1 changed files with 9 additions and 6 deletions
  1. 9 6
      packages/fcl-process/src/processbody.inc

+ 9 - 6
packages/fcl-process/src/processbody.inc

@@ -177,9 +177,9 @@ Var
   Function DetectXTerm : String;
   Function DetectXTerm : String;
 {$endif unix}
 {$endif unix}
 
 
-function RunCommandIndir(const curdir:TProcessString;const exename:TProcessString;const commands:array of TProcessString;out outputstring:string; out exitstatus:integer; Options : TProcessOptions = []):integer;
-function RunCommandIndir(const curdir:TProcessString;const exename:TProcessString;const commands:array of TProcessString;out outputstring:string; Options : TProcessOptions = []):boolean;
-function RunCommand(const exename:TProcessString;const commands:array of TProcessString;out outputstring:string; Options : TProcessOptions = []):boolean;
+function RunCommandIndir(const curdir:TProcessString;const exename:TProcessString;const commands:array of TProcessString;out outputstring:string; out exitstatus:integer; Options : TProcessOptions = [];SWOptions:TShowWindowOptions=swoNone):integer;
+function RunCommandIndir(const curdir:TProcessString;const exename:TProcessString;const commands:array of TProcessString;out outputstring:string; Options : TProcessOptions = [];SWOptions:TShowWindowOptions=swoNone):boolean;
+function RunCommand(const exename:TProcessString;const commands:array of TProcessString;out outputstring:string; Options : TProcessOptions = [];SWOptions:TShowWindowOptions=swoNone):boolean;
 
 
 function RunCommandInDir(const curdir,cmdline:TProcessString;out outputstring:string):boolean; deprecated;
 function RunCommandInDir(const curdir,cmdline:TProcessString;out outputstring:string):boolean; deprecated;
 function RunCommand(const cmdline:TProcessString;out outputstring:string):boolean; deprecated;
 function RunCommand(const cmdline:TProcessString;out outputstring:string):boolean; deprecated;
@@ -593,7 +593,7 @@ end;
 Const
 Const
   ForbiddenOptions = [poRunSuspended,poWaitOnExit];
   ForbiddenOptions = [poRunSuspended,poWaitOnExit];
 
 
-function RunCommandIndir(const curdir:TProcessString;const exename:TProcessString;const commands:array of TProcessString;out outputstring:string;out exitstatus:integer; Options : TProcessOptions = []):integer;
+function RunCommandIndir(const curdir:TProcessString;const exename:TProcessString;const commands:array of TProcessString;out outputstring:string;out exitstatus:integer; Options : TProcessOptions = [];SWOptions:TShowWindowOptions=swoNone):integer;
 Var
 Var
     p : TProcessnamemacro;
     p : TProcessnamemacro;
     i : integer;
     i : integer;
@@ -602,6 +602,7 @@ begin
   p:=DefaultTProcess.create(nil);
   p:=DefaultTProcess.create(nil);
   if Options<>[] then
   if Options<>[] then
     P.Options:=Options - ForbiddenOptions;
     P.Options:=Options - ForbiddenOptions;
+  P.ShowWindow:=SwOptions;
   p.Executable:=exename;
   p.Executable:=exename;
   if curdir<>'' then
   if curdir<>'' then
     p.CurrentDirectory:=curdir;
     p.CurrentDirectory:=curdir;
@@ -633,7 +634,7 @@ begin
   if exitstatus<>0 then result:=false;
   if exitstatus<>0 then result:=false;
 end;
 end;
 
 
-function RunCommandIndir(const curdir:TProcessString;const exename:TProcessString;const commands:array of TProcessString;out outputstring:string; Options : TProcessOptions = []):boolean;
+function RunCommandIndir(const curdir:TProcessString;const exename:TProcessString;const commands:array of TProcessString;out outputstring:string; Options : TProcessOptions = [];SWOptions:TShowWindowOptions=swoNone):boolean;
 Var
 Var
     p : TProcessnamemacro;
     p : TProcessnamemacro;
     i,
     i,
@@ -643,6 +644,7 @@ begin
   p:=DefaultTProcess.create(nil);
   p:=DefaultTProcess.create(nil);
   if Options<>[] then
   if Options<>[] then
     P.Options:=Options - ForbiddenOptions;
     P.Options:=Options - ForbiddenOptions;
+  P.ShowWindow:=SwOptions;
   p.Executable:=exename;
   p.Executable:=exename;
   if curdir<>'' then
   if curdir<>'' then
     p.CurrentDirectory:=curdir;
     p.CurrentDirectory:=curdir;
@@ -673,7 +675,7 @@ begin
   if exitstatus<>0 then result:=false;
   if exitstatus<>0 then result:=false;
 end;
 end;
 
 
-function RunCommand(const exename:TProcessString;const commands:array of TProcessString;out outputstring:string; Options : TProcessOptions = []):boolean;
+function RunCommand(const exename:TProcessString;const commands:array of TProcessString;out outputstring:string; Options : TProcessOptions = [];SWOptions:TShowWindowOptions=swoNone):boolean;
 Var
 Var
     p : TProcessnamemacro;
     p : TProcessnamemacro;
     i,
     i,
@@ -683,6 +685,7 @@ begin
   p:=DefaultTProcess.create(nil);
   p:=DefaultTProcess.create(nil);
   if Options<>[] then
   if Options<>[] then
     P.Options:=Options - ForbiddenOptions;
     P.Options:=Options - ForbiddenOptions;
+  P.ShowWindow:=SwOptions;
   p.Executable:=exename;
   p.Executable:=exename;
   if high(commands)>=0 then
   if high(commands)>=0 then
    for i:=low(commands) to high(commands) do
    for i:=low(commands) to high(commands) do