新增MacOS zbar未安装提示

This commit is contained in:
4Aiur 2024-09-15 09:38:00 +08:00
parent 37479661a3
commit efc185b8cf
No known key found for this signature in database

View File

@ -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