From 3cc94ef60188f3b84fe70d3405a8052c3a8c1cea Mon Sep 17 00:00:00 2001 From: Flavio Calva Date: Thu, 9 Jun 2022 09:02:19 +0200 Subject: [PATCH] Revert "main component" This reverts commit 9c4f74500584d5ae259eda3dfc39975a0ae99043. --- main.py | 19 ++++++++++++++++--- main/__init__.py | 0 main/main.py | 21 --------------------- 3 files changed, 16 insertions(+), 24 deletions(-) delete mode 100644 main/__init__.py delete mode 100644 main/main.py diff --git a/main.py b/main.py index c9d577f..3d4b45f 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,19 @@ +'''This is the main file. This launches the application.''' +import ya2.engine.log # so logging's info/debug are logged +from sys import argv +from panda3d.core import load_prc_file_data +if '--version' in argv: + load_prc_file_data('', 'window-type none') from os.path import exists -import main.main - +from traceback import print_exc +from game.app import PmachinesApp +from p3d_appimage import AppImageBuilder if __name__ == '__main__' or exists('main.pyo'): - main.main.Main() + pmachines = PmachinesApp() + if pmachines.updating: + AppImageBuilder('pmachines').update() + elif not pmachines.version: + try: pmachines.base.run() + except Exception: + print_exc() diff --git a/main/__init__.py b/main/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/main/main.py b/main/main.py deleted file mode 100644 index 83c8adb..0000000 --- a/main/main.py +++ /dev/null @@ -1,21 +0,0 @@ -import ya2.engine.log # so logging's info/debug are logged -from sys import argv -from panda3d.core import load_prc_file_data -if '--version' in argv: - load_prc_file_data('', 'window-type none') -from os.path import exists -from traceback import print_exc -from game.app import PmachinesApp -from p3d_appimage import AppImageBuilder - - -class Main: - - def __init__(self): - pmachines = PmachinesApp() - if pmachines.updating: - AppImageBuilder('pmachines').update() - elif not pmachines.version: - try: pmachines.base.run() - except Exception: - print_exc() -- 2.30.2