gary-rowe / hid4java

A cross-platform Java Native Access (JNA) wrapper for the libusb/hidapi library. Works out of the box on Windows/Mac/Linux.
MIT License
223 stars 70 forks source link

Improvements to MacOS builds #116

Closed tresf closed 1 year ago

tresf commented 3 years ago

Note before merging: This PR contains commits from #115, but they can be refactored out once that branch is merged into develop.

Relevant commits:

Related #108

DaPutzy commented 1 year ago

Hi! I opened this issue a couple days ago and created a little patch to add the "non-exclusive device open mode" for mac os.

I feel like this would be a great addition to this PR!

It does require libhidapi > 0.12.0 though, and I don't think that is the version currently used in this PR. I could not figure out where the version is actually coming from though?

tresf commented 1 year ago

Hi! I opened this issue a couple days ago and created a little patch to add the "non-exclusive device open mode" for mac os.

Thanks! Can you please open a separate PR for this patch?

I feel like this would be a great addition to this PR!

Since it modifies the default behavior I think it should be separate for better tracking, but it definitely improves the quality of life for MacOS users.

I haven't read the PR patch yet, but many applications will want to maintain exclusive access, so I would recommend (if not already) that the PR has an API toggle for this behavior.

It does require libhidapi > 0.12.0 though, and I don't think that is the version currently used in this PR. I could not figure out where the version is actually coming from though?

AFAIR, the build system always uses the latest version from upstream.

DaPutzy commented 1 year ago

I implemented a toggle and the default behaviour is the same as before :)

I build this on top of your PR but i just noticed you only changed the build anyway so there should be no issue creating a separate PR.

DaPutzy commented 1 year ago

Created a new PR as discussed 👍