Update windows distribution setup
This commit is contained in:
parent
cca2a57c69
commit
dd631328e0
1 changed files with 50 additions and 30 deletions
|
@ -9,6 +9,10 @@ import sys
|
||||||
from cx_Freeze import setup, Executable
|
from cx_Freeze import setup, Executable
|
||||||
import requests.certs
|
import requests.certs
|
||||||
|
|
||||||
|
from lbrynet import __version__
|
||||||
|
|
||||||
|
base_dir = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
def find_data_file(filename):
|
def find_data_file(filename):
|
||||||
if getattr(sys, 'frozen', False):
|
if getattr(sys, 'frozen', False):
|
||||||
# The application is frozen
|
# The application is frozen
|
||||||
|
@ -19,16 +23,28 @@ def find_data_file(filename):
|
||||||
data_dir = os.path.dirname(__file__)
|
data_dir = os.path.dirname(__file__)
|
||||||
return os.path.join(data_dir, filename)
|
return os.path.join(data_dir, filename)
|
||||||
|
|
||||||
|
console_scripts = ['lbrynet-stdin-uploader = lbrynet.lbrynet_console.LBRYStdinUploader:launch_stdin_uploader',
|
||||||
|
'lbrynet-stdout-downloader = lbrynet.lbrynet_console.LBRYStdoutDownloader:launch_stdout_downloader',
|
||||||
|
'lbrynet-create-network = lbrynet.create_network:main',
|
||||||
|
'lbrynet-launch-node = lbrynet.dht.node:main',
|
||||||
|
'lbrynet-launch-rpc-node = lbrynet.rpc_node:main',
|
||||||
|
'lbrynet-rpc-node-cli = lbrynet.node_rpc_cli:main',
|
||||||
|
'lbrynet-lookup-hosts-for-hash = lbrynet.dht_scripts:get_hosts_for_hash_in_dht',
|
||||||
|
'lbrynet-announce_hash_to_dht = lbrynet.dht_scripts:announce_hash_to_dht',
|
||||||
|
'lbrynet-daemon = lbrynet.lbrynet_daemon.LBRYDaemonControl:start',
|
||||||
|
'stop-lbrynet-daemon = lbrynet.lbrynet_daemon.LBRYDaemonControl:stop',
|
||||||
|
'lbrynet-cli = lbrynet.lbrynet_daemon.LBRYDaemonCLI:main']
|
||||||
|
|
||||||
shortcut_table = [
|
shortcut_table = [
|
||||||
('DesktopShortcut', # Shortcut
|
('DesktopShortcut', # Shortcut
|
||||||
'DesktopFolder', # Directory
|
'DesktopFolder', # Directory
|
||||||
'LBRY', # Name
|
'lbrynet', # Name
|
||||||
'TARGETDIR', # Component
|
'TARGETDIR', # Component
|
||||||
'[TARGETDIR]\LBRY.exe', # Target
|
'[TARGETDIR]\lbrynet.exe', # Target
|
||||||
None, # Arguments
|
None, # Arguments
|
||||||
None, # Description
|
None, # Description
|
||||||
None, # Hotkey
|
None, # Hotkey
|
||||||
os.path.join('lbrynet', 'lbrynet_gui', 'lbry-dark-icon.ico'), # Icon
|
os.path.join('lbry-dark-icon.ico'), # Icon
|
||||||
None, # IconIndex
|
None, # IconIndex
|
||||||
None, # ShowCmd
|
None, # ShowCmd
|
||||||
'TARGETDIR', # WkDir
|
'TARGETDIR', # WkDir
|
||||||
|
@ -39,52 +55,56 @@ shortcut_table = [
|
||||||
msi_data = {'Shortcut': shortcut_table}
|
msi_data = {'Shortcut': shortcut_table}
|
||||||
|
|
||||||
bdist_msi_options = {
|
bdist_msi_options = {
|
||||||
'upgrade_code': '{66620F3A-DC3A-11E2-B341-002219E9B01F}',
|
# 'upgrade_code': '{66620F3A-DC3A-11E2-B341-002219E9B01F}',
|
||||||
'add_to_path': False,
|
'add_to_path': False,
|
||||||
'initial_target_dir': r'[LocalAppDataFolder]\LBRY',
|
'initial_target_dir': r'[LocalAppDataFolder]\lbrynet',
|
||||||
'data': msi_data,
|
'data': msi_data,
|
||||||
}
|
}
|
||||||
|
|
||||||
build_exe_options = {
|
build_exe_options = {
|
||||||
'include_msvcr': True,
|
'include_msvcr': True,
|
||||||
'includes': [],
|
'includes': [],
|
||||||
'packages': ['six', 'os', 'twisted', 'miniupnpc', 'unqlite', 'seccure',
|
'packages': ['Crypto', 'twisted', 'miniupnpc', 'yapsy', 'seccure',
|
||||||
'requests', 'bitcoinrpc', 'txjsonrpc', 'win32api', 'Crypto',
|
'bitcoinrpc', 'txjsonrpc', 'requests', 'unqlite', 'lbryum',
|
||||||
'gmpy', 'yapsy', 'lbryum', 'google.protobuf'],
|
'jsonrpc', 'simplejson', 'appdirs', 'six', 'base58', 'googlefinance',
|
||||||
'excludes': ['zope.interface._zope_interface_coptimizations'],
|
'ecdsa', 'pbkdf2', 'qrcode', 'jsonrpclib',
|
||||||
'include_files': [os.path.join('lbrynet', 'lbrynet_gui', 'close.gif'),
|
'os', 'cython', 'win32api', 'pkg_resources', 'zope.interface',
|
||||||
os.path.join('lbrynet', 'lbrynet_gui', 'close1.png'),
|
'argparse', 'colorama', 'certifi'
|
||||||
os.path.join('lbrynet', 'lbrynet_gui', 'close2.gif'),
|
# 'gmpy', 'wsgiref', 'slowaes', 'dnspython', 'protobuf', 'google', 'google.protobuf'
|
||||||
os.path.join('lbrynet', 'lbrynet_gui', 'drop_down.gif'),
|
],
|
||||||
os.path.join('lbrynet', 'lbrynet_gui', 'hide_options.gif'),
|
'excludes': ['collections.sys', 'collections._weakref', 'tkinter', 'tk', 'tcl'
|
||||||
os.path.join('lbrynet', 'lbrynet_gui', 'lbry-dark-242x80.gif'),
|
'zope.interface._zope_interface_coptimizations', 'matplotlib', 'numpy', 'pillow', 'pandas'],
|
||||||
os.path.join('lbrynet', 'lbrynet_gui', 'lbry-dark-icon.ico'),
|
'include_files': [(requests.certs.where(), 'cacert.pem')],
|
||||||
os.path.join('lbrynet', 'lbrynet_gui', 'lbry-dark-icon.xbm'),
|
|
||||||
os.path.join('lbrynet', 'lbrynet_gui', 'show_options.gif'),
|
|
||||||
os.path.join('lbrycrdd.exe'), # Not included in repo
|
|
||||||
os.path.join('lbrycrd-cli.exe'), # Not included in repo
|
|
||||||
(requests.certs.where(), 'cacert.pem'),
|
|
||||||
],
|
|
||||||
'namespace_packages': ['zope']}
|
'namespace_packages': ['zope']}
|
||||||
|
|
||||||
exe = Executable(
|
exe = Executable(
|
||||||
script=os.path.join('lbrynet', 'lbrynet_gui', 'gui.py'),
|
script=os.path.join('lbrynet', 'lbrynet_daemon', 'LBRYDaemonControl.py'),
|
||||||
base='Win32GUI',
|
# base='Win32GUI',
|
||||||
icon=os.path.join('lbrynet', 'lbrynet_gui', 'lbry-dark-icon.ico'),
|
icon=os.path.join('packaging', 'windows', 'icons', 'lbry256.ico'),
|
||||||
|
# icon=os.path.join('lbry-dark-icon.ico'),
|
||||||
compress=True,
|
compress=True,
|
||||||
shortcutName='LBRY',
|
shortcutName='lbrynet',
|
||||||
shortcutDir='DesktopFolder',
|
shortcutDir='DesktopFolder',
|
||||||
targetName='LBRY.exe'
|
targetName='lbrynet.exe'
|
||||||
# targetDir="LocalAppDataFolder"
|
# targetDir="LocalAppDataFolder"
|
||||||
)
|
)
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='LBRY',
|
name='lbrynet',
|
||||||
version='0.0.4',
|
version=__version__,
|
||||||
description='A fully decentralized network for distributing data',
|
description='A decentralized media library and marketplace',
|
||||||
url='lbry.io',
|
url='lbry.io',
|
||||||
author='',
|
author='',
|
||||||
keywords='LBRY',
|
keywords='LBRY',
|
||||||
|
# entry_points={'console_scripts': console_scripts},
|
||||||
|
data_files=[
|
||||||
|
('lbrynet/lbrynet_console/plugins',
|
||||||
|
[
|
||||||
|
os.path.join(base_dir, 'lbrynet', 'lbrynet_console', 'plugins',
|
||||||
|
'blindrepeater.yapsy-plugin')
|
||||||
|
]
|
||||||
|
),
|
||||||
|
],
|
||||||
options={'build_exe': build_exe_options,
|
options={'build_exe': build_exe_options,
|
||||||
'bdist_msi': bdist_msi_options},
|
'bdist_msi': bdist_msi_options},
|
||||||
executables=[exe],
|
executables=[exe],
|
||||||
|
|
Loading…
Add table
Reference in a new issue