AskaEth
d3e9a62b21
feat(core): M73 桌面壁纸路径探测(D38 第②级输入)
新增 platform::wallpaper:只做「桌面壁纸可能是哪个文件」的路径探测,
不解码图片、不取色(莫奈取色与三级降级留给 crates/design 的后续 mission)。
- 唯一入口 detect() / 注入式 detect_with(io, env, platform):返回有序候选列表
+ 各步失败原因,全部找不到时是空列表而不是错误;
- Windows 三步:TranscodedWallpaper(无扩展名,靠魔数认)→ *.theme 的
Wallpaper= → reg.exe query HKCU\Control Panel\Desktop /v WallPaper;
- Linux 四步:gsettings picture-uri(-dark) → KDE Image= → hyprpaper/sway
配置 → XFCE xfce4-desktop.xml,每步失败不影响下一步;
- macOS 两步:com.apple.wallpaper/Store/Index.plist 字符串扫描(不引 plist
依赖,兼容 bplist00)→ defaults read com.apple.desktop Background;
代码与文档明确标注「未在真机验证」;
- 零 unsafe / 零 FFI(core 是 #![forbid(unsafe_code)]),文件读取与子进程
全部经 ProbeIo 注入,环境变量表经 EnvSource 注入;三平台采集逻辑不带 cfg,
CI 的 Linux 上也能跑 Windows / macOS 夹具用例;
- 不新增第三方依赖;6 个文件均 ≤400 行,32 条单测覆盖三平台的
正常命中 / 多候选 / 全部失败。
2026-11-01 21:17:52 +08:00
..
2026-10-31 21:54:10 +08:00
2026-11-01 09:14:02 +08:00
2026-11-01 17:46:55 +08:00
2026-10-31 21:54:10 +08:00
2026-11-01 21:17:52 +08:00
2026-11-01 18:09:14 +08:00