16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
-
+
|
}
{$mode ObjFPC}{$H+}
interface
uses
Classes, SysUtils, Forms, StdCtrls, Process;
Classes, SysUtils, Forms, StdCtrls, Process, Dialogs;
type
{ TBuildStatusWindow }
TBuildStatusWindow = class(TForm)
Label1: TLabel;
|
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
+
+
+
-
+
-
-
+
|
p: TProcess;
n, total: LongInt;
str: String;
lh: TextFile;
begin
p := TProcess.Create(nil);
p.Options := p.Options + [poUsePipes, poStderrToOutPut];
p.ShowWindow := swoHIDE;
ShowMessage(CommandLine);
{$IFDEF WINDOWS}
p.Executable := 'cmd';
p.Parameters.Add('/c');
{$ENDIF}
{$ELSE}
{$IFDEF UNIX}
p.Executable := 'sh';
p.Executable := '/bin/sh';
p.Parameters.Add('-c');
{$ENDIF}
p.Parameters.Add(CommandLine);
p.Execute;
if LogFile <> '' then
begin
|