Add live tool output console for the Linux GUI#998
Open
gmipf wants to merge 1 commit into
Open
Conversation
On Linux the dumping tools (redumper/DiscImageCreator/Aaru) have no console window of their own, so their live progress was invisible in the GUI. This adds an opt-in output console, wired only on Linux for now; Windows, macOS, the WPF GUI and the CLI keep their existing behaviour byte-for-byte (the output sink is null, so the original UseShellExecute path is unchanged). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On Linux the dumping tools (redumper, DiscImageCreator, Aaru) run without a console window of their own, so their live progress output was not visible anywhere in the GUI. This adds an in-app Program Output window that streams the tool's stdout/stderr live while it runs.
Scope: Linux only, for now
The console is wired up only on Linux. On Windows, macOS, the WPF GUI and the CLI nothing changes — the output sink stays
null, so the originalUseShellExecutelaunch path is used exactly as before. I kept this conservative for the first cut; if you're happy with the approach, a natural follow-up would be to unify it across all platforms (and drop the separate CMD window on Windows). Happy to discuss.How it works
BaseExecutionContextgains an optionalAction<string>? OutputReceived. When set, the tool is started withRedirectStandardOutput/Errorand read raw (char-level, carriage-return aware) on two background threads, so\rprogress redraws don't flood the log. Whennull(every current caller), the launch path is unchanged. Kept net20-safe (no Channels/async) for the multi-targeted projects.DumpEnvironment.ToolOutputReceivedforwards the stream. A minimalIToolOutputConsoleseam (Open / Append / NotifyToolExited) lets a frontend present the output without the frontend layer taking a UI dependency. NewGuiSettings.ToolConsoleAutoCloseoption, round-tripped throughOptionsLoader.ToolOutputWindowrenders the stream in a virtualized, terminal-style view (fixed-height rows,\r/\nline discipline, copy / select-all). Shown modeless and owned beside the main window, so the main window and its Stop button stay fully responsive. An "auto-close when the program exits" checkbox (default on) is persisted to the config.Localization
New user-facing strings added to
Strings.xamlandStrings.de.xaml.Testing
MPF.ExecutionContexts.Test(615) andMPF.Frontend.Test(529) pass with 0 failures on net8.0/net9.0/net10.0.Prepared with AI assistance (Claude Opus 4.8) and reviewed before submission.