|
From: Rene L. <rs...@me...> - 2010-02-12 21:49:51
|
On 12/02/2010 08:55 a.m., Bastian Eicher wrote:
>>> The ZeroInstall code contains a bunch of .startswith('/') checks to
>>> differentiate local paths from URLs.
>>
>> Use os.path.isabs() instead.
>
> I have done this locally now.
>
> Shouldn't this be changed directly in the master branch instead of only the
> Windows branch?
If you want you could do it for master and then merge master in the
windows branch but as this is not something that affects the behavior of
z-i in POSIX platforms I think is better to just do it for the windows
branch (it will get merged eventually into master).
> The 0launch implementation selection GUI code located in get_selections_gui
> in Zeroinstall/helpers.py uses "socket.socketpair()" and "os.fork()" which
> don't seem to work on Windows.
This is a know problem, the code that uses both of these functions needs
to be rewritten.
>>> 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.
>>
>> That seems like a roundabout way to do a simple boolean flag...
>
> True. The best way would probably be to replace all the
> "os.environ.get('DISPLAY', None)" calls with a common helper function with a
> Platform check.
>
> However, I am not a Python developer myself and thus so far not a patch
> contributor. Therefore just setting the DISPLAY variable from the outside
> seemed like a reasonable workaround for the time being.
Patch attached. Windows defaults to console because the GUI doesn't work.
|