|
|
@ -5,6 +5,11 @@ from PyInstaller.utils.hooks import collect_data_files, collect_submodules |
|
|
|
import sys |
|
|
|
import os |
|
|
|
|
|
|
|
PACKAGE='Electrum' |
|
|
|
PYPKG='electrum' |
|
|
|
MAIN_SCRIPT='electrum' |
|
|
|
ICONS_FILE='electrum.icns' |
|
|
|
|
|
|
|
for i, x in enumerate(sys.argv): |
|
|
|
if x == '--name': |
|
|
|
VERSION = sys.argv[i+1] |
|
|
@ -22,21 +27,21 @@ hiddenimports += collect_submodules('btchip') |
|
|
|
hiddenimports += collect_submodules('keepkeylib') |
|
|
|
|
|
|
|
datas = [ |
|
|
|
(electrum+'lib/currencies.json', 'electrum'), |
|
|
|
(electrum+'lib/servers.json', 'electrum'), |
|
|
|
(electrum+'lib/checkpoints.json', 'electrum'), |
|
|
|
(electrum+'lib/servers_testnet.json', 'electrum'), |
|
|
|
(electrum+'lib/checkpoints_testnet.json', 'electrum'), |
|
|
|
(electrum+'lib/wordlist/english.txt', 'electrum/wordlist'), |
|
|
|
(electrum+'lib/locale', 'electrum/locale'), |
|
|
|
(electrum+'plugins', 'electrum_plugins'), |
|
|
|
(electrum+'lib/currencies.json', PYPKG), |
|
|
|
(electrum+'lib/servers.json', PYPKG), |
|
|
|
(electrum+'lib/checkpoints.json', PYPKG), |
|
|
|
(electrum+'lib/servers_testnet.json', PYPKG), |
|
|
|
(electrum+'lib/checkpoints_testnet.json', PYPKG), |
|
|
|
(electrum+'lib/wordlist/english.txt', PYPKG + '/wordlist'), |
|
|
|
(electrum+'lib/locale', PYPKG + '/locale'), |
|
|
|
(electrum+'plugins', PYPKG + '_plugins'), |
|
|
|
] |
|
|
|
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([electrum+'electrum', |
|
|
|
a = Analysis([electrum+MAIN_SCRIPT, |
|
|
|
electrum+'gui/qt/main_window.py', |
|
|
|
electrum+'gui/text.py', |
|
|
|
electrum+'lib/util.py', |
|
|
@ -58,7 +63,7 @@ a = Analysis([electrum+'electrum', |
|
|
|
|
|
|
|
# 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]: |
|
|
|
if 'pyconfig' in d[0]: |
|
|
|
a.datas.remove(d) |
|
|
|
break |
|
|
|
|
|
|
@ -68,19 +73,19 @@ exe = EXE(pyz, |
|
|
|
a.scripts, |
|
|
|
a.binaries, |
|
|
|
a.datas, |
|
|
|
name='Electrum', |
|
|
|
name=PACKAGE, |
|
|
|
debug=False, |
|
|
|
strip=False, |
|
|
|
upx=True, |
|
|
|
icon=electrum+'electrum.icns', |
|
|
|
icon=electrum+ICONS_FILE, |
|
|
|
console=False) |
|
|
|
|
|
|
|
app = BUNDLE(exe, |
|
|
|
version = VERSION, |
|
|
|
name='Electrum.app', |
|
|
|
icon=electrum+'electrum.icns', |
|
|
|
name=PACKAGE + '.app', |
|
|
|
icon=electrum+ICONS_FILE, |
|
|
|
bundle_identifier=None, |
|
|
|
info_plist = { |
|
|
|
'NSHighResolutionCapable':'True' |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|