mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-12-04 03:55:23 +03:00
Fix running under Wine
This commit is contained in:
1 parent
de9760c4d2
commit
a6ce9edc1d
3 files changed
+30
-19
No files matched your search
+10
-4
@@ -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),
|
||||
|
||||
Reference in new issue
Block a user