g810-led icon indicating copy to clipboard operation
g810-led copied to clipboard

make building on macOS more convenient

Open DanEble opened this issue 6 years ago • 5 comments

detect OS by running uname set library options accordingly

@MatMoul The main question I have is whether $(shell uname) will work in all the environments in which you want to build this program.

DanEble avatar Oct 03 '19 02:10 DanEble

@DanEble I've tested your changes on my system and it work well but how do you say,

The main question I have is whether $(shell uname) will work in all the environments in which you want to build this program.

Need more investiagation...

MatMoul avatar Oct 16 '19 21:10 MatMoul

I've tested this branch to set the color on my G213 and I tried Building with both HIDraw and LIBUSB. With LIBUSB it did not work at all even tho the --list-keyboards command did show my keyboard.

the HIDRAW version however kinda worked, it shows my keyboard twice for some reason. it has to be run as SUDO otherwise it says no matching keyboard was found, also the proper permission should be allowed when asked by the system.

But still it was behaving strangely, it will error with Error: Can not write to hidraw half of the times, and only change the color of part of the keyboard, and after many consecutive tries, it will write successfully, maybe the way it writes in macOS should be changed as well. image

joaodforce avatar Jul 14 '20 23:07 joaodforce

This might be down to a udev rule missing somewhere perhaps?

I'm not fully familiar with macOS on the backend.. But it still is unix

ProjectSynchro avatar Aug 16 '20 04:08 ProjectSynchro

Probably going in the same direction, but would it be possible to make this installable through the macOS package manager https://github.com/Homebrew/brew?

Edit: actually reading through this issue and the linked issues made me realise we are not that far yet. Sorry for the disturbance.

StefanLobbenmeier avatar Jun 13 '21 20:06 StefanLobbenmeier

I just tested this branch merged to the head of main repo, Installed HIDAPI from homebrew, on macOS BigSur and now it is working very reliably!

The bin still has to run with SUDO tho. I will setup a service for it to update the color periodically, I shall come back to report on this if anything still goes well.

I'm not sure if it was the changes to BigSur or to the project itself that resolved the issue however. I think I was running macOS Catalina when I made my previous reply

joaodforce avatar Jun 13 '21 20:06 joaodforce