feat: default export dir to <install root>\合并后的图片 when packaged

get_output_dir() now returns <install root>\合并后的图片 (parent of app\) for
frozen builds — next to Launcher.exe, easy to find, not replaced on update.
Falls back to <data_dir>/output if the install root is read-only; dev mode
unchanged. The export panel already uses get_output_dir(), so its default
follows automatically.

- tests/test_file_service.py: +3 (dev, frozen install-root, fallback)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-18 14:29:09 +08:00
co-authored by Claude Opus 4.8
parent 3c4617a27b
commit 421ae78035
3 changed files with 82 additions and 3 deletions
+2 -2
View File
@@ -1002,8 +1002,8 @@
任务:
- [x] 文档:`docs/10` §4/§5、`docs/02` 配置说明、`docs/07` §7.5 对齐
- [ ] `file_service.get_output_dir()`:打包态优先 `<安装根>\合并后的图片`(安装根 = `get_app_dir().parent`),不可写回退 `get_data_dir()/output`;开发态用项目目录;补单测
- [ ] 导出面板默认值随之变化(沿用 `get_output_dir()`,无需单独改)
- [x] `file_service.get_output_dir()`:打包态优先 `<安装根>\合并后的图片`(安装根 = `get_app_dir().parent`),不可写回退 `get_data_dir()/output`;开发态用项目目录;`tests/test_file_service.py` 3 个单测
- [x] 导出面板默认值随之变化(沿用 `get_output_dir()`,无需单独改)
- [ ] GUI 实测:打包运行后默认导出到 `<安装根>\合并后的图片`,且更新后仍在
## 18. 后续暂缓任务