feat: 改用 PyInstaller 单 exe 分发,移除 PortablePython 内嵌运行时
- 仓库不再内置 25MB+ 的 Python 运行时与依赖;改由 PyInstaller 在 CI 打成单 exe,内嵌 UAC manifest,双击自动请求管理员权限 - 新增 GitHub / Gitea Actions(推送 v* tag 或页面手动触发),自动构建并发布 release,附 release zip(exe + config.ini + README) - release body 由 workflow 抽取 CHANGELOG.md 对应版本段,并自动注入 UTC 构建日期;CHANGELOG 文件不再手填日期 - script.py 适配 PyInstaller 冻结模式:config.ini 从 exe 同目录读取,避免落入 _MEI 临时解压目录 - README 重写使用流程,强调本工具仅支持「按住开镜」模式,与「切换/按键开镜」不兼容 - 新增 requirements.txt 记录运行/构建依赖;.gitignore 排除 build/ dist/ release/ *.spec
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import os
|
||||
import sys
|
||||
current_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
sys.path.append(os.path.join(current_dir, "PortablePython", "Lib", "site-packages"))
|
||||
|
||||
if getattr(sys, 'frozen', False):
|
||||
# PyInstaller onefile:配置文件应在 exe 同目录,而非 _MEI 临时解压目录
|
||||
current_dir = os.path.dirname(sys.executable)
|
||||
else:
|
||||
current_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
import time
|
||||
from pynput import mouse, keyboard
|
||||
|
||||
Reference in New Issue
Block a user