diff --git a/docs/Changelog.md b/docs/Changelog.md
index 70a2cc1..c5b6e1c 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -2,6 +2,10 @@
not yet released
- Various conf editor improvements. (hooke007)
+- Custom conf folder location feature removed
+ (a directory sym link can be used instead).
+- Inno Setup replaced with MS Store MSIX setup,
+ winget and chocolatey support will follow shortly.
5.5.0.4 Beta (2021-11-05)
diff --git a/docs/Manual.md b/docs/Manual.md
index 0a4fed4..5251595 100644
--- a/docs/Manual.md
+++ b/docs/Manual.md
@@ -116,25 +116,11 @@ Settings
mpv.net searches the config folder at:
1. startup\portable_config
-2. %APPDATA%\mpv.net
+2. %APPDATA%\mpv.net (`C:\Users\%USERNAME%\AppData\Roaming\mpv.net`)
-In order to use a custom directory create following file:
-
-startup\settings-directory.txt
-
-Put your custom directory in that file.
-
-The custom directory path can be relative to the startup directory path.
-
-This custom directory is only used if the portable_config and %APPDATA% directory does not exist.
-
-mpv specific settings are stored in the file mpv.conf, if no mpv.conf file exists
-mpv.net generates it with the following defaults:
-
-[mpv.conf defaults](../../../tree/master/src/Resources/mpv.conf.txt)
-
-mpv.net specific options are stored in the file mpvnet.conf,
-these options are documented [here](#mpvnet-specific-options).
+mpv options are stored in the file mpv.conf,
+mpv.net options are stored in the file mpvnet.conf,
+mpv.net options are documented [here](#mpvnet-specific-options).
Input and context menu
diff --git a/src/Misc/App.cs b/src/Misc/App.cs
index 90b7afc..649ee86 100644
--- a/src/Misc/App.cs
+++ b/src/Misc/App.cs
@@ -245,5 +245,14 @@ namespace mpvnet
return false;
}
}
+
+ public static void CopyMpvnetCom()
+ {
+ string dir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData).AddSep() +
+ "Microsoft\\WindowsApps\\";
+
+ if (File.Exists(dir + "mpvnet.exe") && !File.Exists(dir + "mpvnet.com"))
+ File.Copy(Folder.Startup + "mpvnet.com", dir + "mpvnet.com");
+ }
}
}
diff --git a/src/Misc/Commands.cs b/src/Misc/Commands.cs
index 98de9c7..29e528e 100644
--- a/src/Misc/Commands.cs
+++ b/src/Misc/Commands.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
@@ -9,6 +10,8 @@ using System.Windows;
using System.Windows.Forms;
using System.Windows.Interop;
+using WinForms = System.Windows.Forms;
+
using static mpvnet.Global;
namespace mpvnet
@@ -30,6 +33,7 @@ namespace mpvnet
case "open-url": OpenURL(); break;
case "playlist-first": PlaylistFirst(); break;
case "playlist-last": PlaylistLast(); break;
+ case "reg-file-assoc": RegisterFileAssociations(args[0]); break;
case "scale-window": ScaleWindow(float.Parse(args[0], CultureInfo.InvariantCulture)); break;
case "shell-execute": ProcessHelp.ShellExecute(args[0]); break;
case "show-about": ShowDialog(typeof(AboutWindow)); break;
@@ -49,7 +53,6 @@ namespace mpvnet
case "show-properties": ShowProperties(); break;
case "show-protocols": ShowTextWithEditor("protocol-list", mpvHelp.GetProtocols()); break;
case "show-recent": ShowRecent(); break;
- case "show-setup-dialog": ShowDialog(typeof(SetupWindow)); break;
case "show-text": ShowText(args[0], Convert.ToInt32(args[1]), Convert.ToInt32(args[2])); break;
case "update-check": UpdateCheck.CheckOnline(true); break;
case "window-scale": WindowScale(float.Parse(args[0], CultureInfo.InvariantCulture)); break;
@@ -467,5 +470,38 @@ namespace mpvnet
CommandPalette.Instance.SetItems(items);
MainForm.Instance.ShowCommandPalette();
}
+
+ public static void RegisterFileAssociations(string perceivedType)
+ {
+ string[] extensions = { };
+
+ switch (perceivedType)
+ {
+ case "video": extensions = CorePlayer.VideoTypes; break;
+ case "audio": extensions = CorePlayer.AudioTypes; break;
+ case "image": extensions = CorePlayer.ImageTypes; break;
+ }
+
+ try
+ {
+ using (Process proc = new Process())
+ {
+ proc.StartInfo.FileName = WinForms.Application.ExecutablePath;
+ proc.StartInfo.Arguments = "--register-file-associations " +
+ perceivedType + " " + string.Join(" ", extensions);
+ proc.StartInfo.Verb = "runas";
+ proc.StartInfo.UseShellExecute = true;
+ proc.Start();
+ proc.WaitForExit();
+
+ if (proc.ExitCode == 0)
+ Msg.ShowInfo("File associations were successfully " +
+ (perceivedType == "unreg" ? "removed" : "created") +
+ ".\n\nFile Explorer icons will refresh after process restart.");
+ else
+ Msg.ShowError("Error creating file associations.");
+ }
+ } catch { }
+ }
}
}
diff --git a/src/Misc/CorePlayer.cs b/src/Misc/CorePlayer.cs
index d74b60d..18eed94 100644
--- a/src/Misc/CorePlayer.cs
+++ b/src/Misc/CorePlayer.cs
@@ -93,6 +93,7 @@ namespace mpvnet
public string ConfPath { get => ConfigFolder + "mpv.conf"; }
public string GPUAPI { get; set; } = "auto";
+ public string VO { get; set; } = "gpu";
public string InputConfPath { get => ConfigFolder + "input.conf"; }
public string VID { get; set; } = "";
@@ -219,6 +220,7 @@ namespace mpvnet
case "taskbar-progress": TaskbarProgress = value == "yes"; break;
case "screen": Screen = Convert.ToInt32(value); break;
case "gpu-api": GPUAPI = value; break;
+ case "vo": VO = value; break;
}
if (AutofitLarger > 1)
@@ -234,24 +236,8 @@ namespace mpvnet
_ConfigFolder = Folder.Startup + "portable_config";
if (!Directory.Exists(_ConfigFolder))
- {
_ConfigFolder = Folder.AppData + "mpv.net";
- if (!Directory.Exists(_ConfigFolder))
- {
- _ConfigFolder = Folder.CustomSettings;
-
- if (!Directory.Exists(_ConfigFolder))
- _ConfigFolder = Folder.AppData + "mpv.net";
- }
- }
-
- if (Folder.Startup.IsIdenticalFolder(_ConfigFolder))
- {
- Msg.ShowError("Startup folder and config folder cannot be identical, using portable_config instead.");
- _ConfigFolder = Folder.Startup + "portable_config";
- }
-
if (!Directory.Exists(_ConfigFolder))
Directory.CreateDirectory(_ConfigFolder);
diff --git a/src/Misc/ExtensionMethods.cs b/src/Misc/ExtensionMethods.cs
index 94024bc..023734b 100644
--- a/src/Misc/ExtensionMethods.cs
+++ b/src/Misc/ExtensionMethods.cs
@@ -117,12 +117,4 @@ public static class PathStringExtension
return instance;
}
-
- public static bool IsIdenticalFolder(this string instance, string testFolder)
- {
- if (string.IsNullOrEmpty(instance) || string.IsNullOrEmpty(testFolder))
- return false;
-
- return instance.ToLowerInvariant().AddSep() == testFolder.ToLowerInvariant().AddSep();
- }
}
diff --git a/src/Misc/MainForm.cs b/src/Misc/MainForm.cs
index 879434b..70a0d62 100644
--- a/src/Misc/MainForm.cs
+++ b/src/Misc/MainForm.cs
@@ -74,7 +74,7 @@ namespace mpvnet
Core.ObservePropertyDouble("window-scale", WindowScale);
- if (Core.GPUAPI != "vulkan")
+ if (!IsVulkanOrGpuNext)
Core.ProcessCommandLine(false);
AppDomain.CurrentDomain.UnhandledException += (sender, e) => App.ShowException(e.ExceptionObject);
@@ -196,6 +196,8 @@ namespace mpvnet
bool IsCommandPaletteVissible() => CommandPaletteHost != null && CommandPaletteHost.Visible;
+ bool IsVulkanOrGpuNext => Core.GPUAPI == "vulkan" || Core.VO == "gpu-next";
+
bool KeepSize() => App.StartSize == "session" || App.StartSize == "always";
bool IsMouseInOSC()
@@ -1033,7 +1035,7 @@ namespace mpvnet
if (WindowState == FormWindowState.Maximized)
Core.SetPropertyBool("window-maximized", true);
- if (Core.GPUAPI == "vulkan")
+ if (IsVulkanOrGpuNext)
Core.ProcessCommandLine(false);
WPF.Init();
@@ -1047,10 +1049,11 @@ namespace mpvnet
BuildMenu();
System.Windows.Application.Current.ShutdownMode = System.Windows.ShutdownMode.OnExplicitShutdown;
Cursor.Position = new Point(Cursor.Position.X + 1, Cursor.Position.Y);
- UpdateCheck.DailyCheck();
Core.LoadScripts();
GlobalHotkey.RegisterGlobalHotkeys(Handle);
App.RunTask(() => App.Extension = new Extension());
+ UpdateCheck.DailyCheck();
+ App.RunTask(() => App.CopyMpvnetCom());
CSharpScriptHost.ExecuteScriptsInFolder(Core.ConfigFolder + "scripts-cs");
WasShown = true;
}
diff --git a/src/Misc/Misc.cs b/src/Misc/Misc.cs
index 17f796f..effe058 100644
--- a/src/Misc/Misc.cs
+++ b/src/Misc/Misc.cs
@@ -75,38 +75,47 @@ namespace mpvnet
static string ExePath = Application.ExecutablePath;
static string ExeFilename = Path.GetFileName(Application.ExecutablePath);
static string ExeFilenameNoExt = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
- static string[] Types;
- public static void Register(string[] types)
+ public static void Register(string perceivedType, string[] extensions)
{
- Types = types;
-
- RegistryHelp.SetValue(@"HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\" + ExeFilename, null, ExePath);
- RegistryHelp.SetValue(@"HKCR\Applications\" + ExeFilename, "FriendlyAppName", "mpv.net media player");
- RegistryHelp.SetValue($@"HKCR\Applications\{ExeFilename}\shell\open\command", null, $"\"{ExePath}\" \"%1\"");
- RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities", "ApplicationDescription", "mpv.net media player");
- RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities", "ApplicationName", "mpv.net");
- RegistryHelp.SetValue(@"HKCR\SystemFileAssociations\video\OpenWithList\" + ExeFilename, null, "");
- RegistryHelp.SetValue(@"HKCR\SystemFileAssociations\audio\OpenWithList\" + ExeFilename, null, "");
- RegistryHelp.SetValue(@"HKLM\SOFTWARE\RegisteredApplications", "mpv.net", @"SOFTWARE\Clients\Media\mpv.net\Capabilities");
-
- foreach (string ext in Types)
+ if (perceivedType != "unreg")
{
- RegistryHelp.SetValue($@"HKCR\Applications\{ExeFilename}\SupportedTypes", "." + ext, "");
- RegistryHelp.SetValue($@"HKCR\" + "." + ext, null, ExeFilenameNoExt + "." + ext);
- RegistryHelp.SetValue($@"HKCR\" + "." + ext + @"\OpenWithProgIDs", ExeFilenameNoExt + "." + ext, "");
+ RegistryHelp.SetValue(@"HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\" + ExeFilename, null, ExePath);
+ RegistryHelp.SetValue(@"HKCR\Applications\" + ExeFilename, "FriendlyAppName", "mpv.net media player");
+ RegistryHelp.SetValue($@"HKCR\Applications\{ExeFilename}\shell\open\command", null, $"\"{ExePath}\" \"%1\"");
+ RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities", "ApplicationDescription", "mpv.net media player");
+ RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities", "ApplicationName", "mpv.net");
+ RegistryHelp.SetValue(@"HKCR\SystemFileAssociations\video\OpenWithList\" + ExeFilename, null, "");
+ RegistryHelp.SetValue(@"HKCR\SystemFileAssociations\audio\OpenWithList\" + ExeFilename, null, "");
+ RegistryHelp.SetValue(@"HKLM\SOFTWARE\RegisteredApplications", "mpv.net", @"SOFTWARE\Clients\Media\mpv.net\Capabilities");
- if (CorePlayer.VideoTypes.Contains(ext))
- RegistryHelp.SetValue(@"HKCR\" + "." + ext, "PerceivedType", "video");
+ foreach (string ext in extensions)
+ {
+ RegistryHelp.SetValue($@"HKCR\Applications\{ExeFilename}\SupportedTypes", "." + ext, "");
+ RegistryHelp.SetValue(@"HKCR\" + "." + ext, null, ExeFilenameNoExt + "." + ext);
+ RegistryHelp.SetValue(@"HKCR\" + "." + ext + @"\OpenWithProgIDs", ExeFilenameNoExt + "." + ext, "");
+ RegistryHelp.SetValue(@"HKCR\" + "." + ext, "PerceivedType", perceivedType);
+ RegistryHelp.SetValue(@"HKCR\" + ExeFilenameNoExt + "." + ext + @"\shell\open\command", null, $"\"{ExePath}\" \"%1\"");
+ RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities\FileAssociations", "." + ext, ExeFilenameNoExt + "." + ext);
+ }
+ }
+ else
+ {
+ RegistryHelp.RemoveKey(@"HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\" + ExeFilename);
+ RegistryHelp.RemoveKey(@"HKCR\Applications\" + ExeFilename);
+ RegistryHelp.RemoveKey(@"HKLM\SOFTWARE\Clients\Media\mpv.net");
+ RegistryHelp.RemoveKey(@"HKCR\SystemFileAssociations\video\OpenWithList\" + ExeFilename);
+ RegistryHelp.RemoveKey(@"HKCR\SystemFileAssociations\audio\OpenWithList\" + ExeFilename);
+ RegistryHelp.RemoveValue(@"HKLM\SOFTWARE\RegisteredApplications", "mpv.net");
- if (CorePlayer.AudioTypes.Contains(ext))
- RegistryHelp.SetValue(@"HKCR\" + "." + ext, "PerceivedType", "audio");
+ foreach (string id in Registry.ClassesRoot.GetSubKeyNames())
+ {
+ if (id.StartsWith(ExeFilenameNoExt + "."))
+ Registry.ClassesRoot.DeleteSubKeyTree(id);
- if (CorePlayer.ImageTypes.Contains(ext))
- RegistryHelp.SetValue(@"HKCR\" + "." + ext, "PerceivedType", "image");
-
- RegistryHelp.SetValue($@"HKCR\" + ExeFilenameNoExt + "." + ext + @"\shell\open\command", null, $"\"{ExePath}\" \"%1\"");
- RegistryHelp.SetValue(@"HKLM\SOFTWARE\Clients\Media\mpv.net\Capabilities\FileAssociations", "." + ext, ExeFilenameNoExt + "." + ext);
+ RegistryHelp.RemoveValue($@"HKCR\Software\Classes\{id}\OpenWithProgIDs", ExeFilenameNoExt + id);
+ RegistryHelp.RemoveValue($@"HKLM\Software\Classes\{id}\OpenWithProgIDs", ExeFilenameNoExt + id);
+ }
}
}
}
@@ -208,25 +217,6 @@ namespace mpvnet
{
public static string Startup { get; } = Application.StartupPath.AddSep();
public static string AppData { get; } = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).AddSep();
-
- public static string CustomSettings {
- get {
- string linkFile = Startup + "settings-directory.txt";
-
- if (File.Exists(linkFile))
- {
- string linkTarget = File.ReadAllText(linkFile).Trim();
-
- if (linkTarget.StartsWithEx("."))
- linkTarget = Startup + linkTarget;
-
- if (Directory.Exists(linkTarget))
- return linkTarget.AddSep();
- }
-
- return "";
- }
- }
}
public class CommandPaletteItem
diff --git a/src/Misc/Program.cs b/src/Misc/Program.cs
index 09e43f9..448341b 100644
--- a/src/Misc/Program.cs
+++ b/src/Misc/Program.cs
@@ -23,17 +23,9 @@ namespace mpvnet
string[] args = Environment.GetCommandLineArgs().Skip(1).ToArray();
- if (args.Length >= 2 && args[0] == "--reg-file-assoc")
+ if (args.Length > 0 && args[0] == "--register-file-associations")
{
- if (args[1] == "audio")
- FileAssociation.Register(CorePlayer.AudioTypes);
- else if (args[1] == "video")
- FileAssociation.Register(CorePlayer.VideoTypes);
- else if (args[1] == "image")
- FileAssociation.Register(CorePlayer.ImageTypes);
- else
- FileAssociation.Register(args.Skip(1).ToArray());
-
+ FileAssociation.Register(args[1], args.Skip(1).ToArray());
return;
}
diff --git a/src/Package/Images/LockScreenLogo.scale-200.png b/src/Package/Images/LockScreenLogo.scale-200.png
new file mode 100644
index 0000000..16f7037
Binary files /dev/null and b/src/Package/Images/LockScreenLogo.scale-200.png differ
diff --git a/src/Package/Images/SplashScreen.scale-200.png b/src/Package/Images/SplashScreen.scale-200.png
new file mode 100644
index 0000000..47d37e1
Binary files /dev/null and b/src/Package/Images/SplashScreen.scale-200.png differ
diff --git a/src/Package/Images/Square150x150Logo.scale-200.png b/src/Package/Images/Square150x150Logo.scale-200.png
new file mode 100644
index 0000000..6ddf941
Binary files /dev/null and b/src/Package/Images/Square150x150Logo.scale-200.png differ
diff --git a/src/Package/Images/Square44x44Logo.scale-200.png b/src/Package/Images/Square44x44Logo.scale-200.png
new file mode 100644
index 0000000..65cf8f3
Binary files /dev/null and b/src/Package/Images/Square44x44Logo.scale-200.png differ
diff --git a/src/Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png b/src/Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 0000000..4febf14
Binary files /dev/null and b/src/Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/src/Package/Images/StoreLogo.png b/src/Package/Images/StoreLogo.png
new file mode 100644
index 0000000..e5073ed
Binary files /dev/null and b/src/Package/Images/StoreLogo.png differ
diff --git a/src/Package/Images/Wide310x150Logo.scale-200.png b/src/Package/Images/Wide310x150Logo.scale-200.png
new file mode 100644
index 0000000..b9dec64
Binary files /dev/null and b/src/Package/Images/Wide310x150Logo.scale-200.png differ
diff --git a/src/Package/Images/mpvnetExtensions.targetsize-128.png b/src/Package/Images/mpvnetExtensions.targetsize-128.png
new file mode 100644
index 0000000..c4a0a75
Binary files /dev/null and b/src/Package/Images/mpvnetExtensions.targetsize-128.png differ
diff --git a/src/Package/Images/mpvnetExtensions.targetsize-16.png b/src/Package/Images/mpvnetExtensions.targetsize-16.png
new file mode 100644
index 0000000..7597ff8
Binary files /dev/null and b/src/Package/Images/mpvnetExtensions.targetsize-16.png differ
diff --git a/src/Package/Images/mpvnetExtensions.targetsize-20.png b/src/Package/Images/mpvnetExtensions.targetsize-20.png
new file mode 100644
index 0000000..ff8296e
Binary files /dev/null and b/src/Package/Images/mpvnetExtensions.targetsize-20.png differ
diff --git a/src/Package/Images/mpvnetExtensions.targetsize-24.png b/src/Package/Images/mpvnetExtensions.targetsize-24.png
new file mode 100644
index 0000000..9d67c0f
Binary files /dev/null and b/src/Package/Images/mpvnetExtensions.targetsize-24.png differ
diff --git a/src/Package/Images/mpvnetExtensions.targetsize-256.png b/src/Package/Images/mpvnetExtensions.targetsize-256.png
new file mode 100644
index 0000000..4c08c44
Binary files /dev/null and b/src/Package/Images/mpvnetExtensions.targetsize-256.png differ
diff --git a/src/Package/Images/mpvnetExtensions.targetsize-32.png b/src/Package/Images/mpvnetExtensions.targetsize-32.png
new file mode 100644
index 0000000..c8407a7
Binary files /dev/null and b/src/Package/Images/mpvnetExtensions.targetsize-32.png differ
diff --git a/src/Package/Images/mpvnetExtensions.targetsize-40.png b/src/Package/Images/mpvnetExtensions.targetsize-40.png
new file mode 100644
index 0000000..81c4010
Binary files /dev/null and b/src/Package/Images/mpvnetExtensions.targetsize-40.png differ
diff --git a/src/Package/Images/mpvnetExtensions.targetsize-48.png b/src/Package/Images/mpvnetExtensions.targetsize-48.png
new file mode 100644
index 0000000..0453e38
Binary files /dev/null and b/src/Package/Images/mpvnetExtensions.targetsize-48.png differ
diff --git a/src/Package/Images/mpvnetExtensions.targetsize-64.png b/src/Package/Images/mpvnetExtensions.targetsize-64.png
new file mode 100644
index 0000000..0aae563
Binary files /dev/null and b/src/Package/Images/mpvnetExtensions.targetsize-64.png differ
diff --git a/src/Package/Package.appxmanifest b/src/Package/Package.appxmanifest
new file mode 100644
index 0000000..41f73b1
--- /dev/null
+++ b/src/Package/Package.appxmanifest
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+ mpv.net
+ Frank Skare
+ Images\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Images\mpvnetExtensions.png
+
+ .264
+ .265
+ .asf
+ .avc
+ .avi
+ .avs
+ .dav
+ .flv
+ .h264
+ .h265
+ .hevc
+ .m2t
+ .m2ts
+ .m2v
+ .m4v
+ .mkv
+ .mov
+ .mp4
+ .mpeg
+ .mpg
+ .mpv
+ .mts
+ .ts
+ .vob
+ .vpy
+ .webm
+ .wmv
+ .y4m
+
+
+
+
+
+
+ Images\mpvnetExtensions.png
+
+ .aac
+ .ac3
+ .dts
+ .dtshd
+ .dtshr
+ .dtsma
+ .eac3
+ .flac
+ .m4a
+ .mka
+ .mp2
+ .mp3
+ .mpa
+ .mpc
+ .ogg
+ .opus
+ .thd
+ .w64
+ .wav
+
+
+
+
+
+
+ Images\mpvnetExtensions.png
+
+ .bmp
+ .gif
+ .jpg
+ .png
+ .webp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Package/mpv.net.package.wapproj b/src/Package/mpv.net.package.wapproj
new file mode 100644
index 0000000..126c71e
--- /dev/null
+++ b/src/Package/mpv.net.package.wapproj
@@ -0,0 +1,97 @@
+
+
+
+ 15.0
+
+
+
+ Debug
+ x86
+
+
+ Release
+ x86
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+ Debug
+ ARM
+
+
+ Release
+ ARM
+
+
+ Debug
+ ARM64
+
+
+ Release
+ ARM64
+
+
+ Debug
+ AnyCPU
+
+
+ Release
+ AnyCPU
+
+
+
+ $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\
+
+
+
+ 81daee3a-76ff-4494-9384-d28a651d70bb
+ 10.0.22000.0
+ 10.0.14393.0
+ en-US
+ false
+ ..\mpv.net.csproj
+
+
+
+ Designer
+
+
+
+
+ mpv.net\MediaInfo.dll
+ PreserveNewest
+
+
+ mpv.net\Microsoft.Management.Infrastructure.dll
+ PreserveNewest
+
+
+ mpv.net\mpv-1.dll
+ PreserveNewest
+
+
+ mpv.net\mpvnet.com
+ PreserveNewest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Release.ps1 b/src/Release.ps1
index 58ffbde..950c3ba 100644
--- a/src/Release.ps1
+++ b/src/Release.ps1
@@ -34,14 +34,14 @@ if ($versionInfo.FilePrivatePart -eq 0)
if ($LastExitCode) { throw $LastExitCode }
$targetDir = $tmpDir + "\mpv.net-$($versionInfo.FileVersion)-portable"
- Copy-Item $PSScriptRoot\bin $targetDir -Recurse -Exclude 'System.Management.Automation.xml', 'settings-directory.txt'
+ Copy-Item $PSScriptRoot\bin $targetDir -Recurse -Exclude 'System.Management.Automation.xml'
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
if ($LastExitCode) { throw $LastExitCode }
}
else
{
$targetDir = "$tmpDir\mpv.net-$($versionInfo.FileVersion)-portable-beta"
- Copy-Item $PSScriptRoot\bin $targetDir -Recurse -Exclude 'System.Management.Automation.xml', 'settings-directory.txt'
+ Copy-Item $PSScriptRoot\bin $targetDir -Recurse -Exclude 'System.Management.Automation.xml'
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
if ($LastExitCode) { throw $LastExitCode }
UploadBeta "$targetDir.zip"
diff --git a/src/Resources/editor_conf.txt b/src/Resources/editor_conf.txt
index 619675e..85b9eee 100644
--- a/src/Resources/editor_conf.txt
+++ b/src/Resources/editor_conf.txt
@@ -9,7 +9,7 @@ url = https://mpv.io/manual/master/#video-output-drivers-vo
option = gpu General purpose, customizable, GPU-accelerated video output driver. It supports extended scaling methods, dithering, color management, custom shaders, HDR, and more.
option = gpu-next Experimental video renderer based on libplacebo. This supports almost the same set of features as --vo=gpu.
-option = direct3d Video output driver that uses the Direct3D 9 interface
+option = direct3d Video output driver that uses the Direct3D interface.
[setting]
name = hwdec
@@ -75,16 +75,6 @@ option = display-adrop
option = display-desync
option = desync
-[setting]
-name = builtin-scalers
-file = mpv
-default = yes
-filter = Video
-help = Allow using faster built-in replacements for common scalers such as nearest, bilinear or bicubic. These have the disadvantage of not being configurable, unlike normal scaler kernels. (only affects --vo=gpu-next)
-
-option = yes
-option = no
-
[setting]
name = scale
file = mpv
diff --git a/src/Resources/input.conf.txt b/src/Resources/input.conf.txt
index ff9180a..c36eafc 100644
--- a/src/Resources/input.conf.txt
+++ b/src/Resources/input.conf.txt
@@ -161,6 +161,10 @@ _ ignore #menu: Profile
c script-message mpv.net show-conf-editor #menu: Settings > Show Config Editor
Ctrl+i script-message mpv.net show-input-editor #menu: Settings > Show Input Editor
Ctrl+f script-message mpv.net open-conf-folder #menu: Settings > Open Config Folder
+_ script-message mpv.net reg-file-assoc video #menu: Settings > Setup > Register video file associations
+_ script-message mpv.net reg-file-assoc audio #menu: Settings > Setup > Register audio file associations
+_ script-message mpv.net reg-file-assoc image #menu: Settings > Setup > Register image file associations
+_ script-message mpv.net reg-file-assoc unreg #menu: Settings > Setup > Unregister file associations
h script-message mpv.net show-history #menu: Tools > Show History
l ab-loop #menu: Tools > Set/clear A-B loop points
diff --git a/src/Setup.iss b/src/Setup.iss
deleted file mode 100644
index fd75043..0000000
--- a/src/Setup.iss
+++ /dev/null
@@ -1,31 +0,0 @@
-
-#define MyAppName "mpv.net"
-#define MyAppExeName "mpvnet.exe"
-#define MyAppSourceDir "bin"
-#define MyAppVersion GetFileVersion("bin\mpvnet.exe")
-
-[Setup]
-AppId={{9AA2B100-BEF3-44D0-B819-D8FC3C4D557D}}
-AppName={#MyAppName}
-AppVersion={#MyAppVersion}
-AppPublisher=Frank Skare (stax76)
-ArchitecturesInstallIn64BitMode=x64
-Compression=lzma2
-DefaultDirName={commonpf}\{#MyAppName}
-OutputBaseFilename=mpv.net-{#MyAppVersion}-setup
-OutputDir=D:\Work
-DefaultGroupName={#MyAppName}
-SetupIconFile=mpvnet.ico
-UninstallDisplayIcon={app}\{#MyAppExeName}
-
-[Icons]
-Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
-
-[Files]
-Source: "{#MyAppSourceDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
-Source: "{#MyAppSourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "System.Management.Automation.xml,settings-directory.txt"
-
-[UninstallRun]
-Filename: "powershell.exe"; Flags: runhidden; Parameters: "-NoProfile -ExecutionPolicy Bypass -File ""{app}\Setup\remove file associations.ps1"""
-Filename: "powershell.exe"; Flags: runhidden; Parameters: "-NoProfile -ExecutionPolicy Bypass -File ""{app}\Setup\remove start menu shortcut.ps1"""
-Filename: "powershell.exe"; Flags: runhidden; Parameters: "-NoProfile -ExecutionPolicy Bypass -File ""{app}\Setup\remove environment variable.ps1"""
diff --git a/src/WPF/SetupWindow.xaml b/src/WPF/SetupWindow.xaml
deleted file mode 100644
index 19709f3..0000000
--- a/src/WPF/SetupWindow.xaml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Start Menu Shortcut
-
-
-
-
-
-
- File Extensions
-
-
-
-
-
-
-
-
-
- Path Environment Variable
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/WPF/SetupWindow.xaml.cs b/src/WPF/SetupWindow.xaml.cs
deleted file mode 100644
index 8aac09b..0000000
--- a/src/WPF/SetupWindow.xaml.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-
-using System;
-using System.Diagnostics;
-using System.Windows.Interop;
-using System.Windows.Media.Imaging;
-using System.Windows;
-
-using WinForms = System.Windows.Forms;
-
-using static StockIcon;
-
-namespace mpvnet
-{
- public partial class SetupWindow : Window
- {
- public SetupWindow()
- {
- InitializeComponent();
- DataContext = this;
- }
-
- public Theme Theme => Theme.Current;
-
- static BitmapSource _ShieldIcon;
-
- public static BitmapSource ShieldIcon {
- get {
- if (_ShieldIcon == null)
- {
- IntPtr icon = GetIcon(SHSTOCKICONID.Shield, SHSTOCKICONFLAGS.SHGSI_ICON);
- _ShieldIcon = Imaging.CreateBitmapSourceFromHIcon(
- icon, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
- DestroyIcon(icon);
- }
- return _ShieldIcon;
- }
- }
-
- void RegFileAssoc(string[] extensions)
- {
- try
- {
- using (Process proc = new Process())
- {
- proc.StartInfo.FileName = WinForms.Application.ExecutablePath;
- proc.StartInfo.Arguments = "--reg-file-assoc " + string.Join(" ", extensions);
- proc.StartInfo.Verb = "runas";
- proc.StartInfo.UseShellExecute = true;
- proc.Start();
- proc.WaitForExit();
-
- if (proc.ExitCode == 0)
- Msg.ShowInfo("File associations successfully created.");
- else
- Msg.ShowError("Error creating file associations.");
- }
- } catch {}
- }
-
- void AddVideo_Click(object sender, RoutedEventArgs e) => RegFileAssoc(CorePlayer.VideoTypes);
- void AddAudio_Click(object sender, RoutedEventArgs e) => RegFileAssoc(CorePlayer.AudioTypes);
- void AddImage_Click(object sender, RoutedEventArgs e) => RegFileAssoc(CorePlayer.ImageTypes);
-
- void RemoveFileAssociations_Click(object sender, RoutedEventArgs e)
- {
- try
- {
- using (Process proc = new Process())
- {
- proc.StartInfo.FileName = "powershell.exe";
- proc.StartInfo.Arguments = "-NoLogo -NoExit -NoProfile -ExecutionPolicy Bypass -File \"" +
- Folder.Startup + "Setup\\remove file associations.ps1\"";
- proc.StartInfo.Verb = "runas";
- proc.StartInfo.UseShellExecute = true;
- proc.Start();
- }
- } catch { }
- }
-
- void AddToPathEnvVar_Click(object sender, RoutedEventArgs e)
- {
- ExecutePowerShellScript(Folder.Startup + "Setup\\add environment variable.ps1");
- }
-
- void RemoveFromPathEnvVar_Click(object sender, RoutedEventArgs e)
- {
- ExecutePowerShellScript(Folder.Startup + "Setup\\remove environment variable.ps1");
- }
-
- void AddStartMenuShortcut_Click(object sender, RoutedEventArgs e)
- {
- ExecutePowerShellScript(Folder.Startup + "Setup\\create start menu shortcut.ps1");
- }
-
- void RemoveStartMenuShortcut_Click(object sender, RoutedEventArgs e)
- {
- ExecutePowerShellScript(Folder.Startup + "Setup\\remove start menu shortcut.ps1");
- }
-
- void ShowEnvVarEditor_Click(object sender, RoutedEventArgs e)
- {
- ProcessHelp.Execute("rundll32.exe", "sysdm.cpl,EditEnvironmentVariables");
- }
-
- void ExecutePowerShellScript(string file)
- {
- ProcessHelp.Execute("powershell.exe",
- "-NoLogo -NoExit -NoProfile -ExecutionPolicy Bypass -File \"" + file + "\"");
- }
-
- void EditDefaultApp_Click(object sender, RoutedEventArgs e)
- {
- ProcessHelp.ShellExecute("ms-settings:defaultapps");
- }
- }
-}
diff --git a/src/mpv.net.csproj b/src/mpv.net.csproj
index 9152c94..b60751b 100644
--- a/src/mpv.net.csproj
+++ b/src/mpv.net.csproj
@@ -135,10 +135,6 @@
MSBuild:Compile
Designer
-
- MSBuild:Compile
- Designer
-
MSBuild:Compile
Designer
@@ -191,9 +187,6 @@
-
- SetupWindow.xaml
-
ConfWindow.xaml
diff --git a/src/mpv.net.sln b/src/mpv.net.sln
index 34022a5..e2e2719 100644
--- a/src/mpv.net.sln
+++ b/src/mpv.net.sln
@@ -12,20 +12,92 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
EndProjectSection
EndProject
+Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "mpv.net.package", "Package\mpv.net.package.wapproj", "{81DAEE3A-76FF-4494-9384-D28A651D70BB}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|ARM = Debug|ARM
+ Debug|ARM64 = Debug|ARM64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|ARM = Release|ARM
+ Release|ARM64 = Release|ARM64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|ARM.Build.0 = Debug|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x64.Build.0 = Debug|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x86.Build.0 = Debug|Any CPU
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|ARM.ActiveCfg = Release|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|ARM.Build.0 = Release|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|ARM64.Build.0 = Release|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x64.ActiveCfg = Release|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x64.Build.0 = Release|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x86.ActiveCfg = Release|Any CPU
+ {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x86.Build.0 = Release|Any CPU
{55C88710-539D-4402-84C8-31694841C731}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55C88710-539D-4402-84C8-31694841C731}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Debug|ARM.Build.0 = Debug|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Debug|x64.Build.0 = Debug|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Debug|x86.Build.0 = Debug|Any CPU
{55C88710-539D-4402-84C8-31694841C731}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55C88710-539D-4402-84C8-31694841C731}.Release|Any CPU.Build.0 = Release|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Release|ARM.ActiveCfg = Release|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Release|ARM.Build.0 = Release|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Release|ARM64.Build.0 = Release|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Release|x64.ActiveCfg = Release|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Release|x64.Build.0 = Release|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Release|x86.ActiveCfg = Release|Any CPU
+ {55C88710-539D-4402-84C8-31694841C731}.Release|x86.Build.0 = Release|Any CPU
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM.ActiveCfg = Debug|ARM
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM.Build.0 = Debug|ARM
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM.Deploy.0 = Debug|ARM
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM64.Build.0 = Debug|ARM64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.ActiveCfg = Debug|x64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.Build.0 = Debug|x64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.Deploy.0 = Debug|x64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x86.ActiveCfg = Debug|x86
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x86.Build.0 = Debug|x86
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x86.Deploy.0 = Debug|x86
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM.ActiveCfg = Release|ARM
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM.Build.0 = Release|ARM
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM.Deploy.0 = Release|ARM
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM64.ActiveCfg = Release|ARM64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM64.Build.0 = Release|ARM64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|ARM64.Deploy.0 = Release|ARM64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.ActiveCfg = Release|x64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.Build.0 = Release|x64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.Deploy.0 = Release|x64
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x86.ActiveCfg = Release|x86
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x86.Build.0 = Release|x86
+ {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE