built a libusb-1.0.8 package installer for os x. it’s a universal binary for both i386 and x86_64 archs (“32 and 64 bit”).
it was built on a snow leopard (10.6) x86_64 machine; haven’t been able to try it on any other version/arch. used the default minimum target setting in packagemaker which was leopard (10.5) and compiled both a i386 and a x86_64 lib and lipo’d them together.
anyone with a i386 machine and/or other versions of os x are very welcome to report success/fail.
update: tested and working on i386 snow leopard.
update2: tested and working in os x 10.7 (Lion), thank you F-red!
libusb-1.0.8.pkg.zip (96.3 KiB, 2,141 downloads)// sluggo
Tue 13/3/12, 16:15
no problem installing for me on os x 1.7.3. Thx!
----------
Tue 13/3/12, 17:01
Thank you for reporting!
----------
Thu 22/3/12, 07:38
Hey, the installation says it succeeded in 10.5.8 hackintosh, gonna try and see if it really works:)
Thanks for this package ;)
----------
Mon 26/3/12, 06:53
hi sluggo, can you give a tutorial on how to compile libusb i386 and x86_64 and lipo’d them together? i want to do the same thing on libccid (which depends on libusb) and create a installation package for mac os. Thanks in advance!!!
----------
Mon 26/3/12, 21:51
i’d love to, unfortunately i don’t really have the time right now.. but i’ll put it on the todo-list!
it is, however, quite easy. i use llvm compiler infrastructure, it’s free and available on most platforms (including native os x). when compiling you simply specify the arch you want to build for (using flag -arch arg where arg is i386/x86_64/ppc etc). when you’ve got the binaries you just lipo (comes with xcode) them together: lipo binary-i386 binary-x86_64 … -create -output binary-universal (see man-page for more details). Then, to build a package you use PackageMaker (with a standard xcode install it’s in /Developer/Applications/Utilities).
here’s an example of how to use lipo:
% file uvc-ctrl-i386uvc-ctrl-i386: Mach-O executable i386
% file uvc-ctrl-x86_64
uvc-ctrl-x86_64: Mach-O 64-bit executable x86_64
% lipo uvc-ctrl-i386 uvc-ctrl-x86_64 -create -output uvc-ctrl-uni
% file uvc-ctrl-uni
uvc-ctrl-uni: Mach-O universal binary with 2 architectures
uvc-ctrl-uni (for architecture i386): Mach-O executable i386
uvc-ctrl-uni (for architecture x86_64): Mach-O 64-bit executable x86_64
// sluggo
----------