Skip to content

Commit 51be101

Browse files
committed
fix(windows): vendor Inno Chinese messages
1 parent c46dde5 commit 51be101

8 files changed

Lines changed: 487 additions & 3 deletions

File tree

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
*.sh text eol=lf
77
*.command text eol=lf
88

9-
# Release-reviewed preset metadata is hashed byte-for-byte.
9+
# Release-reviewed build inputs are hashed byte-for-byte.
1010
macos/presets/preset-gothic-void-crusade/theme.json text eol=lf
1111
windows/presets/preset-gothic-void-crusade/theme.json text eol=lf
12+
windows/installer/languages/ChineseSimplified.isl text eol=lf
13+
windows/installer/languages/Inno-Setup-License.txt text eol=lf
1214

1315
# Keep artwork out of text normalization and text diffs.
1416
*.png binary

macos/NOTICE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ previews and must never be imported as wallpapers.
5656
SHA-256. Node.js is distributed under its own license; that license is kept
5757
beside the bundled executable in `runtime/node/LICENSE`.
5858

59+
## Inno Setup Simplified Chinese messages
60+
61+
The Windows installer is compiled with Inno Setup. Its Simplified Chinese
62+
messages file is vendored unchanged from the official Inno Setup source tag
63+
`is-6_7_1` at
64+
`windows/installer/languages/ChineseSimplified.isl`, maintained by Zhenghan
65+
Yang and distributed under the Inno Setup License. The full license is retained
66+
at `windows/installer/languages/Inno-Setup-License.txt`.
67+
5968
## Security model
6069

6170
Themes are applied through Chromium DevTools Protocol on **loopback only**. While a themed session is running, treat the local debugging port as sensitive: do not run untrusted local software that could attach to it. Use the Restore launcher to tear down the themed session and debugging port.

windows/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### 修复
66

7+
- Windows Release 构建不再依赖 Chocolatey 精简版 Inno Setup 是否附带非官方翻译目录;固定并校验 Inno 6.7.1 官方简体中文语言文件后从隔离 staging 编译,保证 CI 与 Release runner 都能生成双语 Setup.exe。
78
- 收起或重建左侧栏时不再因找不到 `aside.app-shell-left-panel` 而整页卸掉皮肤;只要主内容壳层仍在就继续应用当前主题,避免闪回 Codex 原生配色。透明辅助窗口仍会清理残留样式。
89
- 托盘「暂停皮肤」现在与 macOS 一致:写入暂停标记后立刻通过 CDP 执行 `injector --remove` 卸下当前窗口皮肤,不再只等 watcher 轮询;「继续显示皮肤」会清除暂停并重新应用。
910
- Windows 注入器补齐与 macOS 相同的窗口内操作浮层(loading / 成功 / 失败);暂停、继续与重新应用时在 Codex 主区显示「正在暂停皮肤…」「正在应用皮肤…」等进度,不再只有托盘气泡。

