Skip to content

Commit e42fc21

Browse files
committed
ci: 显式强制使用 Code Page 65001 (UTF-8) 以彻底解决 Windows 打包字符编码冲突
1 parent 0861512 commit e42fc21

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
$content = $content.Replace("__VERSION__", $ver)
3939
$content = $content.Replace("__APP_NAME__", "Jiujie")
4040
$content = $content.Replace("__MANUFACTURER__", "${{ env.MANUFACTURER }}")
41+
# 显式使用 UTF8 (在 PowerShell 5.1 中默认带 BOM)
4142
$content | Out-File -Encoding utf8 wix/jiujie.wxs
4243
4344
$loc = Get-Content wix/main.wxl.template

wix/jiujie.wxs.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version='1.0' encoding='utf-8'?>
22
<!-- 脱敏后的安装包模板 | De-sensitized Installer Template -->
33
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
4-
<Product Id='*' Name='!(loc.ProductName)' UpgradeCode='__WIX_UPGRADE_CODE__' Manufacturer='!(loc.Manufacturer)' Language='2052' Version='__VERSION__'>
5-
<Package Id='*' Keywords='!(loc.Keywords)' Description='!(loc.Description)' Manufacturer='!(loc.Manufacturer)' InstallerVersion='450' Languages='2052' Compressed='yes' InstallScope='perMachine' Platform='x64'/>
4+
<Product Id='*' Name='!(loc.ProductName)' UpgradeCode='__WIX_UPGRADE_CODE__' Manufacturer='!(loc.Manufacturer)' Language='2052' Codepage='65001' Version='__VERSION__'>
5+
<Package Id='*' Keywords='!(loc.Keywords)' Description='!(loc.Description)' Manufacturer='!(loc.Manufacturer)' InstallerVersion='450' Languages='2052' Compressed='yes' InstallScope='perMachine' SummaryCodepage='65001' Platform='x64'/>
66

77
<MajorUpgrade Schedule='afterInstallInitialize' DowngradeErrorMessage='!(loc.DowngradeErrorMessage)'/>
88

wix/main.wxl.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<WixLocalization Culture='zh-CN' xmlns='http://schemas.microsoft.com/wix/2006/localization'>
2+
<WixLocalization Culture='zh-CN' Codepage='65001' xmlns='http://schemas.microsoft.com/wix/2006/localization'>
33
<String Id='ProductName'>__DISPLAY_NAME__</String>
44
<String Id='ShortcutFolderName'>__DISPLAY_NAME__</String>
55
<String Id='Manufacturer'>__MANUFACTURER__</String>

0 commit comments

Comments
 (0)