diff --git a/Version.ps1 b/Version.ps1 index c4e968acb..26395f444 100644 --- a/Version.ps1 +++ b/Version.ps1 @@ -1,5 +1,5 @@ # ------------------------------------------------------------ -# PowerShell script to perform Version patching for Notepad3 +# PowerShell script to perform Version patching for Notepad3 # ToDo: # - adapt $Build number in case of local machine builds # ------------------------------------------------------------ @@ -21,7 +21,7 @@ function DebugOutput($msg) # ------------------------------------------------------------ { #~return ## disabled debug output - if ($msg -ne $null) { + if ($msg -ne $null) { Write-Host "" Write-Host "$msg" } @@ -30,20 +30,20 @@ function DebugOutput($msg) # ============================================================ -try +try { $AppName = "Notepad3" $Major = 7 $Minor = [int]$(Get-Date -format yy) $Revis = [int]$(Get-Date -format Mdd) - + $BuildPath = "Versions\build.txt" if (!(Test-Path $BuildPath)) { New-Item -Path $BuildPath -ItemType "file" -Value "101" } $Build = [int](Get-Content $BuildPath) if (!$Build) { $Build = 0 } - + $DayPath = "Versions\day.txt" if (!(Test-Path $DayPath)) { New-Item -Path $DayPath -ItemType "file" -Value "0" @@ -75,7 +75,7 @@ try $CompleteVer = "$Major.$Minor.$Revis.$Build" DebugOutput("Notepad3 version number: 'v$CompleteVer $VerPatch'") DebugOutput("Notepad3 commit ID: '$CommitID'") - + $SciVer = [string](Get-Content "scintilla\version.txt") if (!$SciVer) { $SciVer = 0 } $LxiVer = [string](Get-Content "lexilla\version.txt") @@ -91,28 +91,30 @@ try #~if ($VerPatch) { $VerPatch = " $VerPatch" } # ensure space in front of string - Copy-Item -LiteralPath "Versions\VersionEx.h.tpl" -Destination "src\VersionEx.h" -Force - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$APPNAME\$', "$AppName" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$MAJOR\$', "$Major" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$MINOR\$', "$Minor" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$MAINT\$', "$Revis" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$BUILD\$', "$Build" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$SCIVER\$', "$SciVer" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$LXIVER\$', "$LxiVer" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$PCRE2VER\$', "$PCRE2Ver" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$UCHARDETVER\$', "$UChardetVer" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$TINYEXPRVER\$', "$TinyExprVer" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$UTHASHVER\$', "$UtHashVer" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$VERPATCH\$', "$VerPatch" } | Set-Content -Path "src\VersionEx.h" - (Get-Content "src\VersionEx.h") | ForEach-Object { $_ -replace '\$COMMITID\$', "$CommitID" } | Set-Content -Path "src\VersionEx.h" - + $VersionContent = Get-Content "Versions\VersionEx.h.tpl" -Raw + $VersionContent = $VersionContent -replace '\$APPNAME\$', "$AppName" + $VersionContent = $VersionContent -replace '\$MAJOR\$', "$Major" + $VersionContent = $VersionContent -replace '\$MINOR\$', "$Minor" + $VersionContent = $VersionContent -replace '\$MAINT\$', "$Revis" + $VersionContent = $VersionContent -replace '\$BUILD\$', "$Build" + $VersionContent = $VersionContent -replace '\$SCIVER\$', "$SciVer" + $VersionContent = $VersionContent -replace '\$LXIVER\$', "$LxiVer" + $VersionContent = $VersionContent -replace '\$PCRE2VER\$', "$PCRE2Ver" + $VersionContent = $VersionContent -replace '\$UCHARDETVER\$', "$UChardetVer" + $VersionContent = $VersionContent -replace '\$TINYEXPRVER\$', "$TinyExprVer" + $VersionContent = $VersionContent -replace '\$UTHASHVER\$', "$UtHashVer" + $VersionContent = $VersionContent -replace '\$VERPATCH\$', "$VerPatch" + $VersionContent = $VersionContent -replace '\$COMMITID\$', "$CommitID" + Set-Content -Path "src\VersionEx.h" -Value $VersionContent -NoNewline + $ConfManifest = "res\Notepad3.exe.conf.manifest" - Copy-Item -LiteralPath "Versions\Notepad3.exe.manifest.tpl" -Destination $ConfManifest -Force - (Get-Content $ConfManifest) | ForEach-Object { $_ -replace '\$APPNAME\$', "$AppName" } | Set-Content -Path $ConfManifest - (Get-Content $ConfManifest) | ForEach-Object { $_ -replace '\$VERPATCH\$', "$VerPatch" } | Set-Content -Path $ConfManifest - (Get-Content $ConfManifest) | ForEach-Object { $_ -replace '\$VERSION\$', "$CompleteVer" } | Set-Content -Path $ConfManifest + $ManifestContent = Get-Content "Versions\Notepad3.exe.manifest.tpl" -Raw + $ManifestContent = $ManifestContent -replace '\$APPNAME\$', "$AppName" + $ManifestContent = $ManifestContent -replace '\$VERPATCH\$', "$VerPatch" + $ManifestContent = $ManifestContent -replace '\$VERSION\$', "$CompleteVer" + Set-Content -Path $ConfManifest -Value $ManifestContent -NoNewline } -catch +catch { if ($LastExitCode -eq 0) { $LastExitCode = 99 } $errorMessage = $_.Exception.Message diff --git a/language/common_res.rc b/language/common_res.rc index c404b6d51..93d3175d9 100644 --- a/language/common_res.rc +++ b/language/common_res.rc @@ -72,20 +72,21 @@ IDC_COPY CURSOR "Copy.cur" // ============================================================================= // Following Text is streamed to RichEdit Control supporting ANSI CP-1252 only // Unicode characters have to be encoded using '\\uN' sequences. -// Example: K�ng => K\\u252nng +// Example: K?ng => K\\u252nng // ============================================================================= STRINGTABLE BEGIN IDS_MUI_ABOUT_DEV "\ -\\cf0 \\b1 Florian 'Flo' Balmer (Notepad2)\\b0\\tab https://www.flos-freeware.ch\\par\ +\\cf0 \\b1 Florian 'Flo' Balmer (Notepad2,minipath)\\b0\\tab https://www.flos-freeware.ch\\par\ \\cf0 RaiKoHoff\\tab https://github.com/RaiKoHoff\\par\ \\cf0 \\par\ " IDS_MUI_ABOUT_CONTRIBS "\ \\cf0 Derick Payne (\\u0169 Rizonesoft)\\tab https://rizonesoft.com\\par\ +\\cf0 Pairi Daiza (MUI language support)\\tab https://github.com/hpwamr\\par\ \\cf0 XhmikosR (Notepad2-mod)\\tab https://xhmikosr.github.io/notepad2-mod\\par\ \\cf0 Kai Liu (CodeFolding)\\tab https://code.kliu.org/misc/notepad2\\par\ \\cf0 RL Vision (Bookmarks)\\tab https://www.rlvision.com/notepad2/about.php\\par\ @@ -100,7 +101,8 @@ IDS_MUI_ABOUT_CONTRIBS "\ IDS_MUI_ABOUT_LIBS "\ \\cf0 N.Hodgson (Scintilla)\\tab https://www.scintilla.org\\par\ -\\cf0 K.Kosako (Oniguruma Regex)\\tab https://github.com/kkos/oniguruma\\par\ +\\cf0 K.Kosako (Oniguruma Regex, deprecated)\\tab https://github.com/kkos/oniguruma\\par\ +\\cf0 Philip Hazel et al. (PCRE2 Regex)\\tab https://pcre2project.github.io/pcre2\\par\ \\cf0 Stefan K\\u252nng (grepWin)\\tab https://github.com/stefankueng/grepWin\\par\ \\cf0 D.Dyer (NotepadCrypt)\\tab https://www.real-me.net/ddyer/notepad/NotepadCrypt.html\\par\ \\cf0 T.D.Hanson (uthash)\\tab https://troydhanson.github.io/uthash\\par\ @@ -167,6 +169,7 @@ IDS_MUI_ABOUT_MORE "\ IDS_MUI_ABOUT_LICENSES "\ \\cf0 Scintilla\\tab https://www.scintilla.org/License.txt\\par\ \\cf0 Oniguruma Regex\\tab https://github.com/kkos/oniguruma/blob/master/COPYING\\par\ +\\cf0 PCRE2 Regex\\tab https://github.com/PCRE2Project/pcre2/blob/main/LICENCE.md\\par\ \\cf0 grepWin\\tab https://github.com/stefankueng/grepWin/blob/master/LICENSE\\par\ \\cf0 uthash\\tab https://troydhanson.github.io/uthash/license.html\\par\ \\cf0 uchardet\\tab https://www.freedesktop.org/wiki/Software/uchardet/#license\\par\