|
From: Bastian E. <ba...@ei...> - 2010-02-10 14:03:23
|
> Not correct.
> AFAIK they still have input/output handles. Providing alternatives for
> these (eg with CreateProcess(), or at runtime in the process itself)
> and data will still go there, provided the application actually does
> output something to stdout.
>
> But getting a console window in a GUI app is also possible, but it has
> to be done manually (AllocConsole()). Also, the runtime library has to
> be "told" about that as well (freopen ("CONOUT$", "w", stdout)).
Thanks for the clarification. However, I don't believe this is actually
relevant to the situation at hand.
The same identical 0launch python script may be executed as a GUI app
(pythonw.exe) or a Console app (python.exe) and without adding some funky
Platform-specific Win32 code it will never know which it currently is.
I maintain that the best solution would be to mirror Java's (java.exe and
javaw.exe) and Python's (python.exe and pythonw.exe) design with explicit
console versions of the 0install wrappers (0launch.exe) and explicit GUI
versions (0launchw.exe).
----------
I could set the DISPLAY environment variable to something more or less
random (like "localhost") in 0launchw.exe. That way 0launch will think
there's an X Server available and try to use the GTK+ GUI.
There would be no need for Windows-specific checks and the differentiation
between GUI- and Non-GUI-mode wouldn't need the explicit passing of
"--console" parameter.
----------
The ZeroInstall code contains a bunch of .startswith('/') checks to
differentiate local paths from URLs.
Unfortunately this is no good on Windows. Here an absolute file-system path
is signified by a single letter followed by colon.
Currently the code will fail to locate the local "ZeroInstall-GUI.xml" feed
for this reason.
----------
I'll attempt to set the correct directories for Windows in basedir.py using
the Python for Windows extensions to access the Win32 API.
(I'm no Python programmer, but I hope I'll manage.)
Once that is done and the "/dev/null" and ".startswith('/')" issues have
been resolved I'll be ready to create a first version of the Windows
stand-alone / portable release of ZeroInstall.
|