Skip to content

Commit f78c8d1

Browse files
committed
feat(windows): seed Gothic Void Crusade preset like macOS
Ship the same preset-gothic-void-crusade pack under windows/presets, copy it into the managed engine runtime, and preseed it into the saved theme library next to Arina Hashimoto. Default active theme stays Arina.
1 parent f41a633 commit f78c8d1

7 files changed

Lines changed: 88 additions & 19 deletions

File tree

docs/platforms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ Windows 启动、失败回滚与恢复重开均从已注册的 `OpenAI.Codex`
7575
### 平台差异
7676

7777
- macOS 的选图脚本会把这些字段写入主题库,可通过 `--appearance``--focus-x``--focus-y``--safe-area``--task-mode` 设置。
78-
- Windows 安装会把运行所需的 `assets/``scripts/` 原子复制到 `%LOCALAPPDATA%\CodexDreamSkin\engine`,所有快捷方式均指向该受管副本,因此安装后可移动或删除源码目录。安装还会初始化 `active-theme``themes``images`,并把「桥本有菜」同时设为首次默认和可切换的已保存主题。系统托盘支持更换背景、保存当前主题、从「已保存主题」切换、暂停和恢复;图片与 `theme.json` 保存在主题仓库中,不写进 Codex 的 `config.toml`。安装会保留用户已有的 `appearanceTheme`;仅在识别到旧版精确托管的浅色三元组时按备份迁移。
78+
- Windows 安装会把运行所需的 `assets/``scripts/` 原子复制到 `%LOCALAPPDATA%\CodexDreamSkin\engine`,所有快捷方式均指向该受管副本,因此安装后可移动或删除源码目录。安装还会初始化 `active-theme``themes``images`,并把「桥本有菜」设为首次默认活动主题,同时把「桥本有菜」与「Gothic Void Crusade / 哥特虚空远征」播种为可切换的已保存主题。系统托盘支持更换背景、保存当前主题、从「已保存主题」切换、暂停和恢复;图片与 `theme.json` 保存在主题仓库中,不写进 Codex 的 `config.toml`。安装会保留用户已有的 `appearanceTheme`;仅在识别到旧版精确托管的浅色三元组时按备份迁移。
7979
- Windows 渲染器仍支持在注入前用 `window.__CODEX_DREAM_SKIN_CONFIG__` 提供内存级可选覆盖(形状同上,颜色覆盖使用 `palette.accent`),但普通用户应优先使用持久化主题仓库与托盘。
8080

8181
## 预设与图片类型
8282

8383
- `macos/presets/preset-arina-hashimoto/` 是置顶的实测精选主题「桥本有菜 / Arina Hashimoto」。macOS 安装后用 `switch-theme-macos.sh --id preset-arina-hashimoto` 切换。
8484
- 该 preset pack 中只有 `background.jpg``2560 × 1440`、16:9、纯背景)和 `theme.json` 会被播种;它由用户提供的 `1672 × 941` 源 PNG 标准化导出,不代表增加了源图细节。Byte-identical 源图归档在 `docs/images/presets/arina-hashimoto-source.png`,不会随 preset 播种;`arina-hashimoto-light.jpg``arina-hashimoto-dark.jpg``2308 × 1572` Retina 浅/暗真实首页截图,未发送输入仅在截图时用临时本地样式遮蔽,只作效果预览,绝不能当背景导入。
8585
- `macos/presets/preset-gothic-void-crusade/` 是社区作者贡献的原创哥特科幻主题;macOS 没有活动主题时默认启用它。升级只清理固定的旧内置预设 ID,不删除 `custom-*` 或当前活动主题副本。
86-
- Windows 自带与 macOS byte-identical 的 `windows/assets/dream-reference.jpg` 纯背景,并在首次初始化时播种「桥本有菜」;可直接从「已保存主题 → 桥本有菜」切换。README 实机截图仍只作预览,绝不能作为背景导入。
86+
- Windows 自带与 macOS byte-identical 的 `windows/assets/dream-reference.jpg` 纯背景,并在首次初始化时播种「桥本有菜」与「Gothic Void Crusade」;可直接从「已保存主题」切换。README 实机截图仍只作预览,绝不能作为背景导入。
8787
- Windows 导入和 macOS 快速加载入口会拒绝空文件或超过 16 MB 的输入;macOS 主定制入口可接收最高 50 MB 的源图,但转换后的主题文件必须不超过 16 MB。两端 payload 构建还会拒绝任一边超过 16384px 或总像素超过 50MP 的声明尺寸;Windows 在复制导入图前复用 Node 元数据解析器执行同一限制。Windows 注入器用图片与主题内容的 SHA-256 修订值识别热更新,并在构建首帧 payload 前同步读取图片比例。
8888
- 自定义生图优先使用 `2560 × 1440`(16:9):左侧约 50%~58% 保持低信息、低对比,主体放在右侧约 58%~88%。输出必须是连续铺满画布的纯背景,禁止窗口、侧栏、卡片、输入框、文字、Logo 和水印。
8989
- 可直接复制的无人物、右侧成年人物与参考图编辑模板见 `docs/reference-background-prompt-guide.md`;公共默认提示词不指定真人或名人。

