diff --git a/util/LoginUtil.py b/util/LoginUtil.py index 590328f..1631e1d 100644 --- a/util/LoginUtil.py +++ b/util/LoginUtil.py @@ -1,8 +1,10 @@ +import platform import sys + +import qrcode import requests from PIL import Image -import qrcode -import platform + try: from pyzbar.pyzbar import decode except Exception as e: @@ -10,8 +12,13 @@ except Exception as e: if platform.system() == "Linux": print("对于基于 RPM 的系统(如 Fedora), 您可以运行以下命令:") print("sudo dnf install -y zbar") + elif platform.system() == "Darwin": + print("MacOS 安装 zbar 请参考:") + print("https://github.com/LibraHp/GetQzonehistory/issues/23#issuecomment-2349269027") + sys.exit(1) print("有关更多安装指南,请参考 zbar 的官方文档或您的发行版文档。") sys.exit(1) + import time import re import util.ConfigUtil as Config