Try to use
BackgroundWorker[
^] class to run the compiler and report the progress. And use
Process[
^] class to redirect output and error.
Be careful, BackgroundWorker runs in a different thread, you'll be unable update the GUI objects from it (you can use
Dispatcher.Invoke
), but
RunWorkerCompleted
and
ProgressChanged
are fired on GUI thread.
It's not quite simple, but it might work.
Use the
BackgroundWorker
to run the compiler (pass parameters, etc...). Listen for
ProgressChanged
In
DoWork
you create a
Process
(the compiler process) and redirect the
StandardError
and
StandardOutput
(see documentation). Listen for
ErrorDataReceived
and
OutputDataReceived
events using lamdas. When something comes in, call
worker.ReportProgress(some_number, message)
. You will receive the notification in
BackgroundWorker.ProgressChanged
on the GUI thread. Display the message in GUI.