Files
zyt/app/research/debug_mode_package_result.md
T
2026-08-28 18:24:37 +08:00

80 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Windows 1.2.0 正式包重建结果(DEBUG_MODE=False
- 执行日期:2026-08-28Asia/Shanghai
- 工作目录:`D:\web\zyt\app`
- 总体结果:成功
- 生产源码修改:无(本次仅重建产物并新增本记录)
## 发布配置核对
打包前解析 `src/doctor_workstation/__init__.py`,确认:
- `__version__ = "1.2.0"`
- `DEBUG_MODE = False`
- `ONLINE_API_BASE_URL = "https://admin.zhenyangtang.com.cn"`
打包完成后,使用 PyInstaller 的归档读取器打开
`dist/DoctorWorkstation/DoctorWorkstation.exe` 内嵌的 `PYZ.pyz`,提取
`doctor_workstation` 模块并检查其顶层字节码常量,得到:
- `STORE_NAME __version__` 前的常量为 `"1.2.0"`
- `STORE_NAME DEBUG_MODE` 前的常量为 `False`
- `STORE_NAME ONLINE_API_BASE_URL` 前的常量为
`"https://admin.zhenyangtang.com.cn"`
因此本次重建的 EXE 已包含正式模式和线上 API 域名配置。
Windows 版本资源也核对为:应用 EXE 的 `FileVersion` / `ProductVersion`
均为 `1.2.0`,安装器的 `ProductVersion``1.2.0`
## 打包
执行命令:
```powershell
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File scripts\package_windows.ps1
```
- 退出码:`0`
- Vue/Vite 前端构建:通过(43 个模块)
- PyInstaller 6.22.0 / Python 3.12.12:通过
- Frozen Qt multimedia file gate:通过
- Frozen Qt multimedia smoke gate:通过
- Frozen application entry smoke gate:通过
- 7-Zip ZIP 创建:通过(`Everything is Ok`
- Inno Setup 6.7.3:通过(`Successful compile (175.078 sec)`
构建过程出现 Vite 大 chunk 提示、一个可选 Qt QML 插件缺失提示以及
Windows 系统 DLL 解析警告;它们均未阻断构建,且上述冻结产物门禁全部通过。
## 安装器烟测
执行命令:
```powershell
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File scripts\smoke_windows_installer.ps1 -Installer dist\DoctorWorkstation-Setup-Windows-x64-1.2.0.exe
```
- 退出码:`0`
- 结果:`Installer icon/install/start/uninstall smoke test passed.`
- 隔离测试目录:
`C:\Users\pc\AppData\Local\Temp\doctor-workstation-installer-smoke-4988cc3cc71346e49925445b9ae57fb9`
- 覆盖项:安装器图标、静默安装、已安装 EXE 启动、静默卸载及卸载残留检查
## 产物与校验
| 文件 | 大小(字节) | 大小(MiB | SHA-256 |
| --- | ---: | ---: | --- |
| `dist/DoctorWorkstation-Setup-Windows-x64-1.2.0.exe` | 162,912,808 | 155.366 | `D0A9EED88F42F7FBBF31920D7B1ED82BD241481E98964F42313DF386CB746C0A` |
| `dist/DoctorWorkstation-Windows-x64-1.2.0.zip` | 230,810,092 | 220.118 | `9FAA8596AE0D233626B3D44676C51E6DB0BA3496B12D2EE6C984ABC0E51EB01B` |
| `dist/SHA256SUMS.txt` | 220 | 0.000 | `2DA56F76458ACE040597916C68B265C737D270B335EA73F21C4A248A2FA41B78` |
`dist/SHA256SUMS.txt` 内容:
```text
D0A9EED88F42F7FBBF31920D7B1ED82BD241481E98964F42313DF386CB746C0A DoctorWorkstation-Setup-Windows-x64-1.2.0.exe
9FAA8596AE0D233626B3D44676C51E6DB0BA3496B12D2EE6C984ABC0E51EB01B DoctorWorkstation-Windows-x64-1.2.0.zip
```
独立使用 `Get-FileHash -Algorithm SHA256` 重算 EXE 和 ZIP 后,两项均与
`SHA256SUMS.txt` 逐字符匹配;清单恰好包含两条记录。