From efc185b8cf20b4ace48cab0007dc6b1273e84a39 Mon Sep 17 00:00:00 2001 From: 4Aiur <14359997+4Aiur@users.noreply.github.com> Date: Sun, 15 Sep 2024 09:38:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EMacOS=20zbar=E6=9C=AA?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/LoginUtil.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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