Skip to content

fix: suppress console on windows release builds#1006

Open
chakany wants to merge 1 commit intomikedilger:masterfrom
chakany:fix-windows-console
Open

fix: suppress console on windows release builds#1006
chakany wants to merge 1 commit intomikedilger:masterfrom
chakany:fix-windows-console

Conversation

@chakany
Copy link
Copy Markdown

@chakany chakany commented Oct 3, 2025

I installed gossip on my Windows 11 machine using the msi installer and noticed that when I opened it it would also open a terminal window to log events. I checked the codebase, and compared it against my own egui app's codebase, and found that the macro that controls this behavior was set differently. When I changed it and re-compiled in release mode, the terminal window no longer appeared.

It is a simple one-line change.

- #![cfg_attr(not(debug_assertions), windows_subsystem = "console")]
+ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

@mikedilger
Copy link
Copy Markdown
Owner

I find the console to be important. I know it seems like a debugging leftover, or annoying, and it prints way too much stuff, but the main UI window doesn't have enough space to show most of the error conditions that you might want to be aware of. A better path forward would be to have an error indicator in the UI that you can click to open which shows long lines of errors, and of course to prune back the output, and only then remove the console.

You can run without the console if it works well enough for you and you don't think you can do anything about the conditions that get printed. But by default, for now, I think I'll leave it.

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