v7.0.0.4 Beta

This commit is contained in:
stax76
2023-12-19 09:37:46 +01:00
parent ed48f5c559
commit a3b9c653fa
5 changed files with 51 additions and 23 deletions

View File

@@ -1,6 +1,9 @@
# v7.0.0.4 Beta (2023-??-??)
# v7.0.0.4 Beta (2023-12-19)
- When mpv.net is started for the first time from a new startup location,
it asks if file associations should be registered.
- Setup supports installing per user in non admin mode.
- Command line parser supports list options with `-add` suffix.
- Fix window sometimes shown with wrong size.
- Limited support for the mpv option `geometry`, it supports location in percent,
@@ -31,7 +34,8 @@
- Conf editor support added for the mpv options:
`reset-on-next-file`, `input-ipc-server`, `background`, `title`
- Conf editor crash fixed.
- When mpv.net is started for the first time from a new startup location, it asks if mpv.net should be added to the Path environment variable.
- When mpv.net is started for the first time from a new startup location,
it asks if mpv.net should be added to the Path environment variable.
# v7.0.0.2 Beta (2023-12-13)

View File

@@ -1,36 +1,58 @@

using System.Windows;
using MpvNet.Windows.WPF;
namespace MpvNet.Windows.Help;
public class WinMpvHelp
{
public static void AddToPath()
public static void Setup()
{
string path = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.User)!;
if (path.ToLower().Contains(Folder.Startup.TrimEnd(Path.DirectorySeparatorChar).ToLower()))
return;
string dir = RegistryHelp.GetString("PathEnvVarCheck");
string dir = RegistryHelp.GetString("PathEnvVarCheck"); // backward compatibility
if (dir == Folder.Startup)
return;
var result = Msg.ShowQuestion("Would you like to add mpv.net to the Path environment variable?",
MessageBoxButton.YesNo);
dir = RegistryHelp.GetString("Setup");
if (result == MessageBoxResult.Yes)
if (dir == Folder.Startup)
return;
string path = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.User)!;
if (!path.ToLower().Contains(Folder.Startup.TrimEnd(Path.DirectorySeparatorChar).ToLower()))
{
Environment.SetEnvironmentVariable("Path",
Folder.Startup.TrimEnd(Path.DirectorySeparatorChar) + ";" + path,
EnvironmentVariableTarget.User);
var result = Msg.ShowQuestion("Would you like to add mpv.net to the Path environment variable?" + BR2 +
"This will allow using mpv.net in a console/terminal.", MessageBoxButton.YesNo);
Msg.ShowInfo("mpv.net was added successfully to Path.");
if (result == MessageBoxResult.Yes)
{
Environment.SetEnvironmentVariable("Path",
Folder.Startup.TrimEnd(Path.DirectorySeparatorChar) + ";" + path,
EnvironmentVariableTarget.User);
Msg.ShowInfo("mpv.net was added successfully to Path.");
}
else
Msg.ShowInfo("If you want to add mpv.net to the Path environment variable later," + BR +
"you can do so with the context menu (Settings/Setup)");
}
RegistryHelp.SetString("PathEnvVarCheck", Folder.Startup);
var result2 = Msg.ShowQuestion("Would you like to register video file associations?", MessageBoxButton.YesNo);
if (result2 == MessageBoxResult.Yes)
{
Player.Command("script-message-to mpvnet reg-file-assoc video");
result2 = Msg.ShowQuestion("Would you like to register audio file associations?", MessageBoxButton.YesNo);
if (result2 == MessageBoxResult.Yes)
Player.Command("script-message-to mpvnet reg-file-assoc audio");
}
else
Msg.ShowInfo("If you want to register file associations later," + BR +
"you can do so with the context menu (Settings/Setup)");
RegistryHelp.SetString("Setup", Folder.Startup);
}
}

View File

@@ -11,9 +11,9 @@
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>mpv-icon.ico</ApplicationIcon>
<Product>mpv.net</Product>
<FileVersion>7.0.0.3</FileVersion>
<AssemblyVersion>7.0.0.3</AssemblyVersion>
<InformationalVersion>7.0.0.3</InformationalVersion>
<FileVersion>7.0.0.4</FileVersion>
<AssemblyVersion>7.0.0.4</AssemblyVersion>
<InformationalVersion>7.0.0.4</InformationalVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@@ -1287,7 +1287,7 @@ public partial class MainForm : Form
TaskHelp.Run(() => {
System.Windows.Application.Current.Dispatcher.BeginInvoke(() => {
WinMpvHelp.AddToPath();
WinMpvHelp.Setup();
}, DispatcherPriority.Background);
});
}

View File

@@ -11,12 +11,14 @@ AppVersion={#MyAppVersion}
AppPublisher=Frank Skare (stax76)
ArchitecturesInstallIn64BitMode=x64
Compression=lzma2
DefaultDirName={commonpf}\{#MyAppName}
DefaultDirName={autopf}\{#MyAppName}
OutputBaseFilename=mpv.net-v{#MyAppVersion}-setup
OutputDir=E:\Desktop
DefaultGroupName={#MyAppName}
SetupIconFile=..\..\MpvNet.Windows\mpv-icon.ico
UninstallDisplayIcon={app}\{#MyAppExeName}
PrivilegesRequired=admin
PrivilegesRequiredOverridesAllowed=dialog
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"