auto build: create .mo files & update binary files
This commit is contained in:
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -48,16 +48,19 @@ jobs:
|
|||||||
nuget restore
|
nuget restore
|
||||||
msbuild -restore
|
msbuild -restore
|
||||||
msbuild MpvNet.sln /m /p:Configuration=Debug
|
msbuild MpvNet.sln /m /p:Configuration=Debug
|
||||||
|
- name: Create .mo files for localization
|
||||||
|
shell: pwsh
|
||||||
|
run: Install-Package Gettext.Tools -Force; .\lang\create-mo-files.ps1
|
||||||
- name: Download libmpv # In principle, only update this binary file when significant feature changes occur in mpv/mpv.net
|
- name: Download libmpv # In principle, only update this binary file when significant feature changes occur in mpv/mpv.net
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
wget -nv -O libmpv.7z https://downloads.sourceforge.net/mpv-player-windows/mpv-dev-x86_64-v3-20231022-git-6e428c2.7z
|
wget -nv -O libmpv.7z https://downloads.sourceforge.net/mpv-player-windows/mpv-dev-x86_64-20231203-git-f551a9d.7z
|
||||||
7z x -y libmpv.7z -olibmpv
|
7z x -y libmpv.7z -olibmpv
|
||||||
cp -f libmpv/libmpv-2.dll src/MpvNet.Windows/bin/Debug/ || true
|
cp -f libmpv/libmpv-2.dll src/MpvNet.Windows/bin/Debug/ || true
|
||||||
- name: Download MediaInfo
|
- name: Download MediaInfo
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
wget -nv -O MediaInfo.7z https://mediaarea.net/download/binary/libmediainfo0/23.10/MediaInfo_DLL_23.10_Windows_x64_WithoutInstaller.7z
|
wget -nv -O MediaInfo.7z https://mediaarea.net/download/binary/libmediainfo0/23.11/MediaInfo_DLL_23.11_Windows_x64_WithoutInstaller.7z
|
||||||
7z x -y MediaInfo.7z -oMediaInfo
|
7z x -y MediaInfo.7z -oMediaInfo
|
||||||
cp -f MediaInfo/MediaInfo.dll src/MpvNet.Windows/bin/Debug/ || true
|
cp -f MediaInfo/MediaInfo.dll src/MpvNet.Windows/bin/Debug/ || true
|
||||||
- name: Download mpvnet.com file
|
- name: Download mpvnet.com file
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ function CreateFolder
|
|||||||
foreach ($it in $PoFiles)
|
foreach ($it in $PoFiles)
|
||||||
{
|
{
|
||||||
$folder = "$ExeFolder/Locale/$($it.BaseName)/LC_MESSAGES"
|
$folder = "$ExeFolder/Locale/$($it.BaseName)/LC_MESSAGES"
|
||||||
CreateFolder $folder
|
New-Item -ItemType Directory -Path $folder
|
||||||
$moPath = Resolve-Path $folder/mpvnet.mo -ErrorAction Ignore
|
$moPath = "$folder/mpvnet.mo"
|
||||||
|
New-Item -ItemType File -Path $moPath
|
||||||
msgfmt --output-file=$moPath $it.FullName
|
msgfmt --output-file=$moPath $it.FullName
|
||||||
|
|
||||||
if ($LASTEXITCODE -ne 0)
|
if ($LASTEXITCODE -ne 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user