windows/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- 收起或重建左侧栏时不再因找不到 `aside.app-shell-left-panel` 而整页卸掉皮肤;只要主内容壳层仍在就继续应用当前主题,避免闪回 Codex 原生配色。透明辅助窗口仍会清理残留样式。
88
- 托盘「暂停皮肤」现在与 macOS 一致:写入暂停标记后立刻通过 CDP 执行 `injector --remove` 卸下当前窗口皮肤,不再只等 watcher 轮询;「继续显示皮肤」会清除暂停并重新应用。
99
- Windows 注入器补齐与 macOS 相同的窗口内操作浮层(loading / 成功 / 失败);暂停、继续与重新应用时在 Codex 主区显示「正在暂停皮肤…」「正在应用皮肤…」等进度,不再只有托盘气泡。
10+
- 安装/主题库初始化会把 macOS 同款「Gothic Void Crusade / 哥特虚空远征」播种到已保存主题(`presets/preset-gothic-void-crusade`),可与「桥本有菜」一并在托盘切换;默认活动主题仍为桥本有菜。
1011

1112
## 1.2.0 — 2026-07-17
1213

788 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"schemaVersion": 1,
3+
"id": "preset-gothic-void-crusade",
4+
"name": "Gothic Void Crusade",
5+
"brandSubtitle": "CODEX DREAM SKIN",
6+
"tagline": "A solemn cathedral-world horizon for focused work.",
7+
"projectPrefix": "Select project · ",
8+
"projectLabel": "◉ Select project",
9+
"statusText": "VOID CRUSADE ONLINE",
10+
"quote": "MAKE SOMETHING WONDERFUL",
11+
"image": "background.jpg",
12+
"appearance": "auto",
13+
"art": {
14+
"focusX": 0.76,
15+
"focusY": 0.45,
16+
"safeArea": "left",
17+
"taskMode": "ambient"
18+
},
19+
"colors": {
20+
"background": "#0d0d0e",
21+
"panel": "#171513",
22+
"panelAlt": "#211d18",
23+
"accent": "#c8a55a",
24+
"accentAlt": "#e3c27a",
25+
"secondary": "#74352e",
26+
"highlight": "#8a2f27",
27+
"text": "#f3ead7",
28+
"muted": "#b5a386",
29+
"line": "rgba(200, 165, 90, .28)"
30+
},
31+
"promoTitle": "Codex Dream Skin",
32+
"promoSub": "Gothic Void Crusade",
33+
"promoUrl": "https://github.com/Fei-Away/Codex-Dream-Skin"
34+
}

