Bug 322498 (MONO79797) - [PATCH] create monow.exe on Windows
Summary: [PATCH] create monow.exe on Windows
Status: RESOLVED FIXED
Alias: MONO79797
Product: Mono: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Paolo Molaro
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-01 01:28 UTC by Robert Jordan
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
monow.diff (1018 bytes, patch)
2006-11-01 01:28 UTC, Thomas Wiest
Details | Diff
driver.diff (642 bytes, patch)
2006-11-01 01:52 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:14:33 UTC


---- Reported by robertj@gmx.net 2006-10-31 18:28:13 MST ----

On Windows, mono.exe is compiled & linked as a console application.
As such, it always creates a console window, which is annoying
when the managed app targets "winexe".

The patch instructs Makefile.am to create an additional monow.exe
(similar to javaw.exe, pythonw.exe, perlw.exe ...) compiled for
the 'windows' subsystem.



---- Additional Comments From robertj@gmx.net 2006-10-31 18:28:58 MST ----

Created an attachment (id=170768)
monow.diff




---- Additional Comments From robertj@gmx.net 2006-10-31 18:51:30 MST ----


Another related issue: when mono.exe detects that the assembly
was compiled for the winexe target, it detaches the console.
This is annoying during debugging or when the runtime crashes
(the back trace is not visible).

IIRC, this feature was introduced because monow.exe did't exist.

The patch disables the detaching when the --debug
option was supplied.




---- Additional Comments From robertj@gmx.net 2006-10-31 18:52:03 MST ----

Created an attachment (id=170769)
driver.diff




---- Additional Comments From kornelpal@gmail.com 2006-10-31 19:56:44 MST ----

I'm not against removing this detach but note that the same happens 
on MS.NET and they solved the problem by showing the stack trace in 
a window.



---- Additional Comments From robertj@gmx.net 2006-10-31 20:23:38 MST ----

The patch doesn't *remove* the detach. It merely disables it, when
"mono --debug" was called. W/out this conditional one has to
recompile with /target:exe to see what's going on...

MS.NET didn't had to solve any problems, because it doesn't
have a "driver" like mono.exe.




---- Additional Comments From kornelpal@gmail.com 2006-11-01 07:21:19 MST ----

Just for the clarity: I agree that crating a monow.exe is good and 
is required. So I support that patch.

The problem I was talking about is that MS runtime prints the stack 
trace to console as well. And /target:winexe applications have no 
console. Currently this is the same for Mono. The only difference is 
that a console window is "flickering" that is caused by the desing 
of Windows and I personally consider that design to be poor. And 
this is what you path works around.

And now I agree that --debug is used for debugging so users would 
like to see stack trace. The stack trace could be displayed by 
System.Windows.Forms just like MS.NET does but that involves MWF as 
well so I support the second patch as well. And if there will be 
other solution in the future this second patch can be undone easily 
if required.



---- Additional Comments From robertj@gmx.net 2006-11-03 15:46:11 MST ----

Fixed in SVN.

Wade, please take monow.exe into account when packaging
the next Windows installation.




---- Additional Comments From wberrier@novell.com 2006-11-03 16:30:38 MST ----

By default, monow.exe will get included.

The question is whether I should change the batch files to call
monow.exe instead of mono.exe.



---- Additional Comments From robertj@gmx.net 2006-11-03 18:46:26 MST ----

Don't change the bat files, because it won't suppress the console
when called from a shortcut.


Imported an attachment (id=170768)
Imported an attachment (id=170769)

Unknown operating system unknown. Setting to default OS "Other".