Update client.py

This commit is contained in:
Etoh 2023-10-24 19:25:17 +01:00 committed by GitHub
parent 92c413043c
commit ad4a790325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

View File

@ -1623,6 +1623,22 @@ class SyncplayUserlist(object):
class UiManager(object):
def __init__(self, client, ui):
def isWindows():
return sys.platform.startswith("win")
def doWindowsRedistCheck():
import ctypes
try:
ctypes.CDLL('vcruntime140.dll')
except OSError:
ctypes.windll.user32.MessageBoxW(0, '''Syncplay relies on the Microsoft Visual C++ Redistributable which is not installed.
It can be downloaded at https://aka.ms/vs/17/release/vc_redist.x86.exe
For more details see http://syncplay.pl/''', "Syncplay", 1)
sys.exit()
if isWindows():
doWindowsRedistCheck()
self._client = client
self.__ui = ui
self.lastNotificatinOSDMessage = None