diff --git a/AO2XP.ico b/AO2XP.ico new file mode 100644 index 0000000..0974d86 Binary files /dev/null and b/AO2XP.ico differ diff --git a/AO2XP.py b/AO2XP.py index c99c8d9..f1d5721 100644 --- a/AO2XP.py +++ b/AO2XP.py @@ -1,4 +1,4 @@ -import sys, thread, time +import sys, thread, time, os from os.path import exists from PyQt4 import QtGui, QtCore app = QtGui.QApplication(sys.argv) @@ -8,7 +8,7 @@ if not debugmode: fakebass = len(sys.argv) > 1 and sys.argv[1] == "bass" if not exists("bass.dll") 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") - sys.exit(2) + os._exit(-2) class gamewindow(QtGui.QMainWindow): def __init__(self): @@ -55,8 +55,9 @@ if not debugmode: if jm == QtGui.QMessageBox.Yes: import basedownloader code = basedownloader.downloadVanilla() + if code != 0: os._exit(code) else: - sys.exit(3) + os._exit(-3) from pybass import * import gameview, mainmenu, options, ini diff --git a/AO2XP.spec b/AO2XP.spec index c0b2d86..90914c4 100644 --- a/AO2XP.spec +++ b/AO2XP.spec @@ -25,4 +25,5 @@ exe = EXE(pyz, debug=False, strip=False, upx=True, - console=False) \ No newline at end of file + console=False, + icon="AO2XP.ico") \ No newline at end of file diff --git a/AO2XP_console.ico b/AO2XP_console.ico new file mode 100644 index 0000000..34ee375 Binary files /dev/null and b/AO2XP_console.ico differ diff --git a/AO2XP_console.spec b/AO2XP_console.spec index f38f982..9cb9b8e 100644 --- a/AO2XP_console.spec +++ b/AO2XP_console.spec @@ -25,4 +25,5 @@ exe = EXE(pyz, debug=False, strip=False, upx=True, - console=True) \ No newline at end of file + console=True, + icon="AO2XP_console.ico") \ No newline at end of file