google / project-gameface

Apache License 2.0
571 stars 82 forks source link

Availability for Linux + DepthAI #2

Open ArtaFakhari opened 1 year ago

ArtaFakhari commented 1 year ago

Nice Project! Will you make it available for linux too?

I also have a suggestion to make it compatible with @luxonis DepthAI depth cameras for more accuracy and wider range of motion detection

thisisanurag commented 1 year ago

And is this compatible with Mac?

willwade commented 1 year ago

ref: #9 It's doable. But pydirectinput does make things a bit easier..

NB: A list of files/functions that need tweaking

        if platform.system().lower().startswith('win'):
            gdi32.AddFontResourceW(font_file.as_posix())
        elif platform.system().lower().startswith('dar'):
            return True
            shutil.copyfile(font_file.as_posix(), "/Library/Fonts")
tjthejuggler commented 1 year ago

ref: #9 It's doable. But pydirectinput does make things a bit easier..

NB: A list of files/functions that need tweaking

* requirements.txt. Needs ; `sys_platform == 'win32'` putting on lines with win32 specific libraries

* src/controllers/keybinder.py  possibly needs a few `if platform.system().lower().startswith('win')`: statements but lookng at it - most of the pydirectinput lines can be replaced with pyautogui (see [pydirectinput -> pyautogui ? #9](https://github.com/google/project-gameface/issues/9) - although sure there must be good reason for that library over pyautogui). NB, the monitor code isn't a straight swap. pyautogui.get_monitors() is needed and the code reworked.

* src/utils/install_font needs code a bit like this e.g. for MacOS
      if platform.system().lower().startswith('win'):
          gdi32.AddFontResourceW(font_file.as_posix())
      elif platform.system().lower().startswith('dar'):
          return True
          shutil.copyfile(font_file.as_posix(), "/Library/Fonts")

Can you explain exactly what you mean by that first point? How exactly should the requirements.txt look for linux?

willwade commented 1 year ago

@tjthejuggler See https://peps.python.org/pep-0508/ I think

Basically in the requirements txt if there is a Linux only library do

Library ; sys_platform == ‘linux’

See my current WIP PR an example https://github.com/google/project-gameface/commit/043731a027a9ae8b44f576839c97c4e7af463d60

csolisr commented 3 months ago

Has there been any progress in this regard? Do we still have a blocker regarding Windows-exclusive libraries that don't have an equivalent on Linux?

gmankab commented 3 months ago

this really should be ported to linux