Index: CHANGES.txt ================================================================== --- CHANGES.txt +++ CHANGES.txt @@ -1,9 +1,10 @@ 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. ------------------------------- Version 0.12.0 2022-03-14 Index: src/buildoutputwindow.pas ================================================================== --- src/buildoutputwindow.pas +++ src/buildoutputwindow.pas @@ -43,11 +43,11 @@ {$R *.lfm} function TBuildStatusWindow.BuildDocument(CommandLine: String; LogFile: String): Boolean; var p: TProcess; - n: LongInt; + n, total: LongInt; str: String; lh: TextFile; begin p := TProcess.Create(nil); p.Options := p.Options + [poUsePipes, poStderrToOutPut]; @@ -65,14 +65,17 @@ 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); @@ -79,15 +82,18 @@ 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;