Fix running under Wine

This commit is contained in:
Jonathan Harris committed 2019-06-19 12:09:26 +01:00
1 parent de9760c4d2
commit a6ce9edc1d
3 files changed
+30 -19

No files matched your search

+10 -4
View File
@@ -8,6 +8,15 @@ import sys
from config import appname
if sys.platform == 'win32':
from ctypes import *
from ctypes.wintypes import *
try:
is_wine = windll.ntdll.wine_get_version
except:
is_wine = False
class GenericProtocolHandler:
def __init__(self):
@@ -62,10 +71,7 @@ if sys.platform == 'darwin' and getattr(sys, 'frozen', False):
protocolhandler.master.after(ProtocolHandler.POLL, protocolhandler.poll)
elif sys.platform == 'win32' and getattr(sys, 'frozen', False):
from ctypes import *
from ctypes.wintypes import *
elif sys.platform == 'win32' and getattr(sys, 'frozen', False) and not is_wine:
class WNDCLASS(Structure):
_fields_ = [('style', UINT),