Merge pull request #3051 from SomberNight/win_build_hw_wallets

fix: windows build with hw wallets
This commit is contained in:
ThomasV 2017-10-17 10:14:12 +02:00 committed by GitHub
commit fbb5b23e78
3 changed files with 28 additions and 12 deletions

View File

@ -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=[])

View File

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

View File

@ -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"