Skip to content

Commit e52de1d

Browse files
committed
v7.1.1.1
1 parent 7c38e82 commit e52de1d

File tree

7 files changed

+235
-111
lines changed

7 files changed

+235
-111
lines changed

docs/changelog.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11

2-
# v7.1.1.1 Beta (????-??-??)
2+
# v7.1.1.1 Beta (2024-07-20)
33

44
- Korean, Russian and Turkish translation added, Japanese translation fixed. Thanks to the translation team!
55
- Action/Workflow/Auto build fix and update.
66
- New default bindings and menu items for select.lua which is a new simple mpv built-in command palette script.
77
In the context menu select.lua features can be found under `View > On Screen Menu`.
88
https://github.com/mpv-player/mpv/blob/master/player/lua/select.lua
9-
- The helper script 'Tools\update-mpv-and-libmpv.ps1' no longer uses command line arguments,
10-
it uses now the Path environment variable to find mpv and mpv.net.
11-
- Fix loading of DVD ISO files.
9+
- New PowerShell script 'Tools\release-mpv.net.ps1' used to releases mpv.net on GitHub.
10+
- Fix DVD ISO file support.
11+
- MediaInfo updated to version v24.6.
12+
- New ARM64 support.
13+
- New zhongfly libmpv x64 build.
14+
- New Andarwinux libmpv ARM64 build.
1215

1316

1417
# v7.1.1.0 (2024-02-03)

src/MpvNet.Windows/MpvNet.Windows.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<UseWindowsForms>true</UseWindowsForms>
1212
<ApplicationIcon>mpv-icon.ico</ApplicationIcon>
1313
<Product>mpv.net</Product>
14-
<FileVersion>7.1.1.0</FileVersion>
15-
<AssemblyVersion>7.1.1.0</AssemblyVersion>
16-
<InformationalVersion>7.1.1.0</InformationalVersion>
14+
<FileVersion>7.1.1.1</FileVersion>
15+
<AssemblyVersion>7.1.1.1</AssemblyVersion>
16+
<InformationalVersion>7.1.1.1</InformationalVersion>
1717
<Nullable>enable</Nullable>
1818
</PropertyGroup>
1919

src/MpvNet/App.cs

+5-11
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,13 @@ public void Init()
7878
}
7979

8080
public static string About => "Copyright (C) 2000-2024 mpv.net/mpv/mplayer\n" +
81-
$"{AppInfo.Product} {AppInfo.Version}" + GetLastWriteTime(Environment.ProcessPath!) + "\n" +
81+
$"{AppInfo.Product} v{AppInfo.Version}" + GetLastWriteTime(Environment.ProcessPath!) + "\n" +
8282
$"{Player.GetPropertyString("mpv-version")}" + GetLastWriteTime(Folder.Startup + "libmpv-2.dll") + "\n" +
83-
$"ffmpeg {Player.GetPropertyString("ffmpeg-version")}\n" + "GPL v2 License";
83+
$"ffmpeg {Player.GetPropertyString("ffmpeg-version")}\n" +
84+
$"MediaInfo v{FileVersionInfo.GetVersionInfo(Folder.Startup + "MediaInfo.dll").FileVersion}" +
85+
$"{GetLastWriteTime(Folder.Startup + "MediaInfo.dll")}" + "\n" + "GPL v2 License";
8486

85-
static string GetLastWriteTime(string path)
86-
{
87-
if (IsStoreVersion)
88-
return "";
89-
90-
return $" ({File.GetLastWriteTime(path).ToShortDateString()})";
91-
}
92-
93-
static bool IsStoreVersion => Folder.Startup.Contains("FrankSkare.mpvnet");
87+
static string GetLastWriteTime(string path) => $" ({File.GetLastWriteTime(path).ToShortDateString()})";
9488

