[mac] libusb-1.0.8 package (installer) for os x

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, 4,464 downloads)

// sluggo

  1. F-red Says:

    no problem installing for me on os x 1.7.3. Thx!

    ----------

  2. sluggo Says:

    Thank you for reporting!

    ----------

  3. Alejandro Says:

    Hey, the installation says it succeeded in 10.5.8 hackintosh, gonna try and see if it really works:)
    Thanks for this package ;)

    ----------

  4. leochou0729 Says:

    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!!!

    ----------

  5. sluggo Says:

    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-i386
    uvc-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

    ----------

Comment