groffstudio

Check-in [a0a5ea5104]
Login
Overview
Comment:[Bugfix] BuildDocument did not return success on success. [Improved] BuildDocument uses a simpler execution approach now.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a0a5ea5104aa452e1e5098a87be048e95fb351822b4f47e2eb5ef63ffd986969
User & Date: Cthulhux on 2024-01-10 11:09:46
Other Links: manifest | tags
Context
2024-01-10
11:12
Brought back the 'no problem' log. check-in: b79a475132 user: Cthulhux tags: trunk
11:09
[Bugfix] BuildDocument did not return success on success. [Improved] BuildDocument uses a simpler execution approach now. check-in: a0a5ea5104 user: Cthulhux tags: trunk
10:43
[Bugfix] cmbMacro was checked badly check-in: 8500e1c380 user: Cthulhux tags: trunk
Changes

Modified CHANGES.txt from [797f2a780e] to [8d983279be].

1
2
3
4
5
6
7

8
9
10
11
12
13
14
Version [next]

[Feature] Support for hdtbl.
[Changed] Build extras and build preprocessors are now listed in a multi-select box.
[Improved] If no error has occurred, the log file will contain a success message.
[Improved] The default font looked gross on macOS. This should be better now.
[Bugfix] Calling troff over the system default shell now, potentially finding more paths.


-------------------------------

Version 0.12.0
2022-03-14

[Feature] If the installed version of troff is not detected as groff, a warning is displayed.







>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Version [next]

[Feature] Support for hdtbl.
[Changed] Build extras and build preprocessors are now listed in a multi-select box.
[Improved] If no error has occurred, the log file will contain a success message.
[Improved] The default font looked gross on macOS. This should be better now.
[Bugfix] Calling troff over the system default shell now, potentially finding more paths.
[Improved] BuildDocument uses a simpler execution approach now.

-------------------------------

Version 0.12.0
2022-03-14

[Feature] If the installed version of troff is not detected as groff, a warning is displayed.

Modified src/buildoutputwindow.pas from [e7a21d0ab7] to [befb5316ad].

40
41
42
43
44
45
46
47
48
49
50

51
52
53
54
55
56
57
58
59
60
61
62
63

64
65
66
67
68
69
70

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105


106
107
108
109

implementation

{$R *.lfm}

function TBuildStatusWindow.BuildDocument(CommandLine: String; LogFile: String): Boolean;
var
  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');
{$ELSE}
  p.Executable := '/bin/sh';
  p.Parameters.Add('-c');

{$ENDIF}
  p.Parameters.Add(CommandLine);
  p.Execute;

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

    Rewrite(lh);

    total := 0;

    while p.Running do
    begin
      n := p.Output.Read(str, 2048);
      total := total + n;
      if n > 0 then
      begin
        writeln(lh, str);
      end
      else Sleep(100);
    end;

    { We might have some buffer contents left. }
    repeat
      n := p.Output.Read(str, 2048);
      total := total + n;
      if n > 0 then
      begin
        writeln(lh, str);
      end;
    until n <= 0;

    if total = 0 then writeln(lh, 'No errors occurred. :-)');

    CloseFile(lh);
  end;

  result := p.ExitStatus > 0;
  p.Free;

  { Close the status window: }
  Close;


end;

end.








<
<


>

<
<
<
<
<
<

|
<

<
<
>

<
<




>
|
<
<
<
<
<
<
<
<
<
|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
|
|
|
<
<



>
>




40
41
42
43
44
45
46


47
48
49
50






51
52

53


54
55


56
57
58
59
60
61









62



63












64
65
66


67
68
69
70
71
72
73
74
75

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 LogFile <> '' then
  begin
    AssignFile(lh, LogFile);
    try
      ReWrite(lh);









      Write(lh, str);



    finally












      CloseFile(lh);
    end;
  end;



  { Close the status window: }
  Close;

  Result := ret;
end;

end.