groffstudio

Diff
Login

Differences From Artifact [b2dc02ad8c]:

To Artifact [a65bb3f811]:


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  { TBuildStatusWindow }

  TBuildStatusWindow = class(TForm)
    Label1: TLabel;
  private

  public
    function BuildDocument(CommandLine: String; LogFile: String): Boolean;

  end;

var
  OutputText: String;

implementation

{$R *.lfm}

function TBuildStatusWindow.BuildDocument(CommandLine: String; LogFile: String): Boolean;
var
  str: String;
  lh: TextFile;
  ret: Boolean;
begin
{$IFDEF WINDOWS}
  ret := RunCommand('cmd', ['/c', CommandLine], str, [], swoHIDE);
{$ELSE}
  ret := RunCommand('sh', ['-c', CommandLine], str, [], swoHIDE);
{$ENDIF}

  if Length(str) = 0 then str := 'No problems have occurred. :-)';

  if LogFile <> '' then
  begin
    AssignFile(lh, LogFile);
    try







|




|





|

|

|

|



|







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
  { TBuildStatusWindow }

  TBuildStatusWindow = class(TForm)
    Label1: TLabel;
  private

  public
    function BuildDocument(CommandLine: string; LogFile: string): boolean;

  end;

var
  OutputText: string;

implementation

{$R *.lfm}

function TBuildStatusWindow.BuildDocument(CommandLine: string; LogFile: string): boolean;
var
  str: string;
  lh: TextFile;
  ret: boolean;
begin
  {$IFDEF WINDOWS}
  ret := RunCommand('cmd', ['/c', CommandLine], str, [], swoHIDE);
{$ELSE}
  ret := RunCommand('sh', ['-c', CommandLine], str, [], swoHIDE);
  {$ENDIF}

  if Length(str) = 0 then str := 'No problems have occurred. :-)';

  if LogFile <> '' then
  begin
    AssignFile(lh, LogFile);
    try
70
71
72
73
74
75
76
77
  { Close the status window: }
  Close;

  Result := ret;
end;

end.








<
70
71
72
73
74
75
76

  { Close the status window: }
  Close;

  Result := ret;
end;

end.