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

Building for MacOS should encourage setting an SDK version #120

Open tresf opened 2 years ago

tresf commented 2 years ago

HID4Java should be built using an older SDK, such as 10.9.

MacOS x86_64

MacOS aarch64

Configuring the environment must be done in two steps:

gary-rowe commented 3 months ago

Is this still an issue?

tresf commented 3 months ago

Is this still an issue?

It was merged here

... However, I believe it's missing on the develop branch.

tresf commented 3 months ago

@gary-rowe which branch is this on? Or did you decide not to add it?

Here's an example of how this was done on another branch, but the code was never merged:

https://github.com/gary-rowe/hid4java/blob/e40bdfe0b71b15b8988f5e0bc22c952a3faa0653/build-hidapi.sh#L330-L334

gary-rowe commented 3 months ago

Hi @tresf . Looks like it was missed with all the other changes to the build-hidapi.sh script. I've just pushed some changes to develop which should address the minimum targets on macOS. I've tested the new .dylibs on a couple of macOS machines and they seem OK but if you'd like to check them over I'd appreciate it.

tresf commented 3 months ago

@gary-rowe thanks for the attention to detail however I think there may be some overkill items, such as restarting zsh with another architecture.

https://github.com/gary-rowe/hid4java/blob/672f0a7adaeac0ae9ead2cca32548ed0974886c6/build-hidapi.sh#L430

... in my experience, this was just fine by passing the arch flag to the build system.

https://github.com/gary-rowe/hid4java/blob/e40bdfe0b71b15b8988f5e0bc22c952a3faa0653/build-hidapi.sh#L337

I think this approach is cleaner and less confusing.