-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
39 lines (27 loc) · 891 Bytes
/
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
28
29
30
31
32
33
34
35
36
37
38
39
import argparse, sys, os
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
def main_func():
from pigbe.Constant.config.EnvCfg import EnvCfg
from pigbe.utils.myLogger import Logger
# 检验更新
from pigbe.utils import SoftWareInfo
# 加载插件
from pigbe.models import viewer
parser = argparse.ArgumentParser(
prog=EnvCfg["Global"]["Name"],
description=EnvCfg["Global"]["Description"],
)
parser.add_argument(
"--check-version",
help="Check version of program before start",
action="store_true",
)
args = parser.parse_args()
Logger.info(SoftWareInfo.getInfo(args.check_version))
import pigbe.plugins as _
os.system("pause")
# 加载viewer
Viewer = viewer.Viewer(EnvCfg["Launch"]["InitialMenuId"])
Viewer.listen()
if __name__ == "__main__":
main_func()