Hello all! I seem to have come across an issue that might be useful for an FAQ.
I have the Gtk3 application that I am trying to distribute and I wanted to make sure that it would not have a unseemly console when the user clicks on the icon. I tried GUI option (`--gui`) which did get rid of the console, but introduced another problem. Any time I would try to get output from a subprocess using something like Capture::Tiny or IPC::Run3, the result would either return an empty string or cause a console to appear while the subprocess ran. I found that this is because the WINDOWS subsystem (what the `--gui` flag enables) closes STDIN and STDOUT and this means the subprocesses have nowhere to write to. The CONSOLE subsystem (without the `--gui` flag) does not, so capturing output works fine there. After trying several approaches including Win32::Job <https://github.com/project-renard/curie/issues/128>, the solution I came across that worked best was to continue using the CONSOLE subsystem, but to hide the console when the application starts. This approach avoided using other methods that require interpolating arguments (which may be unsecure) or having to redirect to a file (I would like to keep things in memory — this avoids some CRLF translation issues). I did this using the Win32::HideConsole module: ```perl BEGIN { if( $^O eq 'MSWin32' && exists $ENV{PAR_PROGNAME} ) { require Win32::HideConsole; Win32::HideConsole::hide_console(); } } ``` The console appears for a brief moment before the application starts, but then goes away. The `--gui` flag is still useful for when you do not need to deal with capturing the output of subprocesses. This knowledge has been around for a while, but I haven't seen it connected to PAR::Packer yet. Regards, - Zakariyya Mughal
