AceCentre / EyeCommander

An open source computer vision interface that tracks eye movements for individuals with severely-limited mobility.
https://docs.acecentre.org.uk/eyecommander
MIT License
53 stars 6 forks source link

Create mac build #85

Open gavinhenderson opened 2 years ago

gavinhenderson commented 2 years ago

@willwade Here is the branch with the Mac build.

You can download the DMG as an artifact from the latest action run

When installing the DMG it will do the annoying thing were it wont let you open it and you have to go into system preferences -> security and privacy and allow it from there. You only have to do that when installing, Its fine after that.

When you open EyeCommander you have to grant it permission to your camera, it should ask you for that. When you blink it will ask you for permission to use 'Accessibility' settings, this is what it needs to do a keypress. It should pop up asking for that but if it doesn't you will need to grant it manually.

The keyboard emulator works pretty well for the most part, you can see all the keys its setup to work with here. It should work with most keys, you might have issues if you are pressing CMD or ALT or keys like that but it should be fine with space, enter, letters and numbers etc.

Theres a few differences to note. The only output mode is keyboard. Theres no auto updating. In theory you can use 'launch at startup' on Mac, but I haven't tested it and wouldnt be surprised if it doesnt work, let me know if you need this.

In short, test the specific setup thoroughly before hitting the road with it. I can make tweaks easily now i have figured out the automatic signing.

willwade commented 1 year ago

FYI - got this working just fine. On a M2 it of course runs and installs rosetta - but still getting 27 fps

gavinhenderson commented 1 year ago

@willwade If performance does become an issue I can create a native M2 build easily enough but seems fine if its running at 27FPS, thats probably the max the camera goes

alpendop commented 1 year ago

@willwade If performance does become an issue I can create a native M2 build easily enough but seems fine if its running at 27FPS, thats probably the max the camera goes

@gavinhenderson Is it still running on rosetta? It compiles and runs natively on Apple Silicon

gavinhenderson commented 1 year ago

Hey @alpendop,

From memory, when I first started this work there was mixed (or no) support for Apple Silicon in node/electron. However, thats no longer the case so I would expect it to work natively on Apple chips. I have found it runs quite efficiently on my Mac Pro with an M1 chip.

This branch was a little behind the main branch so I've just updated it so its now got the latest changes. Full disclosure, I didn't test it when I did that.

In my ideal world what I would want is to have the mac and windows version both live together in the main branch. However, there are deployment and code compatibility issues with that. All of which can be overcome, however its not a priority for us just now as our users don't often need it for Mac. We would be more than happy to support a contribution in this area. In the meantime we created this branch to allow other people to give it a shot on Mac however it probably needs further work before its ready to be used in earnest on Mac.

Our focus has really been entirely the windows version as thats where all our users are, so we really haven't done much work on the Mac version.

The key things the mac version is missing are:

If you want to chat more informally then feel free to join OpenAAC on Slack and message us on there.

Thanks for reaching out Gavin