mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-29 16:31:29 +00:00
commit 10c46477f3a6f2fbc0596345511e0994253081eb Author: SomberNight <somber.night@protonmail.com> Date: Wed Jul 25 19:40:05 2018 +0200 backport changes of trezor plugin commit 213619e880f709188c1ea6272758896748e681a8 Merge: a855b75b66899ca252
Author: Jean-Christophe Rona <jc@rona.fr> Date: Wed Jul 25 18:45:19 2018 +0200 Merge branch 'master' into safe-t-mini commit a855b75b6f5af5f707c4680d0bac79eb66a85ace Author: Jean-Christophe Rona <rona@archos.com> Date: Wed Jul 25 18:37:12 2018 +0200 Safe-T: Switch to safet 0.1.3 to remove the rlp dependency commit 9bee44ca33289158c91c03d47dec45de6577f17b Author: SomberNight <somber.night@protonmail.com> Date: Wed Jul 18 14:01:10 2018 +0200 safe-t: bump min fw to 1.0.5 older fw has a bug when restoring from seed commit 01816607e8ba308cb5cff96b5fb844e4f6b8fcc1 Author: SomberNight <somber.night@protonmail.com> Date: Wed Jul 18 13:57:17 2018 +0200 safe-t: fix rlp version to avoid eth stuff commit 430206bea1fa10b762ff953fbc7652ce0d0e939d Merge: a999ae266b4b862b0c
Author: SomberNight <somber.night@protonmail.com> Date: Wed Jul 18 13:29:41 2018 +0200 Merge branch 'master' into pr/4445 commit a999ae266f499f180946d53d4e860cc871d562ab Author: Jean-Christophe Rona <rona@archos.com> Date: Tue Jun 19 14:18:03 2018 +0200 Safe-T mini: Remove supported coins This is not really useful there. commit 7922df1031b2c4b132f7f9c90232480b5bf9585c Author: Jean-Christophe Rona <rona@archos.com> Date: Tue May 29 16:43:37 2018 +0200 Safe-T mini: Add support for the Safe-T mini
136 lines
4.2 KiB
Python
136 lines
4.2 KiB
Python
# -*- mode: python -*-
|
|
|
|
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, collect_dynamic_libs
|
|
|
|
import sys
|
|
for i, x in enumerate(sys.argv):
|
|
if x == '--name':
|
|
cmdline_name = sys.argv[i+1]
|
|
break
|
|
else:
|
|
raise Exception('no name')
|
|
|
|
PYTHON_VERSION = '3.6.6'
|
|
PYHOME = 'c:/python' + PYTHON_VERSION
|
|
|
|
home = 'C:\\electrum\\'
|
|
|
|
# see https://github.com/pyinstaller/pyinstaller/issues/2005
|
|
hiddenimports = []
|
|
hiddenimports += collect_submodules('trezorlib')
|
|
hiddenimports += collect_submodules('safetlib')
|
|
hiddenimports += collect_submodules('btchip')
|
|
hiddenimports += collect_submodules('keepkeylib')
|
|
hiddenimports += collect_submodules('websocket')
|
|
|
|
# Add libusb binary
|
|
binaries = [(PYHOME+"/libusb-1.0.dll", ".")]
|
|
|
|
# Workaround for "Retro Look":
|
|
binaries += [b for b in collect_dynamic_libs('PyQt5') if 'qwindowsvista' in b[0]]
|
|
|
|
binaries += [('C:/tmp/libsecp256k1.dll', '.')]
|
|
|
|
datas = [
|
|
(home+'electrum/*.json', 'electrum'),
|
|
(home+'electrum/wordlist/english.txt', 'electrum/wordlist'),
|
|
(home+'electrum/locale', 'electrum/locale'),
|
|
('C:\\Program Files (x86)\\ZBar\\bin\\', '.')
|
|
]
|
|
datas += collect_data_files('trezorlib')
|
|
datas += collect_data_files('safetlib')
|
|
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+'run_electrum',
|
|
home+'electrum/gui/qt/main_window.py',
|
|
home+'electrum/gui/text.py',
|
|
home+'electrum/util.py',
|
|
home+'electrum/wallet.py',
|
|
home+'electrum/simple_config.py',
|
|
home+'electrum/bitcoin.py',
|
|
home+'electrum/dnssec.py',
|
|
home+'electrum/commands.py',
|
|
home+'electrum/plugins/cosigner_pool/qt.py',
|
|
home+'electrum/plugins/email_requests/qt.py',
|
|
home+'electrum/plugins/trezor/client.py',
|
|
home+'electrum/plugins/trezor/qt.py',
|
|
home+'electrum/plugins/safe_t/client.py',
|
|
home+'electrum/plugins/safe_t/qt.py',
|
|
home+'electrum/plugins/keepkey/qt.py',
|
|
home+'electrum/plugins/ledger/qt.py',
|
|
#home+'packages/requests/utils.py'
|
|
],
|
|
binaries=binaries,
|
|
datas=datas,
|
|
#pathex=[home+'lib', home+'gui', home+'plugins'],
|
|
hiddenimports=hiddenimports,
|
|
hookspath=[])
|
|
|
|
|
|
# http://stackoverflow.com/questions/19055089/pyinstaller-onefile-warning-pyconfig-h-when-importing-scipy-or-scipy-signal
|
|
for d in a.datas:
|
|
if 'pyconfig' in d[0]:
|
|
a.datas.remove(d)
|
|
break
|
|
|
|
# hotfix for #3171 (pre-Win10 binaries)
|
|
a.binaries = [x for x in a.binaries if not x[1].lower().startswith(r'c:\windows')]
|
|
|
|
pyz = PYZ(a.pure)
|
|
|
|
|
|
#####
|
|
# "standalone" exe with all dependencies packed into it
|
|
|
|
exe_standalone = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
a.binaries,
|
|
a.datas,
|
|
name=os.path.join('build\\pyi.win32\\electrum', cmdline_name + ".exe"),
|
|
debug=False,
|
|
strip=None,
|
|
upx=False,
|
|
icon=home+'icons/electrum.ico',
|
|
console=False)
|
|
# console=True makes an annoying black box pop up, but it does make Electrum output command line commands, with this turned off no output will be given but commands can still be used
|
|
|
|
exe_portable = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
a.binaries,
|
|
a.datas + [ ('is_portable', 'README.md', 'DATA' ) ],
|
|
name=os.path.join('build\\pyi.win32\\electrum', cmdline_name + "-portable.exe"),
|
|
debug=False,
|
|
strip=None,
|
|
upx=False,
|
|
icon=home+'icons/electrum.ico',
|
|
console=False)
|
|
|
|
#####
|
|
# exe and separate files that NSIS uses to build installer "setup" exe
|
|
|
|
exe_dependent = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
exclude_binaries=True,
|
|
name=os.path.join('build\\pyi.win32\\electrum', cmdline_name),
|
|
debug=False,
|
|
strip=None,
|
|
upx=False,
|
|
icon=home+'icons/electrum.ico',
|
|
console=False)
|
|
|
|
coll = COLLECT(
|
|
exe_dependent,
|
|
a.binaries,
|
|
a.zipfiles,
|
|
a.datas,
|
|
strip=None,
|
|
upx=True,
|
|
debug=False,
|
|
icon=home+'icons/electrum.ico',
|
|
console=False,
|
|
name=os.path.join('dist', 'electrum'))
|