[ scummvm-Patches-3575582 ] Console application in MinGW

SourceForge.net noreply at sourceforge.net
Tue Oct 9 02:27:58 CEST 2012


Patches item #3575582, was opened at 2012-10-08 17:27
Message generated for change (Tracker Item Submitted) made by vakons
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=3575582&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Valentin Solodin (vakons)
Assigned to: Nobody/Anonymous (nobody)
Summary: Console application in MinGW

Initial Comment:
Currently, even if ScummVM was compiled under MinGW with "--enable-console" switch, it is still a regular GUI application without console window.

To show debug messages etc., even when already started from console, it calls AllocConsole() and creates additional window, but when the application terminates, this window closes too.

As a result, you can't see errors, or even help text when starting with "--help" switch.

The suggestion is to link a "console application with GUI" when "--enable-console" is used.
It will allow to keep all messages when ScummVM is started from Windows console.

To do this, 2 switches should be passed to linker: "-mwindows" and "-mconsole".
The "-mwindows" is already applied in "sdl-config", so here's the remaining one.

Was  (line 2152 of "configure" script):
		LIBS="$LIBS -lmingw32 -lwinmm -lgdi32"
		OBJS="$OBJS scummvmwinres.o"

Change to:
		LIBS="$LIBS -lmingw32 -lwinmm -lgdi32"
		if test "$_text_console" = yes ; then
			LIBS="$LIBS -mconsole"
		fi
		OBJS="$OBJS scummvmwinres.o"


Patched script attached (from 1.6.0git-1890-g78464a4, https://github.com/scummvm/scummvm/tree/78464a42d78091ac1b54c6ae18c3a67d90fb59bf).
md5: 507b6a9a6fce5cc2babc35bf818cc94a

P.S. Sorry for not making regular *.patch - I'm not sure what program I should use for that.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=3575582&group_id=37116




More information about the Scummvm-tracker mailing list