-WIP-electrum-btcp/contrib/build-wine/deterministic.spec

85 lines
2.7 KiB
Plaintext
Raw Normal View History

# -*- mode: python -*-
2015-10-05 09:43:10 -07:00
home = 'C:\\electrum\\'
# We don't put these files in to actually include them in the script but to make the Analysis method scan them for imports
2015-10-05 09:43:10 -07:00
a = Analysis([home+'electrum',
home+'gui/qt/main_window.py',
home+'gui/text.py',
home+'lib/util.py',
home+'lib/wallet.py',
home+'lib/simple_config.py',
home+'lib/bitcoin.py',
home+'lib/dnssec.py',
home+'lib/commands.py',
2016-02-24 10:06:13 -08:00
home+'plugins/cosigner_pool/qt.py',
home+'plugins/email_requests/qt.py',
home+'plugins/trezor/qt.py',
home+'plugins/keepkey/qt.py',
home+'plugins/ledger/qt.py',
2015-10-05 09:43:10 -07:00
home+'packages/requests/utils.py'
],
2015-10-23 03:51:54 -07:00
pathex=[home+'lib', home+'gui', home+'plugins', home+'packages'],
hiddenimports=['lib', 'gui'],
2015-10-05 09:43:10 -07:00
hookspath=[])
2015-10-05 09:43:10 -07:00
##### include folder in distribution #######
def extra_datas(mydir):
def rec_glob(p, files):
import os
import glob
for d in glob.glob(p):
if os.path.isfile(d):
files.append(d)
rec_glob("%s/*" % d, files)
files = []
rec_glob("%s/*" % mydir, files)
extra_datas = []
for f in files:
2015-10-05 09:43:10 -07:00
d = f.split('\\')
t = ''
for a in d[2:]:
if len(t)==0:
t = a
else:
t = t+'\\'+a
extra_datas.append((t, f, 'DATA'))
return extra_datas
###########################################
# append dirs
2015-02-21 01:53:54 -08:00
# cacert.pem
2015-10-05 09:43:10 -07:00
a.datas += [ ('requests/cacert.pem', home+'packages/requests/cacert.pem', 'DATA') ]
# Py folders that are needed because of the magic import finding
2015-10-05 09:43:10 -07:00
a.datas += extra_datas(home+'gui')
a.datas += extra_datas(home+'lib')
a.datas += extra_datas(home+'plugins')
a.datas += extra_datas(home+'packages')
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
2013-04-11 13:08:27 -07:00
a.binaries,
a.datas,
name=os.path.join('build\\pyi.win32\\electrum', 'electrum.exe'),
2013-03-17 05:05:03 -07:00
debug=False,
strip=None,
upx=False,
2015-10-05 09:43:10 -07:00
icon=home+'icons/electrum.ico',
2013-04-11 13:08:27 -07:00
console=False)
# The 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
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=None,
upx=True,
debug=False,
2015-10-05 09:43:10 -07:00
icon=home+'icons/electrum.ico',
2013-04-11 13:08:27 -07:00
console=False,
name=os.path.join('dist', 'electrum'))