Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Re: Ticket #4702: Win32 configuration patches

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


andrei at tanas

Jul 3, 2008, 11:09 AM

Post #1 of 3 (505 views)
Permalink
Re: Ticket #4702: Win32 configuration patches

> Comment(by nigel):
>
> The stuff to redirect the console output will be needed later, but I
> wanted to do it some different way (e.g. if invoked from a DOS shell,
> to
> still generate the output instead of always writing to a logfile)

Do you have an idea how to do this? In Windows, console and gui are different subsystems, executables have a flag in PE header, if it's marked as gui, Windows will not allocate a console and stdin/stdout handler will not be initialized. It is possible to start as gui and then allocate console at run time, but this will create a new console window, as far as I know.

_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


davidbuzz at gmail

Jul 3, 2008, 7:17 PM

Post #2 of 3 (467 views)
Permalink
Re: Ticket #4702: Win32 configuration patches [In reply to]

FYI:
extract from http://blogs.msdn.com/junfeng/archive/2004/02/06/68531.aspx:

In VisualStudio case, there are actually two binaries: devenv.com and
devenv.exe. Devenv.com is a Console app. Devenv.exe is a GUI app. When
you type devenv, because of the Win32 probing rule, devenv.com is
executed. If there is no input, devenv.com launches devenv.exe, and
exits itself. If there are inputs, devenv.com handles them as normal
Console app.

In ildasm case, there is only one binary: ildasm.exe. It is first
compiled as a GUI application. Later editbin.exe is used to mark it as
console subsystem. In its main method it determines if it needs to be
run as console mode or GUI mode. If need to run as GUI mode, it
relaunches itself as a GUI app.

Buzz.

On Fri, Jul 4, 2008 at 4:09 AM, Andrei Tanas <andrei[at]tanas.ca> wrote:
>> Comment(by nigel):
>>
>> The stuff to redirect the console output will be needed later, but I
>> wanted to do it some different way (e.g. if invoked from a DOS shell,
>> to
>> still generate the output instead of always writing to a logfile)
>
> Do you have an idea how to do this? In Windows, console and gui are different subsystems, executables have a flag in PE header, if it's marked as gui, Windows will not allocate a console and stdin/stdout handler will not be initialized. It is possible to start as gui and then allocate console at run time, but this will create a new console window, as far as I know.
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev[at]mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


andrei at tanas

Jul 3, 2008, 7:33 PM

Post #3 of 3 (468 views)
Permalink
Re: Ticket #4702: Win32 configuration patches [In reply to]

> extract from http://blogs.msdn.com/junfeng/archive/2004/02/06/68531.aspx:
>
> In VisualStudio case, there are actually two binaries: devenv.com and
> devenv.exe. Devenv.com is a Console app. Devenv.exe is a GUI app. When
> you type devenv, because of the Win32 probing rule, devenv.com is
> executed. If there is no input, devenv.com launches devenv.exe, and
> exits itself. If there are inputs, devenv.com handles them as normal
> Console app.
>
> In ildasm case, there is only one binary: ildasm.exe. It is first
> compiled as a GUI application. Later editbin.exe is used to mark it as
> console subsystem. In its main method it determines if it needs to be
> run as console mode or GUI mode. If need to run as GUI mode, it
> relaunches itself as a GUI app.

That's exactly the point - there's no straightforward solution. Now, I
understand going all these lengths for developer tools, but for an end-user
application (I realize that up until now only a handful of developers saw it
running under Windows) having debug builds as console + GUI and release ones
as pure GUI seemed sufficient to me.

_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.