Skip to content

Remove console mode from GUI executable#43

Open
philpem wants to merge 4 commits intogeraldholdsworth:mainfrom
philpem:feature/remove-console-mode
Open

Remove console mode from GUI executable#43
philpem wants to merge 4 commits intogeraldholdsworth:mainfrom
philpem:feature/remove-console-mode

Conversation

@philpem
Copy link
Copy Markdown
Collaborator

@philpem philpem commented Feb 16, 2026

This includes the changes from #42 and also removes the console mode code from the GUI.

I've made it a separate PR so we can decide separately if we want to go down this route. See #42 for more info on the main changes.

The advantage is this gives us two executables with a clear separation of roles - if you want to run commands from the command-line, you run DiscImageManagerCLI - otherwise you run DiscImageManager.
This also means there's no need for the GUI/console detection code which is currently causing issues on Linux (it seems to always think it's in console mode, but can be overridden with DiscImageManager -g)

If this gets merged, #42 needs to go first, probably as a squash merge to avoid cluttering the change history.

The CLI functionality is now provided by the standalone DiscImageManagerCLI
binary, eliminating code duplication between the GUI console mode and CLI.

Changes:
- Remove ConsoleAppUnit.pas from GUI project
- Remove MainUnit_Console.pas include from MainUnit.pas
- Remove ParseCommand declaration from TMainForm
- Remove CheckConsole call from main program
- Update project file to remove ConsoleAppUnit

Users wanting command-line access should use the separate CLI build which
doesn't require X11/GUI dependencies.

https://claude.ai/code/session_01H1suvkNPi2MVsX1y9Qy86P
- Delete ConsoleAppUnit.pas (no longer used by GUI)
- Delete MainUnit_Console.pas (no longer used by GUI)
- Remove console fallback in ReportError that used cmdRed/cmdNormal
- Simplify ReportError to always use GUI dialogs

The CLI functionality is now provided by the standalone DiscImageManagerCLI
binary. These old console mode files are no longer needed.

https://claude.ai/code/session_01H1suvkNPi2MVsX1y9Qy86P
Remove ConsoleAppUnit dependency and all console output code paths that
used ANSI color codes (cmd* variables). The GUI build no longer has
embedded console mode, so this unit now operates purely in GUI mode.

https://claude.ai/code/session_01H1suvkNPi2MVsX1y9Qy86P
@philpem philpem changed the title Decouple GUI from console and remove console mode Decouple GUI from console and remove console mode from GUI executable Feb 16, 2026
@philpem philpem changed the title Decouple GUI from console and remove console mode from GUI executable Remove console mode from GUI executable Feb 28, 2026
@philpem philpem marked this pull request as draft February 28, 2026 23:31
@philpem philpem marked this pull request as ready for review February 28, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants