Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature windows support (WIP) #292

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

fquinner
Copy link

@fquinner fquinner commented Feb 4, 2020

Hi Folks,

Raising initial PR for #44. It seems to at least not break linux (any more) and should make the code portable for windows. Raising this to get the code reviewed at this point while I figure out how best to pack this up.

Cheers,
Frank

Frank Quinn and others added 7 commits July 25, 2019 22:43
Most functionality does work at this point. It can:

- Download and change a background from many providers
- Most options seem to work fine
- RPC calls work OK for client as well with asyncio
- System tray icon behaves itself a little better but does need to be
  clicked twice to take away the menu dialogue (seems like a known issue
  with gtk / StatusIcon on windows)

But:

 - It has not been tested on linux yet to verify these changes haven't
   broken anything
 - I need to set it up with a clean build because looks like msys have
   reorganized things since the chocolatey build I was using. This is a
   must for packaging and CI
 - There is a deadlock / crash when quickly selecting checkboxes (I see
   a recent commit may fix that - need to merge and test)
 - History and Wallpaper Selector seems broken
 - Implementation for IPC using asyncio and unix socket is in there for
   when it is finally supported for python on windows, but is untested on
   linux as well.
 - Quotes don't work on windows nor the digital clock. Probably never
   will so may want to remove associated menu items on windows. In fact
   nothing from Effects tab seems to work.

You need some MSYS things - I'm in the process of trying to figure out
exactly what, but it is not trivial and seems to be subject to change.
One of the fixes involved having to copy a system library do a
different name for lxml.
self.server = self.service.loop.run_until_complete(self.coro)
# Serve requests until Ctrl+C is pressed
try:
self.service.loop.run_until_complete(self.server.wait_closed())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I'm not sure how safe it is to mix threads and asyncio code. It might beeasier to just stick to one concurrency concept at a time?

elif isinstance(value, int):
dtype = winreg.REG_DWORD
else:
dtype = winreg.REG_SZ
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we can probably just collapse this into one check for isinstance(value, int)?

elif master == 'HKEY_LOCAL_MACHINE':
registry = winreg.HKEY_LOCAL_MACHINE
elif master == 'HKEY_USERS':
registry = winreg.HKEY_USERS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no hives other than HKEY_CURRENT_USER are used we can probably remove those cases. AFAICT HKEY_LOCAL_MACHINE shouldn't be writable from an unprivileged account anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants