commit
b411bb4e85
19 changed files with 457 additions and 75 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
||||||
[submodule "packaging/osx/lbry-osx-app"]
|
|
||||||
path = packaging/osx/lbry-osx-app
|
|
||||||
url = https://github.com/lbryio/lbry-osx-app.git
|
|
28
.travis.yml
28
.travis.yml
|
@ -7,11 +7,22 @@ matrix:
|
||||||
# that comes with the system, so we don't want to use anything that
|
# that comes with the system, so we don't want to use anything that
|
||||||
# travis would try to set-up for us in python
|
# travis would try to set-up for us in python
|
||||||
language: generic
|
language: generic
|
||||||
|
- os: osx
|
||||||
|
# Use generic language for osx
|
||||||
|
# python 2.7 is broken on osx on travis, so follow we have to specify the installation ourselves
|
||||||
|
# https://github.com/travis-ci/travis-ci/issues/2312#issuecomment-195620855
|
||||||
|
language: generic
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install python; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install python; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo pip install --upgrade pip virtualenv; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo pip install --upgrade pip virtualenv; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then virtualenv $HOME/venv; source $HOME/venv/bin/activate; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then virtualenv $HOME/venv && source $HOME/venv/bin/activate; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew outdated gmp || brew upgrade gmp; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew outdated openssl || brew upgrade openssl; fi
|
||||||
|
# the default py2app (v0.9) has a bug that is fixed in the head of /metachris/py2app
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip install git+https://github.com/metachris/py2app; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip install jsonrpc; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip install -r requirements.txt; fi
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./packaging/travis/install_dependencies_and_run_tests.sh; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./packaging/travis/install_dependencies_and_run_tests.sh; fi
|
||||||
|
@ -23,11 +34,7 @@ before_script:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash packaging/ubuntu/ubuntu_package_setup.sh -t; fi
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash packaging/ubuntu/ubuntu_package_setup.sh -t; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade gmp; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd packaging/osx/lbry-osx-app && ./setup_app.sh && cd $TRAVIS_BUILD_DIR; fi
|
||||||
# the default py2app (v0.9) has a bug that is fixed in the head of /metachris/py2app
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip install git+https://github.com/metachris/py2app; fi
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip install jsonrpc; fi
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd packaging/osx/lbry-osx-app; ./setup_app.sh; cd $TRAVIS_BUILD_DIR; fi
|
|
||||||
# fail the build if this is a build for a tag and we don't have the versions matching
|
# fail the build if this is a build for a tag and we don't have the versions matching
|
||||||
- if [[ -n "${TRAVIS_TAG}" ]]; then if [[ "v`python setup.py -V`" = "${TRAVIS_TAG}" ]]; then true; else false; fi; fi
|
- if [[ -n "${TRAVIS_TAG}" ]]; then if [[ "v`python setup.py -V`" = "${TRAVIS_TAG}" ]]; then true; else false; fi; fi
|
||||||
|
|
||||||
|
@ -40,3 +47,10 @@ deploy:
|
||||||
# this is the oauth token for the lbry-ci user
|
# this is the oauth token for the lbry-ci user
|
||||||
api_key:
|
api_key:
|
||||||
secure: nKdWGROnLNodx9k9nWvq2wezkPvSVL8zF63qjPXjhdOe9kCUbcLp7WnFDYpn9EJj4Pofq/ejeCHwjA+5x7JUP3Szk7SlJV61B4c/5hl64rl7oSKOoKskjdE2jaOG3CJuOUrh0yQ59U3vMMABcsnw/wJaCIuu/erdPIm8g8R+stu1YHOGtl5Y9WiW+zLJn2vc3GooV1TWtki9EnrmFfw0Vrqc4RMVMFB1ojE7ggrK1LIwcmGSbLIYzker1ZRz8SCy+84sGk4//V+2i2NNiz5AkPuG7BBGrU2twE9nD23IlruJAdVdi71P3ytAmi0kKyvxIU4VeNaqyTk9zeL5IB9J5IIgvekHgKcsKhFUZ6QcXT1Xfxl4ELftvWCTHWiewnXFdqLcG9GZiUaE6+7wdalwDAP3tqS2emiibetlBZERHR+RMR00ej+1MBYWGMlTse/0Tglndv0a2qqgAJYLKPRT02hTRYGxZ1MrJe+WGnChRmzwgLVTIgZuiDciFOahN0TYGSORk6OpnZBsxvpzSqDw5UDJx0BmbJ1xMNDFbOs8ubZ9yIpB9yNMGw66FPacOF61XNYnmA68ILC28UtOFKuuHLrUPbM5JmQkDVhtTfFbBnyHefyCLAL4MHvJJKGi1oaOXjYaJ/J095h636/kQ0cHHuVMgoWUQZOQ44xRAz7tMuc=
|
secure: nKdWGROnLNodx9k9nWvq2wezkPvSVL8zF63qjPXjhdOe9kCUbcLp7WnFDYpn9EJj4Pofq/ejeCHwjA+5x7JUP3Szk7SlJV61B4c/5hl64rl7oSKOoKskjdE2jaOG3CJuOUrh0yQ59U3vMMABcsnw/wJaCIuu/erdPIm8g8R+stu1YHOGtl5Y9WiW+zLJn2vc3GooV1TWtki9EnrmFfw0Vrqc4RMVMFB1ojE7ggrK1LIwcmGSbLIYzker1ZRz8SCy+84sGk4//V+2i2NNiz5AkPuG7BBGrU2twE9nD23IlruJAdVdi71P3ytAmi0kKyvxIU4VeNaqyTk9zeL5IB9J5IIgvekHgKcsKhFUZ6QcXT1Xfxl4ELftvWCTHWiewnXFdqLcG9GZiUaE6+7wdalwDAP3tqS2emiibetlBZERHR+RMR00ej+1MBYWGMlTse/0Tglndv0a2qqgAJYLKPRT02hTRYGxZ1MrJe+WGnChRmzwgLVTIgZuiDciFOahN0TYGSORk6OpnZBsxvpzSqDw5UDJx0BmbJ1xMNDFbOs8ubZ9yIpB9yNMGw66FPacOF61XNYnmA68ILC28UtOFKuuHLrUPbM5JmQkDVhtTfFbBnyHefyCLAL4MHvJJKGi1oaOXjYaJ/J095h636/kQ0cHHuVMgoWUQZOQ44xRAz7tMuc=
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
# needed to unlock the identity file when its on the keychain
|
||||||
|
- secure: "aqgVNHfeh6JUqTTWG5+W+tTsIJkePS6HyLkcZlq6ODYrfdGKa90EeV4q4wdGfP5IkrBbf+WBFACDGVp574E7vfMLMNKUDuUtgnGVPwqOIhjG82ud8Xa7qF7lsw50QOnRYYVd2GLlCIzk8sffT5ncjSPN2ClNVM5iTwCkC8TNSAVnEJxu6bG6hcaT4uCWWjs0m+39O1xJwxJ4vTjpE/gy+j2FTSaUR5cNavOVCyJqpeKlga9aoBVsQHWvxlYurdWbwRLwVIV7bDE+sYPnwn1nMFQpx5RZ1AX1Z2UxNFKcYzLJgcWe85OjxLyT4udX+XZ9SLsdOjm1n201OLEKsmTxmHS8yqpbu6+pKQ1rLMEVpgPGfS8DdtqZyb3z0u6q4jztpm+uBe8hnFgwQFGXO63nOQsI0n1PMR3evAnVx7jYt7y/UALs2A9yjosMwDqgql1FMhyd0OJGo8Ky8YpDsr2J5zGVvIqt2/N+lP+SOe2D1J/5EhGlY0o4tqIAFskh3q8/GR6UGm70KT2l4LJqrU1WGrGxPJ+HoOEmvG6eqLesk03fAX3v5+DgXZWErnzXMIOGDPaFVpmx+G9VZTIlmf+3Wbu9TnZE5PRwFTdP1rqjGpjUhHeF0VTc2qgNq1OfL98CBO1wLgA195+em58cELalnwDMWUTmY1Jt1kUuAtCc11U="
|
||||||
|
# used to decypt the aes decrypt the certificate and identity files
|
||||||
|
- secure: "FzftiEBFMngQIci5KZ+tpKs/BubalhWXJ9f8yogGNVa3XplLheUXYgcsNU8sYT2MJaKAHN9fSjHWb67UtKT7yXddXxeOPnW6wJ3ua/FXnpynsmeGKTfh3stvgjpzdXous67uHmCWMMklfb6z7UuDohjUMAe5n5HKw5tq1RzTKpc2kJacOC6qUT5laUOvULyCaO9E9HmbHeR5ZeXAC6pnzX2ccsSrcXvPozHzBIZ9RyothKs+CZw8PEuJo07RRL8meboegqYOUrOYuz6A2gS2mZJoy59ivZKOFxS5shEuv2Jt80RyfyxBoUpKFq8OG3Am5nAEzDiTIGzmIoKDEGKeTagk/sEtSZXiMDkzDT4GX/j1rUNLCBU87bXEFS2zfRsrfg8c1XZPIzDYBT1PY2QtLBdddF5zzDoKdPLJ3sjN+fZFE5RlnwfwnMHriVRZZlzjcdk0Z06gKTBCxUg5BZamnOOK+K8qunMJXVS+Vmi5u4RoTZZiCosUlYKnSKJ8suO9C0+znxoViusPqP4ONprNHgDoZw+UKio84QW3PrZv9h4zH/D+msDgJRZ0ceqDD+6Wz1J8Mm5ptW1GOLh/IU12TPXjxteqh0Um2vv5eIPmjK9uEK666kK7PqtPDkYhAfWvF+nmOOyPMJfbP4MW/i9WHNF4ghsIMbPKfqNhgSmfrYw="
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
U2FsdGVkX1/oLoj7zhPd0imh2T8RhLpKzZLk4EHQV0GUJ1g8nwGvxWov+CUMnmjh
|
|
||||||
Y+LNdomGBYWoUilhe4JaWDUYepwIXn6+TvuWBdVEMGpJhXGbmIf+ncMXo6AP8Fh/
|
|
||||||
g9x79SE4RJxFj3utc02B2ivVehoQno5sEvNSZMVml5n9skJoJUBbAsbp1p+7Hm5j
|
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mOquNh2t+V9
|
|
||||||
8xvU/bnOM+/SMhahjYnvdhmRMcY+5Wv32ZnKATq88dq4T7/OZI7q3IsROZ7MnucT
|
|
||||||
x4vADvcFOfOdtPK35IFfMTfl+Ri3q7REIHMts2WEwXddf8CUiVeIaf8NgrWYW0hP
|
|
||||||
f9DQbMGKFcqqCHlKrQkv2dBKX/qEbIzN7T7535Ly68zyFuBS252gsLO7nrf+CLEZ
|
|
||||||
AROOfmt2jv0BvQ4MI5dslzsXFAU11tS36gOZ303R+NJVVqySkza964h2rH5M1F7i
|
|
||||||
A5p7w/l0OVV7r6aXkmsrIcsUZuY7QnZJORQ1MxNtK20weKfrqs90nMTklUVPc4V8
|
|
||||||
LnAW6AYem0ZaeDHn2kx947sglMYxf0h/mFECGhif9hfDTErw7TkSJ26t9ByuEyEf
|
|
||||||
vGpp3P4iTXHUx7HSh7L4KDva6CP6slGjFMAFUEETn7N5uX3VEYeztMBdHLz0XHZc
|
|
||||||
PcgVZ8kytXVTEg95upvWmliEbQqWRsy6sr9PanaN1QY6re6RLlYj4pOWVm8qgCXU
|
|
||||||
IJVTWkROMlYZTWCibCsTsY8fk8aNObZamHjzZGvnU8nEGTx7xQJS8i0r3NM1j2Ka
|
|
||||||
ehBA+WfXbTplI/Fq8Z2Nrb/O39hQpGbXp4ERsEmVbK0twwsqVNehI0CdobxmGsd5
|
|
||||||
E9Afb9iL97DTXsna1Il6FXnHvj3iAQsxxaNLIaj0sN1GaQd9N1mbxThlFNOM3wry
|
|
||||||
jI8TKCWEfLRQzykkcR3sMg==
|
|
|
@ -1,33 +0,0 @@
|
||||||
U2FsdGVkX1+DAD1J9fegD2PjAVffLjKB5urEZYVfRRsZ9uCYeGggOyopseTFPACo
|
|
||||||
IGBkauMQ1lrQWSltYzDzbzPdhe02w6xWHx8hh9QRepSSWlTUHjIxr8A1GryZo7a8
|
|
||||||
4dLs4qxjQDcDdp+csOrBqm3AKS4oeVFRXWxvmr2AueUQ/CEyvhAR1wS3XZ1L0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|
|
30
packaging/osx/certs/dist.cer.enc
Normal file
30
packaging/osx/certs/dist.cer.enc
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
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
|
||||||
|
wHO80TEZVEqyfOeJTST/jA==
|
67
packaging/osx/certs/dist.p12.enc
Normal file
67
packaging/osx/certs/dist.p12.enc
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
U2FsdGVkX1/nZdeV0RBXBMg3aUrBekilENXXcvQ1sR5cLfA+TLOecPR+TtkXvRPk
|
||||||
|
ZsRUDMAyE53eOuam2DMZgRx65V9lBYNrzWoUS0AQr+TX2s/NItjj/owiJyOb1tcP
|
||||||
|
FPcw0K7oEA5BCD+iqN66YIbPOuQ1AohPl0A8Ee1mP8OrwlzIiu3nSf/kGGlORZX1
|
||||||
|
lA4Hhmc1PMdO7DHWxg78+QVPw1t7oI4bIublY0byl6b1dU0Zo8ALD/mCPwI5iusF
|
||||||
|
fmWRAjO7l+DIDDud6S0jXujtC7Ppq1KO4no9E85QYCC1eO6HdigyptAVNcSnVsIC
|
||||||
|
NYicQ2C8fkplncoF+2ECH7hGa9Ne+/TogVzsOaOgcdpfdSq/hsF7uUwdZVngmH2+
|
||||||
|
VNJZZxPRQU7zZ5nsuUqeGF/9cDnTEEza8Al98zmDeGE2UjFcejHEKXU+PAr+AZ87
|
||||||
|
CTFVyZn0nIiTEyT7Fnct9IlePtKl8dkR3brXTuzfAZlmeVKiDTNdR+ULLZ0ewvim
|
||||||
|
wW/2wIi3nrIs0uB6YWUnbGkDnR1XT5TLsQ+hfpMW5uo48jgxQvu6U83uIZjaT+O9
|
||||||
|
yvXNRuqn23JNtDSp3E+wp9/5G3STnJxAlKKKG+WXXRCOUwD4C5jzFfZfy0WIvp+5
|
||||||
|
gVvBsp9kz+XszCU5xlFCRUT+CsAyPhCZqgQrLJ6DEFt+9M/3/njudSEjuXcMxm0h
|
||||||
|
F2pAz6Llox7YS7IHlTywnAl04l4UhoHcFzTupE9NFM3NASSlMwN6BwGn9Rd0N6Sr
|
||||||
|
sr7JPWdYWBFr2+HSf9FHfM75GycY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iLlAszh4XtCeneXdMKyTruGXyIgcTjEyO41cPfW4/3QK7t9Gm/0
|
||||||
|
u0sbOsdejITkXDRArMmYyoslVCYHBD0PIgJjuOvMSTm/ZduF18Efy5hjnVCUBFeo
|
||||||
|
9stOl6zBm4Wf3D65xXmVM069XA+ww1z6gmR7ecJgoOc3sRTXC4oYVEQ/IVklmN+b
|
||||||
|
Wr1uoO0SM9yviIc7MRmKqvntQ0/ZXAC1yJmT5GJ1i2UHjY1+qTsxexp4YJe4p1aT
|
||||||
|
Vf1e43bT4lXZtSQPJfC0dMTWv+GVN9TLWl35hLyiJHSwd43DFC6H9Qz7/CJM4uGc
|
||||||
|
dVrx0QA/ru3/HXPUbg5oVyM3Rf0eFN9zjEZT60aXeKqdXcc6aYc9CX64wzWn+DKY
|
||||||
|
n9qoy/5x5SzDmmwphbx8hbAk4yZIJex7dTKaqjr78Sz7KCUg/J2Y39mZD/NtwniN
|
||||||
|
ssL57nYjjBu2HFfuqSIfe1aYG0bnRJAAwGLZr9Dbt7hwLDBGN/3Y9CfFoVjicwcr
|
||||||
|
B+Tq01wVKOPftNskMCmKlz0Z2bO95NDceZKIUmHHp0jSS5ZckRVtwAIDSkYfrFD2
|
||||||
|
zxMU+8O8rxbJRYT/PjdnGLjmp6Mw88SWSUy2tzje2f1Ay5vshtZLCYfxEI4nXRVq
|
||||||
|
EjIMJeXgdGFW7PEdY/kROQ==
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit e5b465205469e8f14999b56138b3bea6666e006d
|
|
12
packaging/osx/lbry-osx-app/.gitignore
vendored
Normal file
12
packaging/osx/lbry-osx-app/.gitignore
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
*.pyo
|
||||||
|
|
||||||
|
*.so
|
||||||
|
|
||||||
|
*.xml
|
||||||
|
|
||||||
|
*.iml
|
||||||
|
|
||||||
|
id.conf
|
BIN
packaging/osx/lbry-osx-app/app.icns
Normal file
BIN
packaging/osx/lbry-osx-app/app.icns
Normal file
Binary file not shown.
|
@ -0,0 +1,60 @@
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
import webbrowser
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from time import sleep
|
||||||
|
from jsonrpc.proxy import JSONRPCProxy
|
||||||
|
|
||||||
|
API_CONNECTION_STRING = "http://localhost:5279/lbryapi"
|
||||||
|
UI_ADDRESS = "http://localhost:5279"
|
||||||
|
|
||||||
|
|
||||||
|
class LBRYURIHandler(object):
|
||||||
|
def __init__(self):
|
||||||
|
self.started_daemon = False
|
||||||
|
self.daemon = JSONRPCProxy.from_url(API_CONNECTION_STRING)
|
||||||
|
|
||||||
|
def handle_osx(self, lbry_name):
|
||||||
|
try:
|
||||||
|
status = self.daemon.is_running()
|
||||||
|
except:
|
||||||
|
os.system("open /Applications/LBRY.app")
|
||||||
|
sleep(3)
|
||||||
|
|
||||||
|
if lbry_name == "lbry" or lbry_name == "":
|
||||||
|
webbrowser.open(UI_ADDRESS)
|
||||||
|
else:
|
||||||
|
webbrowser.open(UI_ADDRESS + "/?watch=" + lbry_name)
|
||||||
|
|
||||||
|
def handle_linux(self, lbry_name):
|
||||||
|
try:
|
||||||
|
status = self.daemon.is_running()
|
||||||
|
except:
|
||||||
|
cmd = r'DIR = "$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"' \
|
||||||
|
r'if [-z "$(pgrep lbrynet-daemon)"]; then' \
|
||||||
|
r'echo "running lbrynet-daemon..."' \
|
||||||
|
r'$DIR / lbrynet - daemon &' \
|
||||||
|
r'sleep 3 # let the daemon load before connecting' \
|
||||||
|
r'fi'
|
||||||
|
subprocess.Popen(cmd, shell=True)
|
||||||
|
|
||||||
|
if lbry_name == "lbry" or lbry_name == "":
|
||||||
|
webbrowser.open(UI_ADDRESS)
|
||||||
|
else:
|
||||||
|
webbrowser.open(UI_ADDRESS + "/?watch=" + lbry_name)
|
||||||
|
|
||||||
|
|
||||||
|
def main(args):
|
||||||
|
if len(args) != 1:
|
||||||
|
args = ['lbry://lbry']
|
||||||
|
|
||||||
|
name = args[0][7:]
|
||||||
|
if sys.platform == "darwin":
|
||||||
|
LBRYURIHandler().handle_osx(lbry_name=name)
|
||||||
|
else:
|
||||||
|
LBRYURIHandler().handle_linux(lbry_name=name)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main(sys.argv[1:])
|
77
packaging/osx/lbry-osx-app/lbrygui/LBRYApp.py
Normal file
77
packaging/osx/lbry-osx-app/lbrygui/LBRYApp.py
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
import AppKit
|
||||||
|
import webbrowser
|
||||||
|
import sys
|
||||||
|
import logging
|
||||||
|
import socket
|
||||||
|
import platform
|
||||||
|
|
||||||
|
from PyObjCTools import AppHelper
|
||||||
|
|
||||||
|
from twisted.internet import reactor
|
||||||
|
from twisted.web import server
|
||||||
|
|
||||||
|
from lbrynet.lbrynet_daemon.LBRYDaemonServer import LBRYDaemonServer
|
||||||
|
from lbrynet.conf import API_PORT, API_INTERFACE, ICON_PATH, APP_NAME
|
||||||
|
from lbrynet.conf import UI_ADDRESS
|
||||||
|
|
||||||
|
if platform.mac_ver()[0] >= "10.10":
|
||||||
|
from LBRYNotify import LBRYNotify
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
REMOTE_SERVER = "www.google.com"
|
||||||
|
|
||||||
|
|
||||||
|
def test_internet_connection():
|
||||||
|
try:
|
||||||
|
host = socket.gethostbyname(REMOTE_SERVER)
|
||||||
|
s = socket.create_connection((host, 80), 2)
|
||||||
|
return True
|
||||||
|
except:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
class LBRYDaemonApp(AppKit.NSApplication):
|
||||||
|
def finishLaunching(self):
|
||||||
|
self.connection = False
|
||||||
|
statusbar = AppKit.NSStatusBar.systemStatusBar()
|
||||||
|
self.statusitem = statusbar.statusItemWithLength_(AppKit.NSVariableStatusItemLength)
|
||||||
|
self.icon = AppKit.NSImage.alloc().initByReferencingFile_(ICON_PATH)
|
||||||
|
self.icon.setScalesWhenResized_(True)
|
||||||
|
self.icon.setSize_((20, 20))
|
||||||
|
self.statusitem.setImage_(self.icon)
|
||||||
|
self.menubarMenu = AppKit.NSMenu.alloc().init()
|
||||||
|
self.open = AppKit.NSMenuItem.alloc().initWithTitle_action_keyEquivalent_("Open", "openui:", "")
|
||||||
|
self.menubarMenu.addItem_(self.open)
|
||||||
|
self.quit = AppKit.NSMenuItem.alloc().initWithTitle_action_keyEquivalent_("Quit", "replyToApplicationShouldTerminate:", "")
|
||||||
|
self.menubarMenu.addItem_(self.quit)
|
||||||
|
self.statusitem.setMenu_(self.menubarMenu)
|
||||||
|
self.statusitem.setToolTip_(APP_NAME)
|
||||||
|
|
||||||
|
|
||||||
|
if test_internet_connection():
|
||||||
|
if platform.mac_ver()[0] >= "10.10":
|
||||||
|
LBRYNotify("Starting LBRY")
|
||||||
|
else:
|
||||||
|
if platform.mac_ver()[0] >= "10.10":
|
||||||
|
LBRYNotify("LBRY needs an internet connection to start, try again when one is available")
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
# if not subprocess.check_output("git ls-remote https://github.com/lbryio/lbry-web-ui.git | grep HEAD | cut -f 1",
|
||||||
|
# shell=True):
|
||||||
|
# LBRYNotify(
|
||||||
|
# "You should have been prompted to install xcode command line tools, please do so and then start LBRY")
|
||||||
|
# sys.exit(0)
|
||||||
|
|
||||||
|
lbry = LBRYDaemonServer()
|
||||||
|
d = lbry.start()
|
||||||
|
d.addCallback(lambda _: webbrowser.open(UI_ADDRESS))
|
||||||
|
reactor.listenTCP(API_PORT, server.Site(lbry.root), interface=API_INTERFACE)
|
||||||
|
|
||||||
|
def openui_(self, sender):
|
||||||
|
webbrowser.open(UI_ADDRESS)
|
||||||
|
|
||||||
|
def replyToApplicationShouldTerminate_(self, shouldTerminate):
|
||||||
|
if platform.mac_ver()[0] >= "10.10":
|
||||||
|
LBRYNotify("Goodbye!")
|
||||||
|
reactor.stop()
|
27
packaging/osx/lbry-osx-app/lbrygui/LBRYNotify.py
Normal file
27
packaging/osx/lbry-osx-app/lbrygui/LBRYNotify.py
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import Foundation
|
||||||
|
import objc
|
||||||
|
import AppKit
|
||||||
|
|
||||||
|
NSUserNotification = objc.lookUpClass('NSUserNotification')
|
||||||
|
NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter')
|
||||||
|
|
||||||
|
def LBRYNotify(message):
|
||||||
|
notification = NSUserNotification.alloc().init()
|
||||||
|
notification.setTitle_("LBRY")
|
||||||
|
notification.setSubtitle_("")
|
||||||
|
notification.setInformativeText_(message)
|
||||||
|
notification.setUserInfo_({})
|
||||||
|
notification.setSoundName_("NSUserNotificationDefaultSoundName")
|
||||||
|
notification.setDeliveryDate_(Foundation.NSDate.dateWithTimeInterval_sinceDate_(0, Foundation.NSDate.date()))
|
||||||
|
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)
|
||||||
|
|
||||||
|
def notify(title, subtitle, info_text, delay=0, sound=False, userInfo={}):
|
||||||
|
notification = NSUserNotification.alloc().init()
|
||||||
|
notification.setTitle_(title)
|
||||||
|
notification.setSubtitle_(subtitle)
|
||||||
|
notification.setInformativeText_(info_text)
|
||||||
|
notification.setUserInfo_(userInfo)
|
||||||
|
if sound:
|
||||||
|
notification.setSoundName_("NSUserNotificationDefaultSoundName")
|
||||||
|
notification.setDeliveryDate_(Foundation.NSDate.dateWithTimeInterval_sinceDate_(delay, Foundation.NSDate.date()))
|
||||||
|
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)
|
0
packaging/osx/lbry-osx-app/lbrygui/__init__.py
Normal file
0
packaging/osx/lbry-osx-app/lbrygui/__init__.py
Normal file
BIN
packaging/osx/lbry-osx-app/lbrygui/app.icns
Normal file
BIN
packaging/osx/lbry-osx-app/lbrygui/app.icns
Normal file
Binary file not shown.
35
packaging/osx/lbry-osx-app/lbrygui/main.py
Normal file
35
packaging/osx/lbry-osx-app/lbrygui/main.py
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
from PyObjCTools import AppHelper
|
||||||
|
from twisted.internet.cfreactor import install
|
||||||
|
install(runner=AppHelper.runEventLoop)
|
||||||
|
from twisted.internet import reactor
|
||||||
|
|
||||||
|
import logging
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
from appdirs import user_data_dir
|
||||||
|
|
||||||
|
from LBRYApp import LBRYDaemonApp
|
||||||
|
|
||||||
|
if sys.platform != "darwin":
|
||||||
|
log_dir = os.path.join(os.path.expanduser("~"), ".lbrynet")
|
||||||
|
else:
|
||||||
|
log_dir = user_data_dir("LBRY")
|
||||||
|
|
||||||
|
if not os.path.isdir(log_dir):
|
||||||
|
os.mkdir(log_dir)
|
||||||
|
|
||||||
|
LOG_FILENAME = os.path.join(log_dir, 'lbrynet-daemon.log')
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
handler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=2097152, backupCount=5)
|
||||||
|
log.addHandler(handler)
|
||||||
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
app = LBRYDaemonApp.sharedApplication()
|
||||||
|
reactor.addSystemEventTrigger("after", "shutdown", AppHelper.stopEventLoop)
|
||||||
|
reactor.run()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
BIN
packaging/osx/lbry-osx-app/libgmp.10.dylib
Executable file
BIN
packaging/osx/lbry-osx-app/libgmp.10.dylib
Executable file
Binary file not shown.
29
packaging/osx/lbry-osx-app/setup_app.py
Normal file
29
packaging/osx/lbry-osx-app/setup_app.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import os
|
||||||
|
from setuptools import setup
|
||||||
|
from lbrynet.conf import PROTOCOL_PREFIX, APP_NAME, ICON_PATH
|
||||||
|
import sys
|
||||||
|
|
||||||
|
APP = [os.path.join('lbrygui', 'main.py')]
|
||||||
|
DATA_FILES = []
|
||||||
|
DATA_FILES.append('app.icns')
|
||||||
|
|
||||||
|
OPTIONS = {
|
||||||
|
# 'argv_emulation': True,
|
||||||
|
'iconfile': ICON_PATH,
|
||||||
|
'plist': {
|
||||||
|
'CFBundleIdentifier': 'io.lbry.LBRY',
|
||||||
|
'LSUIElement': True,
|
||||||
|
},
|
||||||
|
'packages': ['lbrynet', 'lbryum', 'requests', 'unqlite', 'certifi',
|
||||||
|
'pkg_resources', 'json', 'jsonrpc', 'seccure',],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setup(
|
||||||
|
name=APP_NAME,
|
||||||
|
app=APP,
|
||||||
|
options={'py2app': OPTIONS},
|
||||||
|
data_files=DATA_FILES,
|
||||||
|
)
|
73
packaging/osx/lbry-osx-app/setup_app.sh
Executable file
73
packaging/osx/lbry-osx-app/setup_app.sh
Executable file
|
@ -0,0 +1,73 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
DEST=`pwd`
|
||||||
|
tmp="${DEST}/build"
|
||||||
|
|
||||||
|
rm -rf build dist LBRY.app
|
||||||
|
|
||||||
|
mkdir -p $tmp
|
||||||
|
cd $tmp
|
||||||
|
|
||||||
|
echo "Updating lbrynet"
|
||||||
|
if [ -z ${TRAVIS_BUILD_DIR+x} ]; then
|
||||||
|
# building locally
|
||||||
|
git clone --depth 1 http://github.com/lbryio/lbry.git
|
||||||
|
cd lbry
|
||||||
|
LBRY="${tmp}/lbry"
|
||||||
|
else
|
||||||
|
# building on travis
|
||||||
|
cd ${TRAVIS_BUILD_DIR}
|
||||||
|
LBRY=${TRAVIS_BUILD_DIR}
|
||||||
|
fi
|
||||||
|
python setup.py install
|
||||||
|
|
||||||
|
echo "Building URI Handler"
|
||||||
|
cd "${DEST}"
|
||||||
|
rm -rf build dist
|
||||||
|
python setup_uri_handler.py py2app
|
||||||
|
|
||||||
|
echo "Signing URI Handler"
|
||||||
|
codesign -s "${LBRY_DEVELOPER_ID}" -f "${DEST}/dist/LBRYURIHandler.app/Contents/Frameworks/Python.framework/Versions/2.7"
|
||||||
|
codesign -s "${LBRY_DEVELOPER_ID}" -f "${DEST}/dist/LBRYURIHandler.app/Contents/MacOS/python"
|
||||||
|
# not sure if --deep is appropriate here, but need to get LBRYURIHandler.app/Contents/Frameworks/libcrypto.1.0.0.dylib signed
|
||||||
|
codesign --deep -s "${LBRY_DEVELOPER_ID}" -f "${DEST}/dist/LBRYURIHandler.app/Contents/MacOS/LBRYURIHandler"
|
||||||
|
codesign -vvvv "${DEST}/dist/LBRYURIHandler.app"
|
||||||
|
|
||||||
|
# why isn't certifi installed automatically by setup_app.py?
|
||||||
|
pip install certifi
|
||||||
|
python setup_app.py py2app
|
||||||
|
|
||||||
|
echo "Moving in correct libgmp"
|
||||||
|
rm "${DEST}/dist/LBRY.app/Contents/Frameworks/libgmp.10.dylib"
|
||||||
|
cp "${DEST}/libgmp.10.dylib" "${DEST}/dist/LBRY.app/Contents/Frameworks"
|
||||||
|
|
||||||
|
echo "Removing i386 libraries"
|
||||||
|
|
||||||
|
remove_arch () {
|
||||||
|
if [[ `lipo "$2" -verify_arch "$1"` ]]; then
|
||||||
|
lipo -output build/lipo.tmp -remove "$1" "$2" && mv build/lipo.tmp "$2"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
for i in `find dist/LBRY.app/Contents/Resources/lib/python2.7/lib-dynload/ -name "*.so"`; do
|
||||||
|
remove_arch i386 $i
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
echo "Moving LBRYURIHandler.app into LBRY.app"
|
||||||
|
mv "${DEST}/dist/LBRYURIHandler.app" "${DEST}/dist/LBRY.app/Contents/Resources"
|
||||||
|
|
||||||
|
echo "Signing LBRY.app"
|
||||||
|
codesign -s "${LBRY_DEVELOPER_ID}" -f "${DEST}/dist/LBRY.app/Contents/Frameworks/Python.framework/Versions/2.7"
|
||||||
|
codesign -s "${LBRY_DEVELOPER_ID}" -f "${DEST}/dist/LBRY.app/Contents/Frameworks/libgmp.10.dylib"
|
||||||
|
codesign -s "${LBRY_DEVELOPER_ID}" -f "${DEST}/dist/LBRY.app/Contents/MacOS/python"
|
||||||
|
# adding deep here as well because of subcomponent issues
|
||||||
|
codesign --deep -s "${LBRY_DEVELOPER_ID}" -f "${DEST}/dist/LBRY.app/Contents/MacOS/LBRY"
|
||||||
|
codesign -vvvv "${DEST}/dist/LBRY.app"
|
||||||
|
|
||||||
|
rm -rf $tmp
|
||||||
|
mv dist/LBRY.app LBRY.app
|
||||||
|
rm -rf dist
|
25
packaging/osx/lbry-osx-app/setup_uri_handler.py
Normal file
25
packaging/osx/lbry-osx-app/setup_uri_handler.py
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
from setuptools import setup
|
||||||
|
import os
|
||||||
|
|
||||||
|
APP = [os.path.join('lbry_uri_handler', 'LBRYURIHandler.py')]
|
||||||
|
DATA_FILES = []
|
||||||
|
OPTIONS = {'argv_emulation': True,
|
||||||
|
'packages': ['jsonrpc'],
|
||||||
|
'plist': {
|
||||||
|
'LSUIElement': True,
|
||||||
|
'CFBundleIdentifier': 'io.lbry.LBRYURIHandler',
|
||||||
|
'CFBundleURLTypes': [
|
||||||
|
{
|
||||||
|
'CFBundleURLTypes': 'LBRYURIHandler',
|
||||||
|
'CFBundleURLSchemes': ['lbry']
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setup(
|
||||||
|
app=APP,
|
||||||
|
data_files=DATA_FILES,
|
||||||
|
options={'py2app': OPTIONS},
|
||||||
|
setup_requires=['py2app'],
|
||||||
|
)
|
Loading…
Reference in a new issue