Bundle libusb into compiled app

Good morning (o;

Playing around with the libUSB example from the MBS USB examples on macOS 12.2
for a USB data logger project.

Where does Xojo expects the “libusb-1.0.0.dylib” library to be for packaging?

I see that it tries to open it under /usr/local/lib, /usr/lib and ~/Desktop as it thinks
all users have libusb already installed…

But how would I achieve that it would bundle the libusb-1.0.0.dylib into the compiled application?

thanks in advance
richard

Make a copy script step:

Hmm…no luck…

It copies it into libUSB.app/Contents/Frameworks, but on startup it asks first for permission to access files on Desktop and complains again it couldn’t find libusb there or under /usr/lib or /usr/local/lib:

Ah got it…the example explicitly refers to the Desktop folder…

So libusb-1.0.0.dylib needs to go into Resources folder where it can be opened then by:

SpecialFolder.Resources.Child("libusb-1.0.0.dylib")

1 Like