Try fixing auto/action/workflow build

This commit is contained in:
stax76
2024-07-15 06:39:02 +02:00
parent ae80076f36
commit b218619b2b

View File

@@ -4,21 +4,6 @@ $ErrorActionPreference = 'Stop'
$PoFiles = Get-ChildItem $PSScriptRoot/po $PoFiles = Get-ChildItem $PSScriptRoot/po
$ExeFolder = "$PSScriptRoot/../src/MpvNet.Windows/bin/Debug" $ExeFolder = "$PSScriptRoot/../src/MpvNet.Windows/bin/Debug"
function CreateFolder
{
param($path)
if (-not (Test-Path $path))
{
mkdir $path
}
if (-not (Test-Path $path))
{
throw
}
}
foreach ($it in $PoFiles) foreach ($it in $PoFiles)
{ {
$folder = "$ExeFolder/Locale/$($it.BaseName)/LC_MESSAGES" $folder = "$ExeFolder/Locale/$($it.BaseName)/LC_MESSAGES"
@@ -29,6 +14,12 @@ foreach ($it in $PoFiles)
} }
$moPath = "$folder/mpvnet.mo" $moPath = "$folder/mpvnet.mo"
if (-not (Test-Path $moPath))
{
New-Item -ItemType File -Path $moPath | Out-Null
}
msgfmt --output-file=$moPath $it.FullName msgfmt --output-file=$moPath $it.FullName
if ($LastExitCode) { throw $LastExitCode } if ($LastExitCode) { throw $LastExitCode }
$moPath $moPath