electrum

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

commit fbb5b23e7834690645a6c5c585f35cb40504cb47
parent 7847a75d59b335f7917435caf2d9cfc50d69620b
Author: ThomasV <thomasv@electrum.org>
Date:   Tue, 17 Oct 2017 10:14:12 +0200

Merge pull request #3051 from SomberNight/win_build_hw_wallets

fix: windows build with hw wallets
Diffstat:
Mcontrib/build-wine/deterministic.spec | 31++++++++++++++++++++++---------
Mcontrib/build-wine/prepare-hw.sh | 7+++++--
Mcontrib/build-wine/prepare-wine.sh | 2+-
3 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/contrib/build-wine/deterministic.spec b/contrib/build-wine/deterministic.spec @@ -1,5 +1,7 @@ # -*- mode: python -*- +from PyInstaller.utils.hooks import collect_data_files, collect_submodules + import sys for i, x in enumerate(sys.argv): if x == '--name': @@ -11,6 +13,24 @@ else: home = 'C:\\electrum\\' +# see https://github.com/pyinstaller/pyinstaller/issues/2005 +hiddenimports = [] +hiddenimports += collect_submodules('trezorlib') +hiddenimports += collect_submodules('btchip') +hiddenimports += collect_submodules('keepkeylib') + +datas = [ + (home+'lib/currencies.json', 'electrum'), + (home+'lib/servers.json', 'electrum'), + (home+'lib/wordlist/english.txt', 'electrum/wordlist'), + (home+'lib/locale', 'electrum/locale'), + (home+'plugins', 'electrum_plugins'), + #(home+'packages/requests/cacert.pem', 'requests/cacert.pem') +] +datas += collect_data_files('trezorlib') +datas += collect_data_files('btchip') +datas += collect_data_files('keepkeylib') + # 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([home+'electrum', home+'gui/qt/main_window.py', @@ -29,16 +49,9 @@ a = Analysis([home+'electrum', home+'plugins/ledger/qt.py', #home+'packages/requests/utils.py' ], - datas = [ - (home+'lib/currencies.json', 'electrum'), - (home+'lib/servers.json', 'electrum'), - (home+'lib/wordlist/english.txt', 'electrum/wordlist'), - (home+'lib/locale', 'electrum/locale'), - (home+'plugins', 'electrum_plugins'), - #(home+'packages/requests/cacert.pem', 'requests/cacert.pem') - ], + datas=datas, #pathex=[home+'lib', home+'gui', home+'plugins'], - #hiddenimports=["lib", "gui", "plugins", "electrum_gui.qt.icons_rc"], + hiddenimports=hiddenimports, hookspath=[]) diff --git a/contrib/build-wine/prepare-hw.sh b/contrib/build-wine/prepare-hw.sh @@ -6,11 +6,13 @@ BTCHIP_GIT_URL=git://github.com/LedgerHQ/btchip-python.git BRANCH=master +PYTHON_VERSION=3.5.4 + # These settings probably don't need any change export WINEPREFIX=/opt/wine64 -PYHOME=c:/python27 -PYTHON="wine $PYHOME/python.exe " +PYHOME=c:/python$PYTHON_VERSION +PYTHON="wine $PYHOME/python.exe -OO -B" # Let's begin! cd `dirname $0` @@ -37,6 +39,7 @@ cd tmp # Install Cython $PYTHON -m pip install setuptools --upgrade $PYTHON -m pip install cython +$PYTHON -m pip install hidapi==0.7.99.post20 $PYTHON -m pip install trezor==0.7.16 $PYTHON -m pip install keepkey $PYTHON -m pip install btchip-python diff --git a/contrib/build-wine/prepare-wine.sh b/contrib/build-wine/prepare-wine.sh @@ -46,7 +46,7 @@ $PYTHON -m pip install pypiwin32 $PYTHON -m pip install PyQt5 # Install pyinstaller -$PYTHON -m pip install pyinstaller==3.2.1 +$PYTHON -m pip install pyinstaller==3.3 # Install ZBar #wget -q -O zbar.exe "http://sourceforge.net/projects/zbar/files/zbar/0.10/zbar-0.10-setup.exe/download"