-
Notifications
You must be signed in to change notification settings - Fork 4
/
launcher.py
45 lines (37 loc) · 1.13 KB
/
launcher.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from lib import tui, update
try:
import wca_qt
except ModuleNotFoundError:
message = ('PyQt module not found. Do you have PyQt5 installed? Try typing\n'
' pip install PyQt5\n'
'or visit https://www.riverbankcomputing.com/software/pyqt/download5 '
'for more information on how to install PyQt5')
print(message)
tui.wait()
exit(1)
banner = ('=================================\n'
'WOIN Character Assistant Launcher\n'
'=================================\n')
def main():
while True:
tui.clear_screen()
print(banner)
print('Main menu:\n')
print('1. Launch WCA')
print('2. Update WCA')
print('3. Repair WCA')
print('\n0. Exit\n')
selection = tui.user_selection()
if selection == '1':
wca_qt.main()
break
elif selection == '2':
update.update_wca()
tui.wait()
elif selection == '3':
update.repair_wca()
tui.wait()
elif selection == '0':
break
if __name__ == '__main__':
main()