Merge branch 'master' of http://github.com/headshot2017/AO2XP
This commit is contained in:
commit
be4206d835
11
AO2XP.py
11
AO2XP.py
@ -1,13 +1,18 @@
|
|||||||
import sys, thread, time, os
|
import sys, thread, time, os, platform
|
||||||
from os.path import exists
|
from os.path import exists
|
||||||
from PyQt4 import QtGui, QtCore
|
from PyQt4 import QtGui, QtCore
|
||||||
app = QtGui.QApplication(sys.argv)
|
app = QtGui.QApplication(sys.argv)
|
||||||
|
|
||||||
|
osname = platform.system()
|
||||||
|
bassdll = "bass.dll"
|
||||||
|
if osname != "Windows":
|
||||||
|
bassdll = "libbass.so"
|
||||||
|
|
||||||
debugmode = len(sys.argv) > 1 and sys.argv[1] == "debug"
|
debugmode = len(sys.argv) > 1 and sys.argv[1] == "debug"
|
||||||
if not debugmode:
|
if not debugmode:
|
||||||
fakebass = len(sys.argv) > 1 and sys.argv[1] == "bass"
|
fakebass = len(sys.argv) > 1 and sys.argv[1] == "bass"
|
||||||
if not exists("bass.dll") or fakebass:
|
if not exists(bassdll) or fakebass:
|
||||||
QtGui.QMessageBox.critical(None, "Unable to launch game", "Couldn't find the file 'bass.dll' on the client folder.\nAO2XP needs this file in order to play sounds and music.\nThe file is included in the client's zip file, make sure it's in the same folder as AO2XP.exe")
|
QtGui.QMessageBox.critical(None, "Unable to launch game", "Couldn't find the file %s on the client folder.\nAO2XP needs this file in order to play sounds and music.\nThe file is included in the client's zip file, make sure it's in the same folder as the AO2XP exe." % bassdll)
|
||||||
os._exit(-2)
|
os._exit(-2)
|
||||||
|
|
||||||
class gamewindow(QtGui.QMainWindow):
|
class gamewindow(QtGui.QMainWindow):
|
||||||
|
@ -70,6 +70,10 @@ zip_ref = zipfile.ZipFile(BASSOPUSZIP, 'r')
|
|||||||
zip_ref.extract(BASSOPUSDLL)
|
zip_ref.extract(BASSOPUSDLL)
|
||||||
zip_ref.close()
|
zip_ref.close()
|
||||||
|
|
||||||
|
if platform.system() == "Darwin":
|
||||||
|
os.rename(BASSDLL, "libbass.so")
|
||||||
|
os.rename(BASSOPUSDLL, "libbassopus.so")
|
||||||
|
|
||||||
print "installing apng"
|
print "installing apng"
|
||||||
pip_install("apng")
|
pip_install("apng")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user