Files
2026-08-03 10:52:51 +08:00

31 lines
766 B
Python

# -*- coding: utf-8 -*-
"""打包与源码共用的启动入口。
关键点:默认(Qt 界面)路径下绝不 import wechat_gui——那个模块顶层就会加载
tkinter/tcl,冷启动平白多出一大截;tk 经典界面只在显式要求或 PySide6 缺失
时才加载。
"""
import os
import sys
def main() -> None:
if "--classic-ui" not in sys.argv and os.environ.get("WECOM_RPA_CLASSIC_UI") != "1":
try:
from wechat_gui_qt import main as qt_main
except ImportError as exc:
if not (exc.name or "").startswith("PySide6"):
raise
else:
qt_main()
return
from wechat_gui import run_classic_ui
run_classic_ui()
if __name__ == "__main__":
main()