Fix for mpc-hc not working in 'frozen' distribution.

This commit is contained in:
Uriziel 2013-06-09 22:33:58 +02:00
parent 4f196f583a
commit 2b32266e37
3 changed files with 6 additions and 6 deletions

BIN
Syncplay 1.2.6 Setup.exe Normal file

Binary file not shown.

View File

@ -533,7 +533,7 @@ info = dict(
'packages': 'PySide.QtUiTools',
'includes': 'twisted, sys, encodings, datetime, os, time, math, PySide',
'excludes': 'venv, _ssl, doctest, pdb, unittest, win32clipboard, win32file, win32pdh, win32security, win32trace, win32ui, winxpgui, win32pipe, win32process',
'dll_excludes': 'msvcr71.dll, MSVCP90.dll',
'dll_excludes': 'msvcr71.dll, MSVCP90.dll, POWRPROF.dll',
'optimize': 2,
'compressed': 1
}

View File

@ -472,11 +472,11 @@ class MPCHCAPIPlayer(BasePlayer):
@staticmethod
def getExpandedPath(path):
if(os.path.isfile(path)):
if(path[-10:] == 'mpc-hc.exe' or path[-12:] == 'mpc-hc64.exe'):
if(path.lower().endswith(u'mpc-hc.exe'.lower()) or path.lower().endswith(u'mpc-hc64.exe'.lower())):
return path
if(os.path.isfile(path + "\\mpc-hc.exe")):
path += "\\mpc-hc.exe"
if(os.path.isfile(path + u"\\mpc-hc.exe")):
path += u"\\mpc-hc.exe"
return path
if(os.path.isfile(path + "\\mpc-hc64.exe")):
path += "\\mpc-hc64.exe"
if(os.path.isfile(path + u"\\mpc-hc64.exe")):
path += u"\\mpc-hc64.exe"
return path