Skip to content

Commit 7a3d1b6

Browse files
authored
Add simplified and traditional chinese (#1250)
Co-authored-by: BornToBeRoot <[email protected]>
1 parent e286b2c commit 7a3d1b6

File tree

5 files changed

+54
-27
lines changed

5 files changed

+54
-27
lines changed

InnoSetup.iss

+16-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "NETworkManager"
5-
#define MyAppVersion "2021.6.26.0"
5+
#define MyAppVersion "2021.9.5.0"
66
#define MyAppPublisher "BornToBeRoot"
77
#define MyAppURL "https://github.com/BornToBeRoot/NETworkManager/"
88
#define MyAppExeName "NETworkManager.exe"
@@ -38,19 +38,21 @@ ArchitecturesInstallIn64BitMode=x64
3838
WizardSmallImageFile=Images\NETworkManager_InnoSetup.bmp
3939

4040
[Languages]
41-
Name: "english"; MessagesFile: "compiler:Default.isl"
42-
Name: "brasilian"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
43-
Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl"
44-
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl"
45-
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
46-
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
47-
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
48-
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
49-
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
50-
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
51-
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
52-
Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl"
53-
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
41+
Name: "english"; MessagesFile: "compiler:Default.isl"
42+
Name: "brasilian"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
43+
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
44+
Name: "chinesetraditional"; MessagesFile: "compiler:Languages\ChineseTraditional.isl"
45+
Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl"
46+
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl"
47+
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
48+
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
49+
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
50+
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
51+
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
52+
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
53+
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
54+
Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl"
55+
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
5456

5557
[Tasks]
5658
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@
5050
# Build
5151
__Requirements__
5252
- [SDK .NET 5.0](https://dotnet.microsoft.com/download/dotnet/5.0)
53-
- Visual Studio with `.NET desktop development` and `Universal Windows Platform development`
53+
- Visual Studio 2019 or later with `.NET desktop development` and `Universal Windows Platform development`
5454

5555
__Optional__
5656
- [InnoSetup](https://jrsoftware.org/isinfo.php) (if you want to create an installer)
57+
- Download `ChineseSimplified.isl` and `ChineseTraditional.isl` from the [official repo](https://github.com/jrsoftware/issrc/blob/main/Files/Languages/Unofficial/) and place them in the language folder of InnoSetup
5758

58-
__Steps__
59-
1. Clone or download the repository
60-
2. Run the `.\build.ps1` script with PowerShell (alternatively open the `Source/NETworkManager.sln` in Visual Studio)
59+
__Build__
60+
1. Clone or download the repository: `git clone https://github.com/BornToBeRoot/NETworkManager`
61+
2. Run the `.\build.ps1` script with PowerShell to compile the solution and create a portable and a setup version (or open the file `Source/NETworkManager.sln` in Visual Studio to debug or build the solution)
6162

6263
You can also copy & paste this command in your PowerShell console :smile:
6364
```PowerShell

Source/GlobalAssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
[assembly: AssemblyTrademark("")]
77
[assembly: AssemblyCulture("")]
88

9-
[assembly: AssemblyVersion("2021.6.26.0")]
10-
[assembly: AssemblyFileVersion("2021.6.26.0")]
9+
[assembly: AssemblyVersion("2021.9.5.0")]
10+
[assembly: AssemblyFileVersion("2021.9.5.0")]

build.ps1

+29-6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ $SetupContent = Get-Content -Path $InnoSetupFile -Encoding utf8
3131
$SetupContent = $SetupContent -replace $PatternSetupVersion,"#define MyAppVersion ""$($VersionString)"""
3232
$SetupContent | Set-Content -Path $InnoSetupFile -Encoding utf8
3333

34+
### Warnings ###
35+
# CS4014 - Call is not awaited
36+
# NU1701 - Target framework is .NET Framework
37+
# CS1591 - Missing XML comment
38+
3439
# Dotnet clean, restore, build and publish
3540
dotnet clean "$PSScriptRoot\Source\NETworkManager.sln"
3641
dotnet restore "$PSScriptRoot\Source\NETworkManager.sln"
@@ -58,13 +63,31 @@ Compress-Archive -Path "$BuildPath\NETworkManager" -DestinationPath "$BuildPath\
5863
Remove-Item -Path "$BuildPath\NETworkManager\IsPortable.settings"
5964

6065
# Installer Build
61-
$InnoSetupCompiler = "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe"
66+
$InnoSetupPath = "${env:ProgramFiles(x86)}\Inno Setup 6"
6267

63-
if (Test-Path -Path $InnoSetupCompiler) {
64-
Start-Process -FilePath $InnoSetupCompiler -ArgumentList """$PSScriptRoot\InnoSetup.iss""" -NoNewWindow -Wait
68+
$InnoSetupLanguageMissing = $false
69+
70+
if(-not(Test-Path -Path "$InnoSetupPath\Languages\ChineseSimplified.isl"))
71+
{
72+
Write-Host "ChineseSimplified.isl not found in InnoSetup language folder.`nDownload URL: https://github.com/jrsoftware/issrc/blob/main/Files/Languages/Unofficial/ChineseSimplified.isl" -ForegroundColor Yellow
73+
$InnoSetupLanguageMissing = $true
74+
}
75+
76+
if(-not(Test-Path -Path "$InnoSetupPath\Languages\ChineseTraditional.isl"))
77+
{
78+
Write-Host "ChineseTraditional.isl not found in InnoSetup language folder.`nDownload URL: https://github.com/jrsoftware/issrc/blob/main/Files/Languages/Unofficial/ChineseTraditional.isl" -ForegroundColor Yellow
79+
$InnoSetupLanguageMissing = $true
6580
}
66-
else {
67-
Write-Host "InnoSetup not installed or not found. Skip installer build..." -ForegroundColor Yellow
81+
82+
$InnoSetupCompiler = "$InnoSetupPath\ISCC.exe"
83+
84+
if(-not(Test-Path -Path $InnoSetupCompiler) -or $InnoSetupLanguageMissing)
85+
{
86+
Write-Host "InnoSetup is not installed correctly. Skip installer build..." -ForegroundColor Cyan
87+
}
88+
else
89+
{
90+
Start-Process -FilePath $InnoSetupCompiler -ArgumentList """$PSScriptRoot\InnoSetup.iss""" -NoNewWindow -Wait
6891
}
6992

7093
# SHA256 file hash
@@ -73,4 +96,4 @@ foreach($hash in Get-ChildItem -Path $BuildPath | Where-Object {$_.Name.EndsWith
7396
"$($hash.Algorithm) | $($hash.Hash) | $([System.IO.Path]::GetFileName($hash.Path))" | Out-File -FilePath "$BuildPath\NETworkManager_$($Version)_Hash.txt" -Encoding utf8 -Append
7497
}
7598

76-
Write-Host "Build finished! All files are here: $BuildPath" -ForegroundColor Green
99+
Write-Host "Build finished! All files are here: $BuildPath" -ForegroundColor Green

docs/04_Changelog.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ Date: **xx.0x.2021**
1818
1919
## What's new?
2020
- Czech added [#1221](https://github.com/BornToBeRoot/NETworkManager/pull/1221){:target="_blank"}
21+
- Chinese added to InnoSetup [#1224](https://github.com/BornToBeRoot/NETworkManager/pull/1224){:target="_blank"}
2122
2223
## Improvements
2324
- Remote Desktop - Connection dialog now allows `hostname:port` [#1214](https://github.com/BornToBeRoot/NETworkManager/issues/1214){:target="_blank"}
2425
2526
## Bugfixes
26-
- Remote Desktop - Settings when connecting without profile were ignored [#1214](https://github.com/BornToBeRoot/NETworkManager/issues/1214){:target="_blank"}
27+
- Remote Desktop - Settings when connecting without profile are now applied [#1214](https://github.com/BornToBeRoot/NETworkManager/issues/1214){:target="_blank"}
2728
2829
## Other
2930
- Language files updates [#transifex](https://github.com/BornToBeRoot/NETworkManager/pulls?q=author%3Aapp%2Ftransifex-integration){:target="_blank"}

0 commit comments

Comments
 (0)