T-585 Chrome 路径自动检测
This commit is contained in:
+10
-2
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user