Skip to content

Commit 3821e1f

Browse files
author
Joachim Marder
committed
Reverted yesterday's chagnes as they showed no improvements and had other negative effects. Issue #24
1 parent 712a287 commit 3821e1f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Designer/Classes/RibbonCompiler.pas

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,19 @@ function TRibbonCompiler.Execute(const Application, CurrentDir: String;
220220

221221
try
222222
repeat
223-
BytesRead := 0;
224223
AppRunning := WaitForSingleObject(ProcessInfo.hProcess, 10);
225-
if PeekNamedPipe(ReadPipe, @Buffer[0], SizeOf(Buffer) div 10, @BytesRead, @BytesAvail, @BytesLeft) then // Read smaller chunks for continuous output
224+
if (AppRunning <> WAIT_TIMEOUT) then
225+
begin
226+
PeekNamedPipe(ReadPipe, @Buffer[0], SizeOf(Buffer) div 10, @BytesRead, @BytesAvail, @BytesLeft); // Read smaller chunks for continuous output
226227
LogBuffer;
227-
until AppRunning <> WAIT_TIMEOUT;
228+
Break;
229+
end;
230+
231+
BytesRead := 0;
232+
if (not ReadFile(ReadPipe, Buffer[0], SizeOf(Buffer) - 1, BytesRead, nil)) then
233+
Break;
234+
LogBuffer;
235+
until (BytesRead = 0);
228236
Result := GetExitCodeProcess(ProcessInfo.hProcess, ExitCode);
229237
Result := Result and (ExitCode = 0);
230238
finally

0 commit comments

Comments
 (0)