9589
void Player_Initialized()
9690
{

src/Setup/Inno/inno-setup.iss

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ AppPublisher=Frank Skare (stax76)
1212
ArchitecturesInstallIn64BitMode=x64
1313
Compression=lzma2
1414
DefaultDirName={autopf}\{#MyAppName}
15-
OutputBaseFilename=mpv.net-v{#MyAppVersion}-setup
15+
OutputBaseFilename=mpv.net-v{#MyAppVersion}-setup-x64
1616
OutputDir=E:\Desktop
1717
DefaultGroupName={#MyAppName}
1818
SetupIconFile=..\..\MpvNet.Windows\mpv-icon.ico
@@ -25,4 +25,4 @@ Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
2525

2626
[Files]
2727
Source: "{#MyAppSourceDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
28-
Source: "{#MyAppSourceDir}\*"; DestDir: "{app}"; Excludes: "win-x64"; Flags: ignoreversion recursesubdirs createallsubdirs;
28+
Source: "{#MyAppSourceDir}\*"; DestDir: "{app}"; Excludes: "win-x64,win-arm64"; Flags: ignoreversion recursesubdirs createallsubdirs;

src/Tools/release-mpv.net.ps1

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
2+
<#
3+
4+
Script that releases mpv.net on GitHub.
5+
6+
Needs 2 positional CLI arguments:
7+
1. Directory where the mpv.net source code is located.
8+
2. Directory of the output files, for instance the desktop dir.
9+
10+
Dependencies:
11+
7zip installation found at: 'C:\Program Files\7-Zip\7z.exe'.
12+
Inno Setup compiler installation found at: 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe'.
13+
GitHub CLI https://cli.github.com
14+
15+
#>
16+
17+
# Stop when the first error occurs
18+
$ErrorActionPreference = 'Stop'
19+
20+
function DeleteDir($path) {
21+
if (Test-Path $path) {
22+
Remove-Item $path -Recurse
23+
}
24+
}
25+
26+
# Throw error if the file/dir don't exist
27+
function Test($path) {
28+
if (-not (Test-Path $path)) {
29+
throw $path
30+
}
31+
return $path
32+
}
33+
34+
# Variables
35+
$SourceDir = Test $args[0]
36+
$OutputRootDir = Test $args[1]
37+
38+
Test (Join-Path $SourceDir 'MpvNet.sln')
39+
40+
$7zFile = Test 'C:\Program Files\7-Zip\7z.exe'
41+
$InnoSetupCompiler = Test 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe'
42+
43+
$ReleaseNotes = "- [.NET Desktop Runtime 6.0](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)`n- [Changelog](https://github.com/mpvnet-player/mpv.net/blob/main/docs/changelog.md)"
44+
$Repo = 'github.com/mpvnet-player/mpv.net'
45+
46+
# Dotnet Publish
47+
$PublishDir64 = Join-Path $SourceDir 'MpvNet.Windows\bin\Debug\win-x64\publish\'
48+
$PublishDirARM64 = Join-Path $SourceDir 'MpvNet.Windows\bin\Debug\win-arm64\publish\'
49+
$ProjectFile = Test (Join-Path $SourceDir 'MpvNet.Windows\MpvNet.Windows.csproj')
50+
dotnet publish $ProjectFile --self-contained false --configuration Debug --runtime win-x64
51+
dotnet publish $ProjectFile --self-contained false --configuration Debug --runtime win-arm64
52+
$PublishedExeFile64 = Test ($PublishDir64 + 'mpvnet.exe')
53+
54+
# Create OutputName
55+
$VersionInfo = [Diagnostics.FileVersionInfo]::GetVersionInfo($PublishedExeFile64)
56+
$IsBeta = $VersionInfo.FilePrivatePart -ne 0
57+
$BetaString = if ($IsBeta) { '-beta' } else { '' }
58+
$VersionName = $VersionInfo.FileVersion
59+
$OutputName64 = 'mpv.net-v' + $VersionName + $BetaString + '-portable-x64'
60+
$OutputNameARM64 = 'mpv.net-v' + $VersionName + $BetaString + '-portable-ARM64'
61+
62+
# Create OutputFolder
63+
$OutputDir64 = Join-Path $OutputRootDir ($OutputName64 + '\')
64+
$OutputDirARM64 = Join-Path $OutputRootDir ($OutputNameARM64 + '\')
65+
DeleteDir $OutputDir64
66+
DeleteDir $OutputDirARM64
67+
mkdir $OutputDir64
68+
mkdir $OutputDirARM64
69+
70+
# Copy Files
71+
Copy-Item ($PublishDir64 + '*') $OutputDir64
72+
Copy-Item ($PublishDirARM64 + '*') $OutputDirARM64
73+
$BinDirX64 = Test (Join-Path $SourceDir 'MpvNet.Windows\bin\Debug\')
74+
$BinDirARM64 = Test (Join-Path $SourceDir 'MpvNet.Windows\bin\Debug\win-arm64\')
75+
$ExtraFiles = 'mpvnet.com', 'libmpv-2.dll', 'MediaInfo.dll'
76+
$ExtraFiles | ForEach-Object { Copy-Item ($BinDirX64 + $_) ($OutputDir64 + $_) }
77+
$ExtraFiles | ForEach-Object { Copy-Item ($BinDirARM64 + $_) ($OutputDirARM64 + $_) }
78+
$LocaleDir = Test (Join-Path $SourceDir 'MpvNet.Windows\bin\Debug\Locale\')
79+
Copy-Item $LocaleDir ($OutputDir64 + 'Locale') -Recurse
80+
Copy-Item $LocaleDir ($OutputDirARM64 + 'Locale') -Recurse
81+
82+
# Pack
83+
$ZipOutputFile64 = Join-Path $OutputRootDir ($OutputName64 + '.zip')
84+
$ZipOutputFileARM64 = Join-Path $OutputRootDir ($OutputNameARM64 + '.zip')
85+
& $7zFile a -tzip -mx9 $ZipOutputFile64 -r ($OutputDir64 + '*')
86+
if ($LastExitCode) { throw $LastExitCode }
87+
& $7zFile a -tzip -mx9 $ZipOutputFileARM64 -r ($OutputDirARM64 + '*')
88+
if ($LastExitCode) { throw $LastExitCode }
89+
Test $ZipOutputFile64
90+
Test $ZipOutputFileARM64
91+
92+
# Inno Setup
93+
''; ''
94+
$InnoSetupScript = Test (Join-Path $SourceDir 'Setup\Inno\inno-setup.iss')
95+
& $InnoSetupCompiler $InnoSetupScript
96+
if ($LastExitCode) { throw $LastExitCode }
97+
$SetupFile = Test (Join-Path $OutputRootDir "mpv.net-v$VersionName-setup-x64.exe")
98+
99+
if ($IsBeta) {
100+
$NewSetupFile = Join-Path $OutputRootDir "mpv.net-v$VersionName-beta-setup-x64.exe"
101+
Move-Item $SetupFile $NewSetupFile
102+
$SetupFile = $NewSetupFile
103+
}
104+
105+
# Release
106+
$Title = 'v' + $VersionName + $BetaString
107+
108+
if ($BetaString) {
109+
gh release create $Title -t $Title -n $ReleaseNotes --repo $Repo --prerelease $ZipOutputFile64 $ZipOutputFileARM64 $SetupFile
110+
} else {
111+
gh release create $Title -t $Title -n $ReleaseNotes --repo $Repo $ZipOutputFile64 $ZipOutputFileARM64 $SetupFile
112+
}
113+
114+
if ($LastExitCode) { throw $LastExitCode }

src/Tools/update-mpv-and-libmpv.ps1

-91
This file was deleted.

src/Tools/update-mpv.ps1

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
2+
<#
3+
4+
Updates mpv (x64) and libmpv (x64 , ARM64).
5+
6+
Files are downloaded from:
7+
x64: github.com/zhongfly/mpv-winbuild
8+
ARM64: github.com/Andarwinux/mpv-winbuild
9+
10+
Requires 7zip being installed at 'C:\Program Files\7-Zip\7z.exe'.
11+
12+
Needs 3 positional CLI arguments:
13+
1. Directory where mpv x64 is located. To skip pass '-'.
14+
2. Directory where libmpv x64 is located. To skip pass '-'.
15+
3. Directory where libmpv ARM64 is located. To skip pass '-'.
16+
#>
17+
18+
$7ZipPath = 'C:\Program Files\7-Zip\7z.exe'
19+
20+
$MpvDirX64 = $args[0]
21+
$LibmpvDirX64 = $args[1]
22+
$LibmpvDirARM64 = $args[2]
23+
24+
# Stop when the first error occurs
25+
$ErrorActionPreference = 'Stop'
26+
27+
# Throw exception if file or folder does not exist
28+
function Test($path) {
29+
if (-not (Test-Path $path)) {
30+
throw $path
31+
}
32+
return $path
33+
}
34+
35+
# Download file to temp dir and return file path
36+
function Download($apiURL, $pattern) {
37+
$json = Invoke-WebRequest $apiURL -MaximumRedirection 0 -ErrorAction Ignore -UseBasicParsing | ConvertFrom-Json
38+
$filename = ($json.assets | Where-Object { $_.name -Match $pattern }).name
39+
$path = Join-Path $env:TEMP $filename
40+
$link = ($json.assets | Where-Object { $_.name -Match $pattern }).browser_download_url
41+
Invoke-WebRequest -Uri $link -UserAgent "mpv-win-updater" -OutFile $path
42+
return Test $path
43+
}
44+
45+
# Unpack archive
46+
function Unpack($archieveFile, $outputRootDir) {
47+
$outputDir = Join-Path $outputRootDir $archieveFile.BaseName
48+
if (Test-Path $outputDir) { Remove-Item $outputDir -Recurse }
49+
$process = Start-Process (Test $7ZipPath) @('x', $archieveFile.FullName, "-o$outputDir") -NoNewWindow -Wait
50+
if ($process.ExitCode) { throw $process.ExitCode }
51+
return Test $outputDir
52+
}
53+
54+
# Update mpv x64
55+
56+
if (Test-Path (Join-Path $MpvDirX64 'mpv.exe')) {
57+
$apiURL = "https://api.github.com/repos/zhongfly/mpv-winbuild/releases/latest"
58+
$archiveFile = Get-Item (Download $apiURL "mpv-x86_64-[0-9]{8}")
59+
$archiveDir = Unpack $archiveFile $env:TEMP
60+
Remove-Item "$MpvDirX64\*" -Force -Recurse
61+
Copy-Item "$archiveDir\*" $MpvDirX64 -Force -Recurse
62+
Remove-Item $archiveFile.FullName
63+
Remove-Item $archiveDir -Recurse
64+
} else {
65+
"mpv x64 location not found:`n$MpvDirX64"
66+
}
67+
68+
# Update libmpv x64
69+
70+
if (Test-Path (Join-Path $LibmpvDirX64 'libmpv-2.dll')) {
71+
$apiURL = "https://api.github.com/repos/zhongfly/mpv-winbuild/releases/latest"
72+
$archiveFile = Get-Item (Download $apiURL "mpv-dev-x86_64-[0-9]{8}")
73+
$archiveDir = Unpack $archiveFile $env:TEMP
74+
Copy-Item $archiveDir\libmpv-2.dll $LibmpvDirX64 -Force
75+
Remove-Item $archiveFile.FullName
76+
Remove-Item $archiveDir -Recurse
77+
} else {
78+
"libmpv x64 location not found:`n$LibmpvDirX64"
79+
}
80+
81+
# Update libmpv ARM64
82+
83+
if (Test-Path (Join-Path $LibmpvDirARM64 'libmpv-2.dll')) {
84+
$apiURL = "https://api.github.com/repos/Andarwinux/mpv-winbuild/releases/latest"
85+
$archiveFile = Get-Item (Download $apiURL "mpv-dev-aarch64-[0-9]{8}")
86+
$archiveDir = Unpack $archiveFile $env:TEMP
87+
Copy-Item $archiveDir\libmpv-2.dll $LibmpvDirARM64 -Force
88+
Remove-Item $archiveFile.FullName
89+
Remove-Item $archiveDir -Recurse
90+
} else {
91+
"libmpv ARM64 location not found:`n$LibmpvDirARM64"
92+
}
93+
94+
if (Test-Path (Join-Path $MpvDirX64 'mpv.exe')) {
95+
Get-Item (Join-Path $MpvDirX64 'mpv.exe')
96+
}
97+
98+
if (Test-Path (Join-Path $LibmpvDirX64 'libmpv-2.dll')) {
99+
Get-Item (Join-Path $LibmpvDirX64 'libmpv-2.dll')
100+
}
101+
102+
if (Test-Path (Join-Path $LibmpvDirARM64 'libmpv-2.dll')) {
103+
Get-Item (Join-Path $LibmpvDirARM64 'libmpv-2.dll')
104+
}

0 commit comments

Comments
 (0)