make spec file more generalized
This commit is contained in:
parent
166afe2789
commit
1fcca83031
2 changed files with 19 additions and 4 deletions
2
build.sh
2
build.sh
|
@ -43,7 +43,7 @@ popd
|
||||||
|
|
||||||
(
|
(
|
||||||
cd "$ROOT/lbrynet"
|
cd "$ROOT/lbrynet"
|
||||||
pyinstaller lbry.onefile.spec -y --windowed --onefile
|
pyinstaller -y lbry.onefile.spec
|
||||||
)
|
)
|
||||||
|
|
||||||
(
|
(
|
||||||
|
|
|
@ -1,6 +1,20 @@
|
||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
|
import platform
|
||||||
|
import os
|
||||||
|
|
||||||
import lbryum
|
import lbryum
|
||||||
|
|
||||||
|
cwd = os.getcwd()
|
||||||
|
if os.path.basename(cwd) != 'lbrynet':
|
||||||
|
raise Exception('The build needs to be run from the same directory as the spec file')
|
||||||
|
repo_base = os.path.abspath(os.path.join(cwd, '..'))
|
||||||
|
|
||||||
|
system = platform.system()
|
||||||
|
if system == 'Darwin':
|
||||||
|
icns = os.path.join(repo_base, 'build', 'icon.icns')
|
||||||
|
else:
|
||||||
|
icns = os.path.join(repo_base, 'package', 'icons', '256x256.png')
|
||||||
|
|
||||||
block_cipher = None
|
block_cipher = None
|
||||||
languages = (
|
languages = (
|
||||||
'chinese_simplified.txt', 'japanese.txt', 'spanish.txt',
|
'chinese_simplified.txt', 'japanese.txt', 'spanish.txt',
|
||||||
|
@ -9,7 +23,7 @@ languages = (
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['lbry.py'],
|
['lbry.py'],
|
||||||
pathex=['/Users/jobevers/projects/lbryio/lbry-electron/lbrynet'],
|
pathex=[cwd],
|
||||||
binaries=None,
|
binaries=None,
|
||||||
datas=[
|
datas=[
|
||||||
(
|
(
|
||||||
|
@ -42,12 +56,13 @@ exe = EXE(
|
||||||
debug=False,
|
debug=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True,
|
||||||
console=False , icon='/Users/jobevers/projects/lbryio/lbry-electron/package/osx/app.icns'
|
console=False,
|
||||||
|
icon=icns
|
||||||
)
|
)
|
||||||
|
|
||||||
app = BUNDLE(
|
app = BUNDLE(
|
||||||
exe,
|
exe,
|
||||||
name='lbry.app',
|
name='lbry.app',
|
||||||
icon='/Users/jobevers/projects/lbryio/lbry-electron/package/osx/app.icns',
|
icon=icns,
|
||||||
bundle_identifier=None
|
bundle_identifier=None
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue