Optimizations and performance boost to pre-loader for launcher and game client.
This commit is contained in:
@@ -1,4 +1,28 @@
|
||||
from .cli import main
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
def main() -> int:
|
||||
"""Dispatch the common GUI path without importing every CLI operation."""
|
||||
|
||||
arguments = sys.argv[1:]
|
||||
if not arguments or arguments == ["gui"]:
|
||||
from .paths import AppPaths
|
||||
from .ui import run_dashboard
|
||||
|
||||
try:
|
||||
run_dashboard(AppPaths.from_environment())
|
||||
except KeyboardInterrupt:
|
||||
return 130
|
||||
except (ValueError, OSError, RuntimeError) as exc:
|
||||
print(f"Error: {exc}", file=sys.stderr)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
from .cli import main as cli_main
|
||||
|
||||
return cli_main(arguments)
|
||||
|
||||
|
||||
raise SystemExit(main())
|
||||
|
||||
Reference in New Issue
Block a user