无人值守自动化: 配置预检、选队精确匹配、窗口守护、卡死重跑、计划任务, AALC 升级到 b0f4393
- lc_mcp/preflight.py: 启动前拦截 sinner_order 全 0、会花狂气、窗口放不进桌面 (退出码 3) - lc_mcp/aalc_patches.py: 队伍名按编号精确匹配 (TEAMS #1 不再命中 #10); 后台守护客户区 16:9 - auto_cycle.py: AALC 卡死后停掉重跑; --mirror 打镜牢; 每轮写 cycle_*.log/.json 报告 - install_unattended.ps1: 注册会话看门狗 (每 5 分钟) 与每日一轮计划任务 - lc_ui.py: pythonw 启动时子进程改用 python 且不弹窗 - vendor/aalc: 7452fad -> b0f4393 (镜牢楼层识别、困牢奖励、排队启动修复) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+14
-2
@@ -13,9 +13,21 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
|
|
||||||
|
def _console_python(exe):
|
||||||
|
"""计划任务用 pythonw 启动(不弹窗、不抢游戏焦点), 但子进程要读 stdout, 换成同目录的 python。"""
|
||||||
|
head, name = os.path.split(exe)
|
||||||
|
if name.lower() == 'pythonw.exe' and os.path.exists(os.path.join(head, 'python.exe')):
|
||||||
|
return os.path.join(head, 'python.exe')
|
||||||
|
return exe
|
||||||
|
|
||||||
|
|
||||||
# 默认用运行本脚本的解释器(AALC 的 venv); 需要时用 LC_PY 指定
|
# 默认用运行本脚本的解释器(AALC 的 venv); 需要时用 LC_PY 指定
|
||||||
PY = os.environ.get('LC_PY') or sys.executable
|
PY = os.environ.get('LC_PY') or _console_python(sys.executable)
|
||||||
PROBE = os.path.join(HERE, 'mcp_probe.py')
|
PROBE = os.path.join(HERE, 'mcp_probe.py')
|
||||||
|
# Windows 上不给子进程弹控制台窗口(从 pythonw 启动时每次调用都会闪一下)
|
||||||
|
NO_WINDOW = {'creationflags': 0x08000000} if os.name == 'nt' else {}
|
||||||
|
|
||||||
BASE_W, BASE_H = 1600, 900
|
BASE_W, BASE_H = 1600, 900
|
||||||
_scale = None
|
_scale = None
|
||||||
@@ -23,7 +35,7 @@ _scale = None
|
|||||||
|
|
||||||
def run(cmd):
|
def run(cmd):
|
||||||
r = subprocess.run(cmd, capture_output=True, text=True,
|
r = subprocess.run(cmd, capture_output=True, text=True,
|
||||||
encoding='utf-8', errors='replace')
|
encoding='utf-8', errors='replace', **NO_WINDOW)
|
||||||
return (r.stdout or '') + (r.stderr or '')
|
return (r.stdout or '') + (r.stderr or '')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user