windows/installer/build-release.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ $macosVersionPath = Join-Path (Join-Path $repositoryRoot 'macos') 'VERSION'
2121
$macosPackagePath = Join-Path (Join-Path $repositoryRoot 'macos') 'package.json'
2222
$licensePath = Join-Path (Join-Path $repositoryRoot 'macos') 'LICENSE'
2323
$noticePath = Join-Path (Join-Path $repositoryRoot 'macos') 'NOTICE.md'
24+
$innoLanguageRoot = Join-Path $installerRoot 'languages'
25+
$innoChineseLanguagePath = Join-Path $innoLanguageRoot 'ChineseSimplified.isl'
26+
$innoSetupLicensePath = Join-Path $innoLanguageRoot 'Inno-Setup-License.txt'
27+
$innoChineseLanguageSha256 = '7d544b9bb1d142cfa11f2e5d3cc8abe2e55f8e066c5124e3772675aa236e1278'
28+
$innoSetupLicenseSha256 = '0c81595601bce47eeef8d865d5da7f9ca2c6a12235b7482b29f5ab23ed02ee5a'
2429
$publicPresetRoot = Join-Path (Join-Path (Join-Path $repositoryRoot 'macos') 'presets') `
2530
'preset-gothic-void-crusade'
2631
$publicPresetImagePath = Join-Path $publicPresetRoot 'background.jpg'
@@ -257,6 +262,16 @@ $null = Read-ReleaseTextFile -Path $definitionPath
257262
$null = Read-ReleaseTextFile -Path $bootstrapPath
258263
$null = Read-ReleaseTextFile -Path $licensePath
259264
$null = Read-ReleaseTextFile -Path $noticePath
265+
$null = Read-ReleaseTextFile -Path $innoChineseLanguagePath
266+
$null = Read-ReleaseTextFile -Path $innoSetupLicensePath
267+
$innoChineseLanguageHash = (Get-FileHash -LiteralPath $innoChineseLanguagePath -Algorithm SHA256).Hash.ToLowerInvariant()
268+
if ($innoChineseLanguageHash -cne $innoChineseLanguageSha256) {
269+
throw "The pinned Inno Setup Simplified Chinese messages changed. Expected $innoChineseLanguageSha256, found $innoChineseLanguageHash."
270+
}
271+
$innoSetupLicenseHash = (Get-FileHash -LiteralPath $innoSetupLicensePath -Algorithm SHA256).Hash.ToLowerInvariant()
272+
if ($innoSetupLicenseHash -cne $innoSetupLicenseSha256) {
273+
throw "The pinned Inno Setup license changed. Expected $innoSetupLicenseSha256, found $innoSetupLicenseHash."
274+
}
260275
$publicPresetTheme = (Read-ReleaseTextFile -Path $publicPresetThemePath) | ConvertFrom-Json
261276
if ("$($publicPresetTheme.id)" -cne 'preset-gothic-void-crusade' -or
262277
"$($publicPresetTheme.image)" -cne 'background.jpg') {
@@ -319,7 +334,9 @@ try {
319334
$stageRoot = Join-Path $WorkingDirectory 'stage'
320335
$payloadRoot = Join-Path $stageRoot 'payload'
321336
$nodeRoot = Join-Path (Join-Path $payloadRoot 'runtime') 'node'
337+
$languageRoot = Join-Path $stageRoot 'languages'
322338
New-Item -ItemType Directory -Path $payloadRoot | Out-Null
339+
New-Item -ItemType Directory -Path $languageRoot | Out-Null
323340
Copy-ReleaseDirectory -Source (Join-Path $windowsRoot 'assets') -Destination (Join-Path $payloadRoot 'assets')
324341
Copy-ReleaseDirectory -Source (Join-Path $windowsRoot 'scripts') -Destination (Join-Path $payloadRoot 'scripts')
325342
Copy-ReleaseDirectory -Source $publicPresetRoot `
@@ -340,6 +357,8 @@ try {
340357
Copy-Item -LiteralPath $bootstrapPath -Destination (Join-Path $stageRoot 'setup-bootstrap.ps1') -Force
341358
Copy-Item -LiteralPath $licensePath -Destination (Join-Path $stageRoot 'LICENSE.txt') -Force
342359
Copy-Item -LiteralPath $noticePath -Destination (Join-Path $stageRoot 'NOTICE.md') -Force
360+
Copy-Item -LiteralPath $innoChineseLanguagePath `
361+
-Destination (Join-Path $languageRoot 'ChineseSimplified.isl') -Force
343362

344363
Add-Type -AssemblyName System.IO.Compression
345364
Add-Type -AssemblyName System.IO.Compression.FileSystem

windows/installer/codex-dream-skin.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ MinVersion=10.0
5151

5252
[Languages]
5353
Name: "english"; MessagesFile: "compiler:Default.isl"
54-
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\Unofficial\ChineseSimplified.isl"
54+
Name: "chinesesimplified"; MessagesFile: "{#StageRoot}\languages\ChineseSimplified.isl"
5555

5656
[Messages]
5757
english.ConfirmUninstall=Uninstall will close Codex, restore its original appearance, remove the Dream Skin runtime, and keep saved themes and images.%n%nContinue?

0 commit comments

Comments
 (0)