T-585 Chrome 路径自动检测

This commit is contained in:
chengma
2026-07-10 16:19:01 +08:00
parent 8daaf7f4af
commit 7e491ed10e
11 changed files with 441 additions and 7 deletions
+10 -2
View File
@@ -6,7 +6,7 @@ import os
import sys
import webbrowser
from .. import appconfig, diagnostics, update_check
from .. import appconfig, chrome, diagnostics, update_check
from ..version import APP_NAME, display_name
from . import widgets as _widgets
from .widgets import *
@@ -136,6 +136,14 @@ def main() -> int:
return 1
if not _run_startup_update_gate():
return 1
window = MainWindow()
try:
startup = chrome.ensure_configured_chrome_path()
except (OSError, appconfig.ConfigError) as exc:
QMessageBox.critical(None, "启动配置错误", str(exc))
return 1
window = MainWindow(
config=startup["config"],
startup_status=startup["message"],
)
window.show()
return app.exec()