Skip to content

Commit 712a287

Browse files
author
Joachim Marder
committed
Furhter improved code for issue #24 (Ribbon designer freezes during build)
1 parent f3d87df commit 712a287

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Designer/Bin/RibbonDesigner.exe

-101 KB
Binary file not shown.

Designer/Classes/RibbonCompiler.pas

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

221221
try
222222
repeat
223+
BytesRead := 0;
223224
AppRunning := WaitForSingleObject(ProcessInfo.hProcess, 10);
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
225+
if PeekNamedPipe(ReadPipe, @Buffer[0], SizeOf(Buffer) div 10, @BytesRead, @BytesAvail, @BytesLeft) then // Read smaller chunks for continuous output
227226
LogBuffer;
228-
end;
229-
until AppRunning = WAIT_OBJECT_0;
227+
until AppRunning <> WAIT_TIMEOUT;
230228
Result := GetExitCodeProcess(ProcessInfo.hProcess, ExitCode);
231229
Result := Result and (ExitCode = 0);
232230
finally

0 commit comments

Comments
 (0)