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

make building on macOS more convenient #193

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

DanEble
Copy link
Contributor

@DanEble DanEble commented Oct 3, 2019

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.

detect OS by running uname
set library options accordingly
@MatMoul MatMoul added the review label Oct 16, 2019
@MatMoul
Copy link
Owner

MatMoul commented Oct 16, 2019

@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...

Comment on lines +1 to +3
ifndef OS
OS:=$(shell uname)
endif
Copy link
Contributor Author

@DanEble DanEble Oct 18, 2019

Choose a reason for hiding this comment

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

I've done a little more research. According to https://stackoverflow.com/a/12099167,
OS will be set in the environment on Windows systems, so this should work fine for Windows in addition to systems with uname.

@MatMoul MatMoul mentioned this pull request Apr 28, 2020
@joaodforce
Copy link

joaodforce commented Jul 14, 2020

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

@ProjectSynchro
Copy link

ProjectSynchro commented Aug 16, 2020

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

@StefanLobbenmeier
Copy link

StefanLobbenmeier commented Jun 13, 2021

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.

@joaodforce
Copy link

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

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.

5 participants