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