Skip to content

Commit b8ccd45

Browse files
committed
feat(installer): Add support for Simplified Chinese language
- Add Simplified Chinese language files to the Inno Setup installer - Update the installation script to support multi-language display - Automatically download and install Chinese language files into the Inno Setup directory
1 parent 84f2ed9 commit b8ccd45

2 files changed

Lines changed: 22 additions & 5 deletions

File tree

.github/workflows/release-installer.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ jobs:
8585
choco install innosetup -y
8686
shell: pwsh
8787

88+
- name: Download Chinese language file for Inno Setup
89+
run: |
90+
$innoPath = "${env:ProgramFiles(x86)}\Inno Setup 6"
91+
$langPath = Join-Path $innoPath "Languages"
92+
$chineseFile = Join-Path $langPath "ChineseSimplified.isl"
93+
94+
if (-not (Test-Path $chineseFile)) {
95+
Write-Host "Downloading Chinese Simplified language file..."
96+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Unofficial/ChineseSimplified.isl" -OutFile $chineseFile
97+
}
98+
shell: pwsh
99+
88100
- name: Build Installers
89101
run: |
90102
New-Item -ItemType Directory -Force -Path installer

scripts/installer.iss

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ DisableProgramGroupPage=yes
4444

4545
[Languages]
4646
Name: "english"; MessagesFile: "compiler:Default.isl"
47+
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
48+
49+
[CustomMessages]
50+
english.AppDisplayName=DevTools
51+
chinesesimplified.AppDisplayName=开发者工具
4752

4853
[Tasks]
4954
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
@@ -53,13 +58,13 @@ Source: "{#SourceDir}\{#AppExeName}"; DestDir: "{app}"; Flags: ignoreversion
5358
Source: "{#SourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
5459

5560
[Icons]
56-
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"
57-
Name: "{group}\{cm:ProgramOnTheWeb,{#AppName}}"; Filename: "{#AppURL}"
58-
Name: "{group}\{cm:UninstallProgram,{#AppName}}"; Filename: "{uninstallexe}"
59-
Name: "{autodesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon
61+
Name: "{group}\{cm:AppDisplayName}"; Filename: "{app}\{#AppExeName}"
62+
Name: "{group}\{cm:ProgramOnTheWeb,{cm:AppDisplayName}}"; Filename: "{#AppURL}"
63+
Name: "{group}\{cm:UninstallProgram,{cm:AppDisplayName}}"; Filename: "{uninstallexe}"
64+
Name: "{autodesktop}\{cm:AppDisplayName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon
6065

6166
[Run]
62-
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
67+
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{cm:AppDisplayName}}"; Flags: nowait postinstall skipifsilent
6368

6469
[UninstallDelete]
6570
Type: filesandordirs; Name: "{app}"

0 commit comments

Comments
 (0)