electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit e7c3712181e304b8661d52391c5ca4ab3c49f575
parent 93619c8341dd57c7d4e7c3bd2a2d82bf47207919
Author: Johann Bauer <bauerj@bauerj.eu>
Date:   Wed, 21 Feb 2018 13:56:42 +0100

Add libusb dylib to binary so Trezor will work

Closes: #3946

Diffstat:
Mcontrib/build-osx/make_osx | 6++++++
Mcontrib/build-osx/osx.spec | 20++++++--------------
2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/contrib/build-osx/make_osx b/contrib/build-osx/make_osx @@ -59,6 +59,12 @@ done cp -R $BUILDDIR/electrum-locale/locale/ ./lib/locale/ cp $BUILDDIR/electrum-icons/icons_rc.py ./gui/qt/ + +info "Downloading libusb..." +curl https://homebrew.bintray.com/bottles/libusb-1.0.21.el_capitan.bottle.tar.gz | \ +tar xz --directory $BUILDDIR +cp $BUILDDIR/libusb/1.0.21/lib/libusb-1.0.dylib contrib/build-osx + info "Installing requirements..." python3 -m pip install -Ir ./contrib/deterministic-build/requirements.txt --user && \ python3 -m pip install -Ir ./contrib/deterministic-build/requirements-binaries.txt --user || \ diff --git a/contrib/build-osx/osx.spec b/contrib/build-osx/osx.spec @@ -40,20 +40,12 @@ datas += collect_data_files('trezorlib') datas += collect_data_files('btchip') datas += collect_data_files('keepkeylib') -# We had an issue with PyQt 5.10 not picking up the libqmacstyles.dylib properly, -# and thus Electrum looking terrible on Mac. -# The below 3 statements are a workaround for that issue. -# This should 'do nothing bad' in any case should a future version of PyQt5 not even -# need this. -binaries = [] -dylibs_in_pyqt5 = collect_dynamic_libs('PyQt5', 'DUMMY_NOT_USED') -for tuple in dylibs_in_pyqt5: - # find libqmacstyle.dylib ... - if "libqmacstyle.dylib" in tuple[0]: - # .. and include all the .dylibs in that dir in our 'binaries' PyInstaller spec - binaries += [( os.path.dirname(tuple[0]) + '/*.dylib', 'PyQt5/Qt/plugins/styles' )] - break - +# Add libusb so Trezor will work +binaries = [(electrum + "contrib/build-osx/libusb-1.0.dylib", ".")] + +# Workaround for "Retro Look": +binaries += [b for b in collect_dynamic_libs('PyQt5') if 'macstyle' in b[0]] + # We don't put these files in to actually include them in the script but to make the Analysis method scan them for imports a = Analysis([electrum+MAIN_SCRIPT, electrum+'gui/qt/main_window.py',