Browse Source

fix: windows build with hw wallets

seed_v14
SomberNight 7 years ago
parent
commit
dc4dd768bd
  1. 31
      contrib/build-wine/deterministic.spec
  2. 7
      contrib/build-wine/prepare-hw.sh
  3. 2
      contrib/build-wine/prepare-wine.sh

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

7
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

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

Loading…
Cancel
Save