@ -1,97 +1,96 @@ |
|||||||
# -*- mode: python -*- |
# -*- mode: python -*- |
||||||
|
|
||||||
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, collect_dynamic_libs |
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, collect_dynamic_libs |
||||||
|
|
||||||
import sys |
import sys |
||||||
import os |
import os |
||||||
|
|
||||||
PACKAGE='Electrum' |
PACKAGE='Electrum' |
||||||
PYPKG='electrum' |
PYPKG='electrum' |
||||||
MAIN_SCRIPT='electrum' |
MAIN_SCRIPT='run_electrum' |
||||||
ICONS_FILE='electrum.icns' |
ICONS_FILE='electrum.icns' |
||||||
|
|
||||||
for i, x in enumerate(sys.argv): |
for i, x in enumerate(sys.argv): |
||||||
if x == '--name': |
if x == '--name': |
||||||
VERSION = sys.argv[i+1] |
VERSION = sys.argv[i+1] |
||||||
break |
break |
||||||
else: |
else: |
||||||
raise Exception('no version') |
raise Exception('no version') |
||||||
|
|
||||||
electrum = os.path.abspath(".") + "/" |
electrum = os.path.abspath(".") + "/" |
||||||
block_cipher = None |
block_cipher = None |
||||||
|
|
||||||
# see https://github.com/pyinstaller/pyinstaller/issues/2005 |
# see https://github.com/pyinstaller/pyinstaller/issues/2005 |
||||||
hiddenimports = [] |
hiddenimports = [] |
||||||
hiddenimports += collect_submodules('trezorlib') |
hiddenimports += collect_submodules('trezorlib') |
||||||
hiddenimports += collect_submodules('btchip') |
hiddenimports += collect_submodules('btchip') |
||||||
hiddenimports += collect_submodules('keepkeylib') |
hiddenimports += collect_submodules('keepkeylib') |
||||||
hiddenimports += collect_submodules('websocket') |
hiddenimports += collect_submodules('websocket') |
||||||
|
|
||||||
datas = [ |
datas = [ |
||||||
(electrum+'lib/*.json', PYPKG), |
(electrum+'electrum/*.json', PYPKG), |
||||||
(electrum+'lib/wordlist/english.txt', PYPKG + '/wordlist'), |
(electrum+'electrum/wordlist/english.txt', PYPKG + '/wordlist'), |
||||||
(electrum+'lib/locale', PYPKG + '/locale'), |
(electrum+'electrum/locale', PYPKG + '/locale') |
||||||
(electrum+'plugins', PYPKG + '_plugins'), |
] |
||||||
] |
datas += collect_data_files('trezorlib') |
||||||
datas += collect_data_files('trezorlib') |
datas += collect_data_files('btchip') |
||||||
datas += collect_data_files('btchip') |
datas += collect_data_files('keepkeylib') |
||||||
datas += collect_data_files('keepkeylib') |
|
||||||
|
# Add libusb so Trezor will work |
||||||
# Add libusb so Trezor will work |
binaries = [(electrum + "contrib/build-osx/libusb-1.0.dylib", ".")] |
||||||
binaries = [(electrum + "contrib/build-osx/libusb-1.0.dylib", ".")] |
binaries += [(electrum + "contrib/build-osx/libsecp256k1.0.dylib", ".")] |
||||||
binaries += [(electrum + "contrib/build-osx/libsecp256k1.0.dylib", ".")] |
|
||||||
|
# Workaround for "Retro Look": |
||||||
# Workaround for "Retro Look": |
binaries += [b for b in collect_dynamic_libs('PyQt5') if 'macstyle' in b[0]] |
||||||
binaries += [b for b in collect_dynamic_libs('PyQt5') if 'macstyle' in b[0]] |
|
||||||
|
# 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([electrum+ MAIN_SCRIPT, |
||||||
a = Analysis([electrum+MAIN_SCRIPT, |
electrum+'electrum/gui/qt/main_window.py', |
||||||
electrum+'gui/qt/main_window.py', |
electrum+'electrum/gui/text.py', |
||||||
electrum+'gui/text.py', |
electrum+'electrum/util.py', |
||||||
electrum+'lib/util.py', |
electrum+'electrum/wallet.py', |
||||||
electrum+'lib/wallet.py', |
electrum+'electrum/simple_config.py', |
||||||
electrum+'lib/simple_config.py', |
electrum+'electrum/bitcoin.py', |
||||||
electrum+'lib/bitcoin.py', |
electrum+'electrum/dnssec.py', |
||||||
electrum+'lib/dnssec.py', |
electrum+'electrum/commands.py', |
||||||
electrum+'lib/commands.py', |
electrum+'electrum/plugins/cosigner_pool/qt.py', |
||||||
electrum+'plugins/cosigner_pool/qt.py', |
electrum+'electrum/plugins/email_requests/qt.py', |
||||||
electrum+'plugins/email_requests/qt.py', |
electrum+'electrum/plugins/trezor/client.py', |
||||||
electrum+'plugins/trezor/client.py', |
electrum+'electrum/plugins/trezor/qt.py', |
||||||
electrum+'plugins/trezor/qt.py', |
electrum+'electrum/plugins/keepkey/qt.py', |
||||||
electrum+'plugins/keepkey/qt.py', |
electrum+'electrum/plugins/ledger/qt.py', |
||||||
electrum+'plugins/ledger/qt.py', |
], |
||||||
], |
binaries=binaries, |
||||||
binaries=binaries, |
datas=datas, |
||||||
datas=datas, |
hiddenimports=hiddenimports, |
||||||
hiddenimports=hiddenimports, |
hookspath=[]) |
||||||
hookspath=[]) |
|
||||||
|
# http://stackoverflow.com/questions/19055089/pyinstaller-onefile-warning-pyconfig-h-when-importing-scipy-or-scipy-signal |
||||||
# http://stackoverflow.com/questions/19055089/pyinstaller-onefile-warning-pyconfig-h-when-importing-scipy-or-scipy-signal |
for d in a.datas: |
||||||
for d in a.datas: |
if 'pyconfig' in d[0]: |
||||||
if 'pyconfig' in d[0]: |
a.datas.remove(d) |
||||||
a.datas.remove(d) |
break |
||||||
break |
|
||||||
|
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) |
||||||
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) |
|
||||||
|
exe = EXE(pyz, |
||||||
exe = EXE(pyz, |
a.scripts, |
||||||
a.scripts, |
a.binaries, |
||||||
a.binaries, |
a.datas, |
||||||
a.datas, |
name=PACKAGE, |
||||||
name=PACKAGE, |
debug=False, |
||||||
debug=False, |
strip=False, |
||||||
strip=False, |
upx=True, |
||||||
upx=True, |
icon=electrum+ICONS_FILE, |
||||||
icon=electrum+ICONS_FILE, |
console=False) |
||||||
console=False) |
|
||||||
|
app = BUNDLE(exe, |
||||||
app = BUNDLE(exe, |
version = VERSION, |
||||||
version = VERSION, |
name=PACKAGE + '.app', |
||||||
name=PACKAGE + '.app', |
icon=electrum+ICONS_FILE, |
||||||
icon=electrum+ICONS_FILE, |
bundle_identifier=None, |
||||||
bundle_identifier=None, |
info_plist={ |
||||||
info_plist={ |
'NSHighResolutionCapable': 'True', |
||||||
'NSHighResolutionCapable': 'True', |
'NSSupportsAutomaticGraphicsSwitching': 'True' |
||||||
'NSSupportsAutomaticGraphicsSwitching': 'True' |
} |
||||||
} |
) |
||||||
) |
|
||||||
|
|||||||
@ -1,2 +1,2 @@ |
|||||||
PyQt5 |
PyQt5<5.11 |
||||||
pycryptodomex |
pycryptodomex |
||||||
|
|||||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 224 B After Width: | Height: | Size: 224 B |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
@ -1,6 +1,6 @@ |
|||||||
''' Dummy NFC Provider to be used on desktops in case no other provider is found |
''' Dummy NFC Provider to be used on desktops in case no other provider is found |
||||||
''' |
''' |
||||||
from electrum_gui.kivy.nfc_scanner import NFCBase |
from . import NFCBase |
||||||
from kivy.clock import Clock |
from kivy.clock import Clock |
||||||
from kivy.logger import Logger |
from kivy.logger import Logger |
||||||
|
|
||||||
|
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 552 B |
|
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 380 B |
|
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 375 B |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
|
Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 242 B |
|
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 311 B |
|
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 427 B |
|
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 362 B |
|
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 210 B |
|
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 209 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 866 B After Width: | Height: | Size: 866 B |
|
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 383 B |
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 357 B |
|
Before Width: | Height: | Size: 550 B After Width: | Height: | Size: 550 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 330 B |
|
Before Width: | Height: | Size: 308 B After Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 393 B After Width: | Height: | Size: 393 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 178 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |