mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
fix: windows build with hw wallets
This commit is contained in:
parent
6b9bfddda2
commit
dc4dd768bd
3 changed files with 28 additions and 12 deletions
|
@ -1,5 +1,7 @@
|
||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
|
|
||||||
|
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
for i, x in enumerate(sys.argv):
|
for i, x in enumerate(sys.argv):
|
||||||
if x == '--name':
|
if x == '--name':
|
||||||
|
@ -11,6 +13,24 @@ else:
|
||||||
|
|
||||||
home = 'C:\\electrum\\'
|
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
|
# 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',
|
a = Analysis([home+'electrum',
|
||||||
home+'gui/qt/main_window.py',
|
home+'gui/qt/main_window.py',
|
||||||
|
@ -29,16 +49,9 @@ a = Analysis([home+'electrum',
|
||||||
home+'plugins/ledger/qt.py',
|
home+'plugins/ledger/qt.py',
|
||||||
#home+'packages/requests/utils.py'
|
#home+'packages/requests/utils.py'
|
||||||
],
|
],
|
||||||
datas = [
|
datas=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')
|
|
||||||
],
|
|
||||||
#pathex=[home+'lib', home+'gui', home+'plugins'],
|
#pathex=[home+'lib', home+'gui', home+'plugins'],
|
||||||
#hiddenimports=["lib", "gui", "plugins", "electrum_gui.qt.icons_rc"],
|
hiddenimports=hiddenimports,
|
||||||
hookspath=[])
|
hookspath=[])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,13 @@ BTCHIP_GIT_URL=git://github.com/LedgerHQ/btchip-python.git
|
||||||
|
|
||||||
BRANCH=master
|
BRANCH=master
|
||||||
|
|
||||||
|
PYTHON_VERSION=3.5.4
|
||||||
|
|
||||||
# These settings probably don't need any change
|
# These settings probably don't need any change
|
||||||
export WINEPREFIX=/opt/wine64
|
export WINEPREFIX=/opt/wine64
|
||||||
|
|
||||||
PYHOME=c:/python27
|
PYHOME=c:/python$PYTHON_VERSION
|
||||||
PYTHON="wine $PYHOME/python.exe "
|
PYTHON="wine $PYHOME/python.exe -OO -B"
|
||||||
|
|
||||||
# Let's begin!
|
# Let's begin!
|
||||||
cd `dirname $0`
|
cd `dirname $0`
|
||||||
|
@ -37,6 +39,7 @@ cd tmp
|
||||||
# Install Cython
|
# Install Cython
|
||||||
$PYTHON -m pip install setuptools --upgrade
|
$PYTHON -m pip install setuptools --upgrade
|
||||||
$PYTHON -m pip install cython
|
$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 trezor==0.7.16
|
||||||
$PYTHON -m pip install keepkey
|
$PYTHON -m pip install keepkey
|
||||||
$PYTHON -m pip install btchip-python
|
$PYTHON -m pip install btchip-python
|
||||||
|
|
|
@ -46,7 +46,7 @@ $PYTHON -m pip install pypiwin32
|
||||||
$PYTHON -m pip install PyQt5
|
$PYTHON -m pip install PyQt5
|
||||||
|
|
||||||
# Install pyinstaller
|
# Install pyinstaller
|
||||||
$PYTHON -m pip install pyinstaller==3.2.1
|
$PYTHON -m pip install pyinstaller==3.3
|
||||||
|
|
||||||
# Install ZBar
|
# Install ZBar
|
||||||
#wget -q -O zbar.exe "http://sourceforge.net/projects/zbar/files/zbar/0.10/zbar-0.10-setup.exe/download"
|
#wget -q -O zbar.exe "http://sourceforge.net/projects/zbar/files/zbar/0.10/zbar-0.10-setup.exe/download"
|
||||||
|
|
Loading…
Add table
Reference in a new issue