forked from headshot2017/AIO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
27 lines (21 loc) · 1.01 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from PyQt4 import QtCore, QtGui
from os import path
import ctypes, platform, ini, sys, __builtin__
import audio as AUDIO
__builtin__.audio = AUDIO
del AUDIO
osname = platform.system()
if osname == "Linux": QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads) # Linux fix
missingfile = audio.checkAvailable()
if missingfile:
QtGui.QMessageBox(QtGui.QMessageBox.Information, "Failed to launch game", "'%s' is missing on the game folder.\nThis file is required for audio playback.\nDid you extract all the game files correctly?" % missingfile)
sys.exit(1)
audio.init()
from AIOApplication import AIOApplication
app = AIOApplication(sys.argv)
if not path.exists("data"):
QtGui.QMessageBox(QtGui.QMessageBox.Information, "Failed to launch game", "The folder named \"data\" could not be found.\nDid you extract all the game files properly? The folder \"data\" must be situated in the same folder as the game exe.")
sys.exit(1)
app.setWindowIcon(QtGui.QIcon("icon.ico"))
app.exec_()
audio.free()