Add dependencies for MacOS system tray icon

This commit is contained in:
JonnyWong16 2020-04-25 20:31:08 -07:00
parent c6bd1b06f2
commit 8226a14b00
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
3 changed files with 10 additions and 2 deletions

View file

@ -95,7 +95,7 @@ jobs:
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pyopenssl pycryptodomex pyinstaller
pip install pyopenssl pycryptodomex pyinstaller pyobjc
- name: Build Package
run: |

View file

@ -236,7 +236,7 @@ def main():
try:
import OpenSSL
except ImportError:
logger.warn("The pyOpenSSL module is missing. Install this " \
logger.warn("The pyOpenSSL module is missing. Install this "
"module to enable HTTPS. HTTPS will be disabled.")
plexpy.CONFIG.ENABLE_HTTPS = False
@ -256,6 +256,13 @@ def main():
plexpy.launch_browser(plexpy.CONFIG.HTTP_HOST, plexpy.HTTP_PORT,
plexpy.HTTP_ROOT)
try:
import AppKit
except ImportError:
logger.warn("The pyobjc module is missing. Install this "
"module to enable the system tray icon.")
plexpy.CONFIG.SYS_TRAY_ICON = False
if common.PLATFORM == 'Darwin' and plexpy.CONFIG.SYS_TRAY_ICON:
# MacOS system tray icon must be run on the main thread and is blocking
# Start the rest of Tautulli on a new thread

View file

@ -18,6 +18,7 @@ analysis = Analysis(
('../version.txt', '.')
],
excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'],
hiddenimports=['Foundation', 'AppKit'],
cipher=block_cipher
)
pyz = PYZ(