| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 | |
docs + verify: initialization guide, end-to-end verification harness and evidence - README: new "初始化(必读)" section. States explicitly that only code is in the repository, and that models/ (1.06 GB GGUF) and engine/ (~4.2 MB llama.cpp DLLs) are rebuilt locally by tools/fetch-model.ps1 and tools/build-engine.ps1, with prerequisites (Rust, VS2022 C++ build tools, no CUDA needed), the three-step quick start, the caveat that the exe looks for models/ and engine/ next to itself, and the dist/ packaging recipe. Adds a pointer to verify/. - verify/: the scripts actually used to validate the app end to end - real key and mouse injection, screen capture, window style/exstyle enumeration, click-through probing at a point covered by the overlay, settings edit + save round-trip, and graceful-shutdown checks - plus verify/README.md explaining how to run each one and the caveat that they move the real cursor and steal focus. - verify/evidence/: the three screenshots backing the claims (overlay with black text on light backgrounds, white text on dark ones and a scrim on busy ones; tray menu; settings window populated from config). - .gitattributes: normalize text files to LF so the tree stops churning between CRLF/LF; mark binary payloads as binary. - Normalize line endings of the previously committed sources to LF. | 1 个月前 |
验证脚本与证据
这里放的是开发时实际用来验证本程序的脚本和证据。它们都是"动真格"的:注入真实按键/鼠标、截真实屏幕、读真实日志,因为这类窗口/浮层/命中的行为单元测试覆盖不到。
⚠️ 这些脚本会注入真实输入:会移动你的光标、抢前台、在屏幕上画字。跑之前先确认没人在用这台机器(游戏/会议/直播中不要跑)。
环境
- Windows 11(脚本用 Windows PowerShell 5.1 语法,
powershell -NoProfile -ExecutionPolicy Bypass -File <脚本>直接跑) - 被测程序按
dist/布局启动(dist/translens.exe+dist/engine/+dist/models/) - 建议先用 测试快捷键(例如
Ctrl+Alt+F9/Ctrl+Alt+F10)写进dist/config.toml,避免与系统/其它软件冲突 - 日志:
dist/translens.log(受管启动时用环境变量TRANSLENS_LOG指定)
脚本
| 脚本 | 作用 |
|---|---|
screenshot.ps1 |
全屏截图到 PNG(验证视觉结果的唯一可信证据) |
press_key.ps1 |
注入真实按键/组合键,如 -Key "Ctrl+Alt+F9"、-Key ESC |
post_hotkey.ps1 |
向程序的消息窗口投递 WM_HOTKEY(等价于"按下了快捷键",但不碰键盘——自动化时用这个最安全) |
post_tray.ps1 |
投递托盘回调消息(WM_RBUTTONUP → 右键菜单在光标处弹出) |
inspect_windows.ps1 |
枚举某进程的顶层窗口:类名、标题、style/exstyle、矩形、前台窗口(验证穿透/置顶/无激活样式) |
inspect_settings.ps1 |
枚举设置窗口的全部子控件(类名 / 控件 ID / 文本) |
read_ctrl.ps1 |
用 WM_GETTEXT 读跨进程控件文本(GetWindowTextW 读不到别的进程的控件) |
focus_probe.ps1 |
查某线程的 hwndActive / hwndFocus 与各控件矩形,定位"输入到底进了哪个窗口" |
settings_edit_test.ps1 / settings_set_and_save.ps1 |
改设置字段 + 点"保存",验证配置落盘与热应用 |
settings_save_test.ps1 |
只发 WM_COMMAND(ID_SAVE=1001),验证保存路径 |
show_text.ps1 |
起一个已知英文内容的测试窗口(-Mode light|dark),并可把鼠标点击记录到文件(验证点击穿透) |
type_text.ps1 |
注入真实键盘输入(先点目标控件,再 Ctrl+A + 逐字输入) |
close_window.ps1 |
给指定窗口类发 WM_CLOSE(验证优雅退出与退出码) |
复现这几项检查
cd <repo>
# 1) 启动被测程序(受管进程;也可以直接双击 dist\translens.exe)
$env:TRANSLENS_LOG = "$PWD\dist\translens.log"
Start-Process "$PWD\dist\translens.exe"
# 2) 看看它建了多少窗口、样式对不对(应含 LAYERED|TRANSPARENT|TOPMOST|TOOLWINDOW|NOACTIVATE)
Get-Process translens | ForEach-Object { .\verify\inspect_windows.ps1 -ProcessId $_.Id }
# 3) 翻译一次:投递热键(不碰键盘),再截图
.\verify\post_hotkey.ps1 -HotkeyId 1
Start-Sleep 6
.\verify\screenshot.ps1 -Out .\verify\evidence\shot.png
Get-Content .\dist\translens.log | Select-Object -Last 3
# 日志里每条 "block N drawn" 都记录了位置、字号、背景亮度、选中字色、对比度与衬底,可直接核对自适应字色
# 4) 点击穿透:开一个会记录点击的测试窗口,在浮层覆盖的位置点一下,看点击是否落到下层窗口
Start-Process powershell -ArgumentList '-NoProfile','-ExecutionPolicy','Bypass','-File',"$PWD\verify\show_text.ps1",'-Mode','light','-ClicksLog',"$PWD\verify\clicks.log"
.\verify\post_hotkey.ps1 -HotkeyId 1 # 画浮层
# 用 SetCursorPos + mouse_event 点击浮层覆盖的区域(见开发记录里的坐标),然后:
Get-Content .\verify\clicks.log # 应记录到下层窗口收到点击;且前台窗口未变成浮层
# 5) 隐藏与退出
.\verify\press_key.ps1 -Key "Ctrl+Alt+F10" # 或 post_hotkey.ps1 -HotkeyId 2
.\verify\close_window.ps1 -Class TransLensMessage # 优雅退出,退出码 0
证据(evidence/)
| 文件 | 说明 |
|---|---|
overlay_light_target.png |
浮层实拍:同一屏上同时存在暗背景→白字无衬底、亮背景→黑字无衬底、杂色背景→加半透明衬底三种情况,译文画在原文下方且不遮挡原文 |
tray_menu.png |
托盘右键菜单:翻译一次(Ctrl+Alt+F9) / 显示译文 / 设置… / 退出(快捷键从配置动态生成) |
settings_window.png |
设置窗口:9 个字段全部按 config.toml 填充 |
日志侧证据(在开发记录里逐条列出):单次实屏运行 47 个文本块、总耗时 28 s;每块 translated in … ms 与 placement/font/text_rgb/contrast/scrim 明细;WindowFromPoint 在浮层覆盖点返回下层窗口;设置保存后 worker: applying the new configuration + config applied,随后翻译语言立即改变。
说明
这是仓库里刻意保留的最小验证集(脚本 + 三张截图,约 1 MB)。开发过程中用过的实验工程(三个独立 crate:OCR / 浮层 / llama FFI 的探针,含 ABI 尺寸校验、STQ 布局对比等)属于一次性研究材料,没有入库。