feat(package): add portable .dreamskin import and export - #114
Closed
rwang23 wants to merge 1 commit into
Closed
Conversation
rwang23
marked this pull request as ready for review
July 17, 2026 13:20
18 tasks
Owner
|
Thanks for this! This overlaps with #137's approach to the same 感谢!这个和 #137 是同一个 .dreamskin 包方向的两套实现,先都关闭(也都早于 #216 的 runtime 统一),以后如果重提会走统一设计。谢谢你的付出! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
English
Summary
.dreamskinPackage v1 for one explicit Theme v1 descriptor, one primary PNG/JPEG/WebP image, and an optional preview.inspectPackage,exportPackage, andimportPackageinterface from byte-identical macOS and Windows modules, plus matching CLI commands.Closes #108.
This complements the Theme v1 work from #63 / #101. Packages require an explicit
schemaVersion: 1, while this PR deliberately leaves the platform theme loaders, injector, renderer, CSS, and active-theme switching paths unchanged.Design and safety details
theme.imagemust exactly match the packaged image path.theme.jsonlast as the commit marker. It never replaces an existing theme.Conflict minimization
windows/CHANGELOG.md; our entry is at the end of the existing新增block, while feat(windows): add split-image Theme Studio #96 adds a separateUnreleasedsection.macos/tests/run-tests.sh; our edits use separate hunks from its Theme v1 runner hook.merge-treechecks completed successfully against the current heads of both feat(windows): add split-image Theme Studio #96 (0aed829) and feat(theme): define a versioned portable contract #101 (6ecad13).Type
Platform
Self-check
Docs-only
macOS
macos/tests/run-tests.shpassedmacos/scripts/doctor-macos.shverify-dream-skin-macos.shor Desktop VerifyWindows
install/start/verify/restorescripts exercisedUser-facing
macos/CHANGELOG.mdandwindows/CHANGELOG.md; no version bumpSecurity
app.asar, or signaturesNotes and verification
macos/presets/preset-midnight-aurorawith the macOS entry point, inspected/imported/re-exported it with the Windows entry point, then inspected the second package with the macOS entry point. Both package SHA-256 values were9ef31e2571e4d58f6f05c2237e3dd2fc3fc4159d0771007babae40085a313697; theme and image bytes were exact; content ID wasbc867af5ca1104e4495fc9cfd9d15b9adc267ecaa97ec2fbc6844f67ec49e5f8.git diff --check, UTF-8/BOM/trailing-whitespace checks, platform byte parity, and changed local documentation links passed.macos/tests/run-tests.shwas also run in the Linux container. It passed the preliminary Node regressions and the standalone-archive checks, then reached the existing macOS-only theme-switch fixture, where GNU/usr/bin/statdoes not support the BSD-f %zform. The checkbox remains unchecked; the package workflow is covered by the portable suites and the full round trip above.OpenAI.Codex26.715.2305.0.中文
摘要
.dreamskinPackage v1 单文件格式:一个包包含一份显式 Theme v1 描述、一张 PNG/JPEG/WebP 主图片,以及一张可选预览图。inspectPackage、exportPackage、importPackage模块接口和对应 CLI 命令。Closes #108。
该功能与 #63 / #101 的 Theme v1 工作配套。Package 要求主题显式声明
schemaVersion: 1;本 PR 不改平台主题加载器、injector、renderer、CSS 或当前主题切换流程。设计与安全细节
theme.image也必须与包内图片路径完全一致。theme.json,不会替换已有主题。冲突控制
windows/CHANGELOG.md;本 PR 把条目放在当前“新增”段末尾,而 feat(windows): add split-image Theme Studio #96 新建独立的Unreleased段。macos/tests/run-tests.sh;本 PR 的独立发行文档夹具与 Theme v1 runner hook 位于不同 hunk。0aed829和 feat(theme): define a versioned portable contract #101 当前头提交6ecad13分别运行 Git 三方merge-tree检查,两次都成功且没有冲突。类型
平台
自测
仅文档
macOS
macos/tests/run-tests.shmacos/scripts/doctor-macos.shWindows
install/start/verify/restore脚本用户可见变更
macos/CHANGELOG.md与windows/CHANGELOG.md;未提升版本号安全
app.asar或签名补充与验证
macos/presets/preset-midnight-aurora,Windows 入口检查、导入并重新导出,最后再由 macOS 入口检查第二个包。两次 Package SHA-256 都是9ef31e2571e4d58f6f05c2237e3dd2fc3fc4159d0771007babae40085a313697,主题与图片字节完全一致,content ID 为bc867af5ca1104e4495fc9cfd9d15b9adc267ecaa97ec2fbc6844f67ec49e5f8。git diff --check、UTF-8/BOM/尾随空白、平台字节一致性,以及本次文档本地链接检查全部通过。macos/tests/run-tests.sh:前置 Node 回归和独立发行包检查均通过;之后进入现有的 macOS 专属主题切换夹具时,GNU/usr/bin/stat不支持 BSD 的-f %z参数。对应复选框保持未勾选;Package 流程已由可移植测试和上述完整往返覆盖。OpenAI.Codex26.715.2305.0。