Skip to content

Upgrade libusb from 0.x to 1.0#60

Merged
sharkwouter merged 5 commits intopspdev:masterfrom
davidgfnet:master
Jul 14, 2025
Merged

Upgrade libusb from 0.x to 1.0#60
sharkwouter merged 5 commits intopspdev:masterfrom
davidgfnet:master

Conversation

@davidgfnet
Copy link
Member

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

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.
@sharkwouter
Copy link
Member

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.

@davidgfnet
Copy link
Member Author

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.
I also noticed that the devel version of readline was switched yesterday (to use v8 by default), so my test build complains about the missing dll (this is only for pspsh though), so I updated and changed that too.

@sharkwouter
Copy link
Member

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

Copy link
Member

@sharkwouter sharkwouter left a comment

Choose a reason for hiding this comment

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

I just tested this on Windows and it works well. Thanks for fixing this long outstanding issues!

@sharkwouter sharkwouter merged commit 4ea253f into pspdev:master Jul 14, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants