-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make GUI-only Windows binary more discoverable #784
Conversation
My only concern here is about errors involving the GUI system itself, such as when GTK cannot be initialized. I think those are dumped to the console either way, and obviously a GUI window for those is impossible. Could we just pop up a console window in that last case? I'd assume it's something like GApplication failing to initialize or other error return codes from early GTK functions. |
Will give it a try. Don't know yet how to test that, though. I don't think it's going to be too useful for a user because there will be no meaningful error message. |
Some output (for example -version and command line parsing errors) is produced only as text. GUI-only Windows binary will silently hide such output. Make it more discoverable by presenting the output as a GUI message box. If that's not possible then explain to the user that this is a GUI-only executable.
9017923
to
65f1483
Compare
Now GTK init errors are also displayed in a message box. |
Message box provided by GTK? How is that supposed to work when the first initialization fails? Could we instead detect when something is sent to the standard output stream, and open a console window unconditionally of what part produced the output? As for testing GTK errors, you might have luck setting some invalid configuration via environment variables. |
No, of course not. None of this PR uses GTK. If that was feasible or possible then we wouldn't need this PR in the first place. This is Windows only, it uses the Windows native GUI (just see in the code, it's very short).
Not feasible. |
Alright, that sounds fair. Sorry I didn't have a chance to look at the code changes while traveling. |
Thanks for the hint @acolomb. This worked (to make GTK init fail). Now, a native Windows message box is displayed with the error. Note that this is strictly an improvement because previously (since always) the error would have been displayed in the console window but the console window would be closed immediately with application exit (unless run from command line) and the user wouldn't see anything. |
Another fix for #778.
The following normally text-only output is now handled differently by the GUI-only binary:
-version
output is displayed in a GUI message box.-doc
produces a generic message explaining the GUI-only binary.-ui text
produces a generic message explaining the GUI-only binary.-help
produces a generic message explaining the GUI-only binary.@rivy could you also test and see how this fits into your workflow.