Upgrade libusb from 0.x to 1.0#60
Conversation
These are different libs with different APIs. Most systems use a "compat" layer for old software that still uses 0.x. This upgrades to the latest 1.x branch that is supported and developed. Each distro names these differently (ie. Fedora does libusb vs libusb-1.0 but others might name them libusb0 and libusb1). This will require dependency changes accordingly.
|
Before merging this, let me do some extensive tests on Windows. The last attempt from #16 was also fully working on Linux, but I wasn't able to get it to work on Windows at all. That is why we're still on libusb-0.1. |
|
I think I found the issue :D The reason why it was working on non-win is the ifdef cygwin that sets a timeout. On windows we use a timeout and we were not using the right error code check. |
|
It might be better to use ldd to copy the libraries for Windows. I have an example here: https://github.com/sharkwouter/zt1-engine/blob/main/.github/workflows/build.yml#L67 |
sharkwouter
left a comment
There was a problem hiding this comment.
I just tested this on Windows and it works well. Thanks for fixing this long outstanding issues!
This should be fine on all platforms. libusb 1.0 has been the main libusb for a while now.
The old branch is only provided for old apps, usually through a compat layer.
Tested on a Linux box, windows builds look fine (need testing).