add lbrynet-console to build

This commit is contained in:
Jack Robison 2017-12-05 11:57:18 -05:00
parent fbcc81adb4
commit 6b0d101115
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF
4 changed files with 53 additions and 1 deletions

View file

@ -25,6 +25,7 @@ pip install ..\.
pyinstaller -y daemon.onefile.spec pyinstaller -y daemon.onefile.spec
pyinstaller -y cli.onefile.spec pyinstaller -y cli.onefile.spec
pyinstaller -y console.onefile.spec
nuget install secure-file -ExcludeVersion nuget install secure-file -ExcludeVersion
secure-file\tools\secure-file -decrypt .\lbry2.pfx.enc -secret "$env:pfx_key" secure-file\tools\secure-file -decrypt .\lbry2.pfx.enc -secret "$env:pfx_key"

View file

@ -42,6 +42,7 @@ cp "$ROOT/requirements.txt" "$BUILD_DIR/requirements_base.txt"
cd "$BUILD_DIR" cd "$BUILD_DIR"
pyinstaller -y daemon.onefile.spec pyinstaller -y daemon.onefile.spec
pyinstaller -y cli.onefile.spec pyinstaller -y cli.onefile.spec
pyinstaller -y console.onefile.spec
) )
python "$BUILD_DIR/zip_daemon.py" python "$BUILD_DIR/zip_daemon.py"

View file

@ -0,0 +1,50 @@
# -*- mode: python -*-
import platform
import os
import lbryum
dir = 'build';
cwd = os.getcwd()
if os.path.basename(cwd) != dir:
raise Exception('pyinstaller build needs to be run from the ' + dir + ' directory')
repo_base = os.path.abspath(os.path.join(cwd, '..'))
execfile(os.path.join(cwd, "entrypoint.py")) # ghetto import
system = platform.system()
if system == 'Darwin':
icns = os.path.join(repo_base, 'build', 'icon.icns')
elif system == 'Linux':
icns = os.path.join(repo_base, 'build', 'icons', '256x256.png')
elif system == 'Windows':
icns = os.path.join(repo_base, 'build', 'icons', 'lbry256.ico')
else:
print 'Warning: System {} has no icons'.format(system)
icns = None
datas = [
(os.path.join(os.path.dirname(lbryum.__file__), 'wordlist', language + '.txt'), 'lbryum/wordlist')
for language in ('chinese_simplified', 'japanese', 'spanish','english', 'portuguese')
]
a = Entrypoint('lbrynet', 'console_scripts', 'lbrynet-console', pathex=[cwd], datas=datas)
pyz = PYZ(a.pure, a.zipped_data)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='lbrynet-console',
debug=False,
strip=False,
upx=True,
console=True,
icon=icns
)

View file

@ -10,7 +10,7 @@ def main():
tag = subprocess.check_output(['git', 'describe']).strip() tag = subprocess.check_output(['git', 'describe']).strip()
zipfilename = 'lbrynet-daemon-{}-{}.zip'.format(tag, get_system_label()) zipfilename = 'lbrynet-daemon-{}-{}.zip'.format(tag, get_system_label())
full_filename = os.path.join(this_dir, 'dist', zipfilename) full_filename = os.path.join(this_dir, 'dist', zipfilename)
executables = ['lbrynet-daemon', 'lbrynet-cli'] executables = ['lbrynet-daemon', 'lbrynet-cli', 'lbrynet-console']
ext = '.exe' if platform.system() == 'Windows' else '' ext = '.exe' if platform.system() == 'Windows' else ''
with zipfile.ZipFile(full_filename, 'w') as myzip: with zipfile.ZipFile(full_filename, 'w') as myzip:
for executable in executables: for executable in executables: