Skip to content

feat: re-check license on Professional export - #11

Merged
forgottenlab merged 2 commits into
mainfrom
feat/export-license-recheck
Dec 1, 2026
Merged

forgottenlab merged 2 commits into
mainfrom
feat/export-license-recheck

Conversation

@forgottenlab

Copy link
Copy Markdown
Owner

改动 / What changed

Professional 工作台在选择导出路径并开始打包前,会再次调用现有的 LicenseManager.validate_current_license()(经 licensing/export_authorization.py 的 recheck_professional_export_license())。

  • 许可有效时不增加额外确认或提示,成功导出流程与原来相同。
  • 许可缺失、无效、过期或不匹配时,通过 MainWindow._error("无法导出", ...) 显示警告,并在打开保存对话框之前中止导出。
  • Basic 导出不检查许可,也不探测许可文件或硬件身份。
  • 底层 build_single_file_exe() 仍不读取许可证,以免测试与 Basic 打包路径需要跳过许可的后门。
  • 本阶段没有修改许可证格式、签名、HWID 采集,也没有改动已发布的 v0.2.0-beta.1,产品版本仍为 0.2.0-beta.1。

文档方面更新了 CHANGELOG.md、README.md、README_EN.md、docs/architecture.md、docs/dual-edition-phase2-launch-isolation.md;并在 docs/dual-edition-phase0-contract.md 增加后续状态附录,回答第 7 节问题 6,但不改写 Phase 0/1/2 的历史结论。

检查 / How it was checked

在 Windows 工作树 C:\Users\w1349\AppData\Local\Temp\launchflow-export-license-recheck 中,使用指定解释器 D:\Downloads\01-Software\Professional\SDKs\miniconda3\python.exe 跑完相关冒烟(Qt 为 offscreen;仅在该进程中指向当前解释器的 PySide6 plugins,未改 PATH/Conda/注册表/全局环境)。未读取或改写真实 .lic、HWID 或密钥材料,也未调用 PyInstaller 或制作发布包。

  • tools/check_export_license_recheck_smoke.py:通过(exit=0,约 2.1s)。覆盖 helper 的 Basic 空操作、缺失/有效/无效签名/过期/机器不匹配,以及 Professional GUI 有效时无额外提示、无效时警告并中止;Basic GUI 不探测许可。
  • tools/check_dual_edition_contract_smoke.py:通过(exit=0,约 1.5s)。
  • tools/check_shortcut_policy_smoke.py:通过(exit=0,约 1.5s)。
  • tools/check_step_reorder_smoke.py:通过(exit=0,约 1.0s)。
  • tools/check_readme_docs_smoke.py:通过(exit=0,约 0.2s)。
  • tools/check_dual_edition_phase2_smoke.py:通过(exit=0,约 1.2s)。

English Summary

Professional workbench export now re-checks the local offline license before the save dialog, reusing LicenseManager.validate_current_license(). A valid license stays silent; a missing, invalid, expired, or mismatched license shows a warning and aborts before packaging. Basic export and the low-level packer stay license-free. Docs, including a Phase 0 contract follow-up appendix, were updated. The listed smokes passed with the specified Windows interpreter; no real licenses, HWID, PyInstaller, or release packaging were involved.

Professional 工作台在选择导出路径前,复用现有 LicenseManager.validate_current_license() 做无感复核:许可有效时不额外提示,许可缺失、无效、过期或不匹配时警告并中止导出。Basic 导出和底层 build_single_file_exe() 不检查许可。

This commit saves in-progress work before shutdown. The new smoke script and related GUI smokes have not been run yet, and no pull request has been opened.

## English Summary
Professional workbench export re-checks the local offline license before the save dialog. A valid license is silent; a missing, invalid, expired, or mismatched license shows a warning and aborts. Basic export and the low-level packer stay license-free.
在不改写 Phase 0/1/2 历史结论的前提下,于 docs/dual-edition-phase0-contract.md 增加后续状态附录,记录 Professional 工作台导出前的无感许可复核,以及 Basic 导出与底层打包函数仍不检查许可的结论。

## English Summary
Add a follow-up appendix to the Phase 0 contract documenting the Professional workbench export license re-check, without rewriting earlier historical conclusions.
@forgottenlab
forgottenlab merged commit df0b047 into main Dec 1, 2026
1 check passed
@forgottenlab
forgottenlab deleted the feat/export-license-recheck branch December 1, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant