:fuck_off_xcode:

This commit is contained in:
Headshotnoby 2021-06-22 14:48:23 -04:00
parent 169a9e9ac4
commit 334c0906d0
2 changed files with 7 additions and 0 deletions

View File

@ -84,6 +84,8 @@ if not debugmode:
if code == 0:
subprocess.Popen(["./AO2XPupdat"])
os._exit(0)
elif osname == "Darwin" and ".app" in sys.argv[0]: # bundle
os.chdir(path) # return to Resources folder
import gameview, mainmenu, options

View File

@ -144,6 +144,11 @@ class updateThread(QtCore.QThread):
self.finished.emit()
return
path = sys.argv[0]
if platform.system() == "Darwin" and ".app" in path: # bundle
path = "/".join(path.split("/")[:-4]) # right next to the .app package
os.chdir(path)
updatezip = "update" + os.path.splitext(filename)[1]
if not os.path.exists(updatezip):
downloadfile = open(updatezip, "wb")