windows/scripts/common-windows.ps1

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ function Install-DreamSkinRuntimeEngine {
130130
'assets\dream-skin.css',
131131
'assets\renderer-inject.js',
132132
'assets\theme.json',
133+
'presets\preset-gothic-void-crusade\background.jpg',
134+
'presets\preset-gothic-void-crusade\theme.json',
133135
'scripts\common-windows.ps1',
134136
'scripts\config-utf8.ps1',
135137
'scripts\image-metadata.mjs',
@@ -146,7 +148,8 @@ function Install-DreamSkinRuntimeEngine {
146148
throw "Dream Skin runtime source is incomplete: $relative"
147149
}
148150
}
149-
foreach ($directoryName in @('assets', 'scripts')) {
151+
$runtimeDirectories = @('assets', 'scripts', 'presets')
152+
foreach ($directoryName in $runtimeDirectories) {
150153
$sourceDirectory = Join-Path $sourceRoot $directoryName
151154
if ((Test-DreamSkinPathEqual -Left $fullStateRoot -Right $sourceDirectory) -or
152155
(Test-DreamSkinPathWithin -Path $fullStateRoot -Root $sourceDirectory)) {
@@ -162,7 +165,7 @@ function Install-DreamSkinRuntimeEngine {
162165
Ensure-DreamSkinManagedDirectory -Path $stagingRoot -Root $fullStateRoot
163166

164167
try {
165-
foreach ($directoryName in @('assets', 'scripts')) {
168+
foreach ($directoryName in $runtimeDirectories) {
166169
Copy-Item -LiteralPath (Join-Path $sourceRoot $directoryName) -Destination $stagingRoot `
167170
-Recurse -Force -ErrorAction Stop
168171
}
@@ -174,13 +177,17 @@ function Install-DreamSkinRuntimeEngine {
174177
}
175178

176179
$sourcePrefix = $sourceRoot.TrimEnd('\') + '\'
180+
$sourceTrees = @(
181+
foreach ($directoryName in $runtimeDirectories) { Join-Path $sourceRoot $directoryName }
182+
)
183+
$stagedTrees = @(
184+
foreach ($directoryName in $runtimeDirectories) { Join-Path $stagingRoot $directoryName }
185+
)
177186
$sourceFiles = @(
178-
Get-ChildItem -LiteralPath (Join-Path $sourceRoot 'assets'), (Join-Path $sourceRoot 'scripts') `
179-
-Recurse -File -Force -ErrorAction Stop
187+
Get-ChildItem -LiteralPath $sourceTrees -Recurse -File -Force -ErrorAction Stop
180188
)
181189
$stagedFiles = @(
182-
Get-ChildItem -LiteralPath (Join-Path $stagingRoot 'assets'), (Join-Path $stagingRoot 'scripts') `
183-
-Recurse -File -Force -ErrorAction Stop
190+
Get-ChildItem -LiteralPath $stagedTrees -Recurse -File -Force -ErrorAction Stop
184191
)
185192
if ($sourceFiles.Count -ne $stagedFiles.Count) {
186193
throw 'Staged Dream Skin runtime file count does not match its source.'

windows/scripts/theme-windows.ps1

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ function Initialize-DreamSkinThemeStore {
219219
if (Test-Path -LiteralPath $retiredPresetDirectory) {
220220
Remove-Item -LiteralPath $retiredPresetDirectory -Recurse -Force
221221
}
222+
# Bundled Arina Hashimoto (default active wallpaper lives under assets/).
222223
$presetDirectory = Join-Path $paths.Saved 'preset-arina-hashimoto'
223224
$presetTheme = Join-Path $presetDirectory 'theme.json'
224225
Assert-DreamSkinNoReparseComponents -Path $presetDirectory
@@ -234,6 +235,27 @@ function Initialize-DreamSkinThemeStore {
234235
Assert-DreamSkinNoReparseComponents -Path $presetTheme
235236
Copy-Item -LiteralPath (Join-Path $assetRoot 'theme.json') -Destination $presetTheme -Force
236237
}
238+
# Bundled Gothic Void Crusade (same pack as macOS presets/).
239+
$gothicSource = Join-Path $SkillRoot 'presets\preset-gothic-void-crusade'
240+
$gothicDirectory = Join-Path $paths.Saved 'preset-gothic-void-crusade'
241+
$gothicTheme = Join-Path $gothicDirectory 'theme.json'
242+
$gothicSourceTheme = Join-Path $gothicSource 'theme.json'
243+
$gothicSourceImage = Join-Path $gothicSource 'background.jpg'
244+
Assert-DreamSkinNoReparseComponents -Path $gothicDirectory
245+
Assert-DreamSkinNoReparseComponents -Path $gothicTheme
246+
if ((Test-Path -LiteralPath $gothicSourceTheme -PathType Leaf) -and
247+
(Test-Path -LiteralPath $gothicSourceImage -PathType Leaf) -and
248+
-not (Test-Path -LiteralPath $gothicTheme -PathType Leaf)) {
249+
Ensure-DreamSkinManagedDirectory -Path $gothicDirectory -Root $paths.Root
250+
$gothicImage = Join-Path $gothicDirectory 'background.jpg'
251+
Assert-DreamSkinNoReparseComponents -Path $gothicImage
252+
Assert-DreamSkinImageFile -Path $gothicSourceImage
253+
Copy-Item -LiteralPath $gothicSourceImage -Destination $gothicImage -Force
254+
Assert-DreamSkinNoReparseComponents -Path $gothicImage
255+
Assert-DreamSkinImageFile -Path $gothicImage
256+
Assert-DreamSkinNoReparseComponents -Path $gothicTheme
257+
Copy-Item -LiteralPath $gothicSourceTheme -Destination $gothicTheme -Force
258+
}
237259
$null = Read-DreamSkinTheme -ThemeDirectory $paths.Active
238260
return $paths
239261
}

windows/tests/run-tests.ps1

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ try {
1414
$runtimeSourceRoot = Join-Path $temporaryRoot $runtimeSourceName
1515
$runtimeStateRoot = Join-Path $temporaryRoot 'runtime-state'
1616
New-Item -ItemType Directory -Path $runtimeSourceRoot | Out-Null
17-
foreach ($directoryName in @('assets', 'scripts')) {
17+
foreach ($directoryName in @('assets', 'scripts', 'presets')) {
1818
Copy-Item -LiteralPath (Join-Path $Root $directoryName) -Destination $runtimeSourceRoot `
1919
-Recurse -Force -ErrorAction Stop
2020
}
@@ -28,11 +28,11 @@ try {
2828
$engine = Install-DreamSkinRuntimeEngine -SkillRoot $runtimeSourceRoot -StateRoot $runtimeStateRoot
2929
$sourcePrefix = $runtimeSourceRoot.TrimEnd('\') + '\'
3030
$runtimeSourceFiles = @(
31-
Get-ChildItem -LiteralPath (Join-Path $runtimeSourceRoot 'assets'), (Join-Path $runtimeSourceRoot 'scripts') `
31+
Get-ChildItem -LiteralPath (Join-Path $runtimeSourceRoot 'assets'), (Join-Path $runtimeSourceRoot 'scripts'), (Join-Path $runtimeSourceRoot 'presets') `
3232
-Recurse -File -Force
3333
)
3434
$runtimeEngineFiles = @(
35-
Get-ChildItem -LiteralPath (Join-Path $engine.Root 'assets'), (Join-Path $engine.Root 'scripts') `
35+
Get-ChildItem -LiteralPath (Join-Path $engine.Root 'assets'), (Join-Path $engine.Root 'scripts'), (Join-Path $engine.Root 'presets') `
3636
-Recurse -File -Force
3737
)
3838
if ($runtimeSourceFiles.Count -ne $runtimeEngineFiles.Count -or
@@ -654,10 +654,15 @@ try {
654654
throw 'Default Windows theme did not seed the Arina Hashimoto wallpaper contract.'
655655
}
656656
$preseededThemes = @(Get-DreamSkinSavedThemes -StateRoot $themeStateRoot)
657-
if ($preseededThemes.Count -ne 1 -or
658-
$preseededThemes[0].Id -cne 'preset-arina-hashimoto' -or
659-
$preseededThemes[0].Name -cne '桥本有菜') {
660-
throw 'Arina Hashimoto was not preseeded in the Windows saved-theme menu.'
657+
$preseededIds = @($preseededThemes | ForEach-Object { $_.Id })
658+
if ($preseededThemes.Count -lt 2 -or
659+
$preseededIds -notcontains 'preset-arina-hashimoto' -or
660+
$preseededIds -notcontains 'preset-gothic-void-crusade') {
661+
throw 'Windows did not preseed both Arina Hashimoto and Gothic Void Crusade.'
662+
}
663+
$gothicSeed = $preseededThemes | Where-Object { $_.Id -ceq 'preset-gothic-void-crusade' } | Select-Object -First 1
664+
if ($null -eq $gothicSeed -or $gothicSeed.Name -cne 'Gothic Void Crusade') {
665+
throw 'Gothic Void Crusade was not preseeded with the expected display name.'
661666
}
662667
$updatedTheme = Set-DreamSkinActiveTheme -ImagePath (Join-Path $Root 'assets\dream-reference.jpg') `
663668
-Theme $null -Name '测试主题' -StateRoot $themeStateRoot
@@ -670,12 +675,12 @@ try {
670675
}
671676
$null = Initialize-DreamSkinThemeStore -SkillRoot $Root -StateRoot $themeStateRoot
672677
$idempotentTheme = Read-DreamSkinTheme -ThemeDirectory $themePaths.Active
673-
if ($idempotentTheme.Theme.id -cne 'custom' -or
674-
@(Get-DreamSkinSavedThemes -StateRoot $themeStateRoot).Count -ne 1) {
675-
throw 'Theme-store initialization overwrote the active custom theme or duplicated its bundled preset.'
678+
$afterReinitCount = @(Get-DreamSkinSavedThemes -StateRoot $themeStateRoot).Count
679+
if ($idempotentTheme.Theme.id -cne 'custom' -or $afterReinitCount -ne 2) {
680+
throw 'Theme-store initialization overwrote the active custom theme or duplicated its bundled presets.'
676681
}
677682
$savedTheme = Save-DreamSkinCurrentTheme -Name '已保存主题' -StateRoot $themeStateRoot
678-
if ($savedTheme.Theme.name -cne '已保存主题' -or @(Get-DreamSkinSavedThemes -StateRoot $themeStateRoot).Count -ne 2) {
683+
if ($savedTheme.Theme.name -cne '已保存主题' -or @(Get-DreamSkinSavedThemes -StateRoot $themeStateRoot).Count -ne 3) {
679684
throw 'Saved theme creation or discovery failed.'
680685
}
681686
$null = Use-DreamSkinSavedTheme -ThemeDirectory $savedTheme.Directory -StateRoot $themeStateRoot

0 commit comments

Comments
 (0)