Commit | Line | Data |
---|---|---|
8ee66edd FC |
1 | '''This is the main file. This launches the application.''' |
2 | from sys import argv | |
3 | from panda3d.core import load_prc_file_data | |
4 | if '--version' in argv: | |
5 | load_prc_file_data('', 'window-type none') | |
6 | from os.path import exists | |
7 | from traceback import print_exc | |
8 | from pmachines.pmachines import Pmachines | |
9 | from p3d_appimage import AppImageBuilder | |
10 | ||
11 | if __name__ == '__main__' or exists('main.pyo'): | |
12 | pmachines = Pmachines() | |
13 | if pmachines.updating: | |
14 | AppImageBuilder('pmachines').update() | |
15 | elif not pmachines.version: | |
16 | try: pmachines.base.run() | |
17 | except Exception: | |
18 | print_exc() |