I know this breaks Windows behavior but having apps print out special debug messages to the terminal provides a good look into the applications' development (for example I know that NFS Underground has some "done" messages likely used for debugging).
I also don't want to keep another revert in my Wine tree just for this one feature either so that's why I'm MR'ing this.
I considered adding a registry/winecfg entry for this behavior but it would make this change much larger (and there's no good place in winecfg to put this behavior in).
To enable this behavior, you can set WINEDEBUG=+unixcon variable before launching an application.
Xkcd-Entry: https://xkcd.com/1172/ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55435
From: Aida Jonikienė aidas957@gmail.com
I know this breaks Windows behavior but having apps print out special debug messages to the terminal provides a good look into the applications' development (for example I know that NFS Underground has some "done" messages likely used for debugging).
I also don't want to keep another revert in my Wine tree just for this one feature either so that's why I'm MR'ing this.
I considered adding a registry/winecfg entry for this behavior but it would make this change much larger (and there's no good place in winecfg to put this behavior in).
To enable this behavior, you can set WINEDEBUG=+unixcon variable before launching an application.
Xkcd-Entry: https://xkcd.com/1172/ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55435 --- dlls/ntdll/unix/env.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index 4fd3254b2d2..ec3526e0ecd 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -59,6 +59,7 @@ #include "error.h"
WINE_DEFAULT_DEBUG_CHANNEL(environ); +WINE_DECLARE_DEBUG_CHANNEL(unixcon);
PEB *peb = NULL; WOW_PEB *wow_peb = NULL; @@ -2173,7 +2174,7 @@ void *create_startup_info( const UNICODE_STRING *nt_image, const RTL_USER_PROCES
info->debug_flags = params->DebugFlags; info->console_flags = params->ConsoleFlags; - if (pe_info->subsystem == IMAGE_SUBSYSTEM_WINDOWS_CUI) + if (pe_info->subsystem == IMAGE_SUBSYSTEM_WINDOWS_CUI || TRACE_ON( unixcon )) info->console = wine_server_obj_handle( params->ConsoleHandle ); info->hstdin = wine_server_obj_handle( params->hStdInput ); info->hstdout = wine_server_obj_handle( params->hStdOutput );