Commit | Line | Data |
---|---|---|
3cc94ef6 | 1 | '''This is the main file. This launches the application.''' |
b35b1f62 | 2 | import ya2.utils.log # so logging's info/debug are logged |
3cc94ef6 FC |
3 | from sys import argv |
4 | from panda3d.core import load_prc_file_data | |
5 | if '--version' in argv: | |
6 | load_prc_file_data('', 'window-type none') | |
8ee66edd | 7 | from os.path import exists |
3cc94ef6 | 8 | from traceback import print_exc |
b35b1f62 | 9 | from logics.app import PmachinesApp |
3cc94ef6 | 10 | from p3d_appimage import AppImageBuilder |
8ee66edd FC |
11 | |
12 | if __name__ == '__main__' or exists('main.pyo'): | |
3cc94ef6 FC |
13 | pmachines = PmachinesApp() |
14 | if pmachines.updating: | |
15 | AppImageBuilder('pmachines').update() | |
16 | elif not pmachines.version: | |
17 | try: pmachines.base.run() | |
18 | except Exception: | |
19 | print_exc() |