proposed solution for "#436 Output should be directed to the windows console"

Lubomir I. Ivanov neolit123 at gmail.com
Fri Mar 21 05:43:17 PDT 2014


On 20 March 2014 20:07, Thiago Macieira <thiago at macieira.org> wrote:
> Em qui 20 mar 2014, às 19:17:19, Lubomir I. Ivanov escreveu:
>> but wouldn't that defeat the original idea of showing the --help
>> commands in the console?
>> c:\subsurface\subsurface.exe --help
>> <outputs in the terminal and exits>
>>
>> for --help, --version, exit(1) is called, and the UI is never reached.
>
> QMessageBox will stay on until the user clicks Ok. After that, you get to
> exit(1).
>

certainly doable,

we can show a QMessageBox with exec() and place the --help or
--version texts in there, and when the user clicks OK the dialog
closes and MainWindow is never reached.
but this is odd - why should the user go to cmd.exe, navigate to the
folder where subsurface.exe is, start it with the --help argument to
receive a UI window, if the
same info can be shown in the same console from which the user called
">subsurface.exe --help" ?

no idea how to do the piping all stderr/stdout to a QWidget, but it
may be more LOC than the windows.c / WINAPI / console implementation.

i guess i'm just going to send my patch at some point and see what happens... ;)
summary:
- going to the console and writing "subsurface.exe --help" will show
the help info in that *same console*!
- adding the -win32console argument to a desktop shortcut will attach
a console to the windows executable and normal users can see developer
output

lubomir
--


More information about the subsurface mailing list