diff --git a/CSScriptAddon/CSScriptAddon.vbproj b/CSScriptAddon/CSScriptAddon.vbproj index ec49331..e903af0 100644 --- a/CSScriptAddon/CSScriptAddon.vbproj +++ b/CSScriptAddon/CSScriptAddon.vbproj @@ -47,6 +47,48 @@ On + + true + true + true + ..\mpv.net\bin\x86\Addons\CSScriptAddon\ + 42105,42106,42107,42353,42354,42355 + full + x86 + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + MinimumRecommendedRules.ruleset + + + true + ..\mpv.net\bin\x86\Addons\CSScriptAddon\ + true + 42105,42106,42107,42353,42354,42355 + pdbonly + x86 + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + MinimumRecommendedRules.ruleset + + + true + true + true + ..\mpv.net\bin\x64\Addons\CSScriptAddon\ + 42105,42106,42107,42353,42354,42355 + full + x64 + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + MinimumRecommendedRules.ruleset + + + true + ..\mpv.net\bin\x64\Addons\CSScriptAddon\ + true + 42105,42106,42107,42353,42354,42355 + pdbonly + x64 + 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + MinimumRecommendedRules.ruleset + False diff --git a/README.md b/README.md index 519259e..1c2958b 100644 --- a/README.md +++ b/README.md @@ -201,9 +201,11 @@ mpv.net bugs and requests: ### Changelog -### 3.4 (2019-??-??) +### 3.4 (2019-05-03) -- new feature added to manage file associations, can be found in the menu at: Tools > Manage... +- new feature added to manage file associations from within the app. It can be found in the menu at: Tools > Manage... [Default Binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L149) +- new zip download option added +- new x86 download option added ### 3.3 (2019-05-01) @@ -234,47 +236,4 @@ mpv.net bugs and requests: - the input editor shows only a closing message if actually a change was made - the input editor don't show confusing menu separators any longer. [Screenshot](https://github.com/stax76/mpv.net#input-editor) - new Command Palette feature added. [Screenshot](https://github.com/stax76/mpv.net#command-palette), [Default input binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L141) -- the history feature had a bug causing files to be logged more than once - -### 3.1 (2019-04-23) - -- the Tracks and Chapters menu are now only added if default bindings exist and - it's now possible to move the chapters menu to the top level by editing input.conf -- mpvnet supports now like mpv a portable settings directory. If a directory named portable_config - next to the mpvnet.exe exists, all config will be loaded and written in this directory. -- there is now a portable download in 7zip format. - -### 3.0 (2019-04-20) - -- the history feature logs now only files that were opened longer than 90 seconds -- the default input command for cycling the audio tracks was replaced with an - mpv.net command that shows detailed track info and has no 'no audio' track. [Default binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L89). -- new website at -- the Tracks menu supports now MKV edition selection. [Default binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L106). -- the Navigate menu supports now chapter selection. [Default binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L57). -- opening the context menu was crashing if the default binding for Tracks was missing - -### 2.9 (2019-04-16) - -- clicking the right top corner in full screen mode - closes the player but it did not work on all displays -- the info display was changed to display the filename on top - so it's not displayed in the middle of the screen -- on start up of the config editor all text is now selected in the - search text box so it's ready for a new search to be typed -- the config editor was changed to write the settings to disk - only if the settings were actually modified, also the message - that says that the settings will be available on next start - is now only shown if the settings were actually modified. -- there was an instance in the context menu where the sub menu - arrow was overlapping with the text -- in the input editor when only one character is entered in the - search text box the search is performed only in the input and - not in the command or menu -- in the input editor the routine that generates the input string - was completely rewritten because it was adding Shift where it - wasn't necessary (it took a huge amount of time to implement) -- the context menu has a new track menu where the active track - can be seen and selected, it shows video, audio and subtitle - tracks with various metadata. [Menu default definition](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt#L104). - The screenshots were updated showing the [new track menu](https://github.com/stax76/mpv.net#screenshots). \ No newline at end of file +- the history feature had a bug causing files to be logged more than once \ No newline at end of file diff --git a/RatingAddon/RatingAddon.csproj b/RatingAddon/RatingAddon.csproj index 6fa53ec..667204d 100644 --- a/RatingAddon/RatingAddon.csproj +++ b/RatingAddon/RatingAddon.csproj @@ -30,6 +30,42 @@ prompt 4 + + true + ..\mpv.net\bin\x86\Addons\RatingAddon\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + ..\mpv.net\bin\x86\Addons\RatingAddon\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + + + true + ..\mpv.net\bin\x64\Addons\RatingAddon\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + + + ..\mpv.net\bin\x64\Addons\RatingAddon\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + diff --git a/mpv.net.sln b/mpv.net.sln index 5952338..71cbf9e 100644 --- a/mpv.net.sln +++ b/mpv.net.sln @@ -11,22 +11,36 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CSScriptAddon", "CSScriptAd EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + 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}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|Any CPU.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}.Release|Any CPU.ActiveCfg = Release|Any CPU - {55C88710-539D-4402-84C8-31694841C731}.Release|Any CPU.Build.0 = Release|Any CPU - {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Release|Any CPU.Build.0 = Release|Any CPU + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x64.ActiveCfg = Debug|x64 + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x64.Build.0 = Debug|x64 + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x86.ActiveCfg = Debug|x86 + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x86.Build.0 = Debug|x86 + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x64.ActiveCfg = Release|x64 + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x64.Build.0 = Release|x64 + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x86.ActiveCfg = Release|x86 + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x86.Build.0 = Release|x86 + {55C88710-539D-4402-84C8-31694841C731}.Debug|x64.ActiveCfg = Debug|x64 + {55C88710-539D-4402-84C8-31694841C731}.Debug|x64.Build.0 = Debug|x64 + {55C88710-539D-4402-84C8-31694841C731}.Debug|x86.ActiveCfg = Debug|x86 + {55C88710-539D-4402-84C8-31694841C731}.Debug|x86.Build.0 = Debug|x86 + {55C88710-539D-4402-84C8-31694841C731}.Release|x64.ActiveCfg = Release|x64 + {55C88710-539D-4402-84C8-31694841C731}.Release|x64.Build.0 = Release|x64 + {55C88710-539D-4402-84C8-31694841C731}.Release|x86.ActiveCfg = Release|x86 + {55C88710-539D-4402-84C8-31694841C731}.Release|x86.Build.0 = Release|x86 + {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Debug|x64.ActiveCfg = Debug|x64 + {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Debug|x64.Build.0 = Debug|x64 + {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Debug|x86.ActiveCfg = Debug|x86 + {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Debug|x86.Build.0 = Debug|x86 + {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Release|x64.ActiveCfg = Release|x64 + {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Release|x64.Build.0 = Release|x64 + {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Release|x86.ActiveCfg = Release|x86 + {71808A87-8B1C-4DF8-957C-D79C3B164CCA}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/mpv.net/Command.cs b/mpv.net/Command.cs index bb6e905..3c0c14d 100644 --- a/mpv.net/Command.cs +++ b/mpv.net/Command.cs @@ -46,14 +46,9 @@ namespace mpvnet public static void open_files(string[] args) { MainForm.Instance.Invoke(new Action(() => { - using (var d = new OpenFileDialog()) - { - d.Multiselect = true; - d.Filter = Sys.GetFilter(); - + using (var d = new OpenFileDialog() { Multiselect = true }) if (d.ShowDialog() == DialogResult.OK) mp.LoadFiles(d.FileNames); - } })); } @@ -126,7 +121,7 @@ namespace mpvnet { fileSize = new FileInfo(path).Length; - if (FileAssociation.AudioTypes.Contains(Path.GetExtension(path).ToLower().TrimStart('.'))) + if (App.AudioTypes.Contains(Path.GetExtension(path).ToLower().TrimStart('.'))) { using (MediaInfo mediaInfo = new MediaInfo(path)) { @@ -245,17 +240,27 @@ namespace mpvnet using (var td = new TaskDialog()) { td.MainInstruction = "Choose an option."; + td.MainIcon = MsgIcon.Shield; td.AddCommandLink("Register video file extensions", "video"); td.AddCommandLink("Register audio file extensions", "audio"); td.AddCommandLink("Unregister file extensions", "unreg"); - using (var p = new Process()) + string result = td.Show(); + + if (!string.IsNullOrEmpty(result)) { - p.StartInfo.FileName = Application.ExecutablePath; - p.StartInfo.Arguments = "--reg-file-assoc " + td.Show(); - p.StartInfo.Verb = "runas"; - p.Start(); + using (var proc = new Process()) + { + proc.StartInfo.FileName = Application.ExecutablePath; + proc.StartInfo.Arguments = "--reg-file-assoc " + result; + proc.StartInfo.Verb = "runas"; + try { + proc.Start(); + } + catch (Exception) + { } + } } } } diff --git a/mpv.net/Misc.cs b/mpv.net/Misc.cs index 247b6a0..821b346 100644 --- a/mpv.net/Misc.cs +++ b/mpv.net/Misc.cs @@ -17,6 +17,9 @@ namespace mpvnet { public class App { + public static string[] VideoTypes { get; } = "mpg avi vob mp4 mkv avs 264 mov wmv flv h264 asf webm mpeg mpv y4m avc hevc 265 h265 m2v m2ts vpy mts webm m4v".Split(" ".ToCharArray()); + public static string[] AudioTypes { get; } = "mp2 mp3 ac3 wav w64 m4a dts dtsma dtshr dtshd eac3 thd thd+ac3 ogg mka aac opus flac mpa".Split(" ".ToCharArray()); + public static bool IsDarkMode { get { string darkMode = MainForm.Instance.MpvNetDarkMode; @@ -51,12 +54,6 @@ namespace mpvnet { } return false; } - - public static string GetFilter() - { - string[] fileTypes = "264 265 3gp aac ac3 avc avi avs bmp divx dts dtshd dtshr dtsma eac3 evo flac flv h264 h265 hevc hvc jpg jpeg m2t m2ts m2v m4a m4v mka mkv mlp mov mp2 mp3 mp4 mpa mpeg mpg mpv mts ogg ogm opus pcm png pva raw rmvb thd thd+ac3 true-hd truehd ts vdr vob vpy w64 wav webm wmv y4m".Split(' '); - return "*." + String.Join(";*.", fileTypes) + "|*." + String.Join(";*.", fileTypes) + "|All Files|*.*"; - } } public class StringLogicalComparer : IComparer, IComparer @@ -76,8 +73,6 @@ namespace mpvnet static string ExeFilename = Path.GetFileName(Application.ExecutablePath); static string ExeFilenameNoExt = Path.GetFileNameWithoutExtension(Application.ExecutablePath); static string[] Types; - public static string[] VideoTypes = "mpg avi vob mp4 mkv avs 264 mov wmv flv h264 asf webm mpeg mpv y4m avc hevc 265 h265 m2v m2ts vpy mts webm m4v".Split(" ".ToCharArray()); - public static string[] AudioTypes = "mp2 mp3 ac3 wav w64 m4a dts dtsma dtshr dtshd eac3 thd thd+ac3 ogg mka aac opus flac mpa".Split(" ".ToCharArray()); public static void Register(string[] types) { @@ -96,9 +91,9 @@ namespace mpvnet RegistryHelp.SetObject($"HKCR\\Applications\\{ExeFilename}\\SupportedTypes", "." + ext, ""); RegistryHelp.SetObject($"HKCR\\" + "." + ext, null, ExeFilenameNoExt + "." + ext); RegistryHelp.SetObject($"HKCR\\" + "." + ext + "\\OpenWithProgIDs", ExeFilenameNoExt + "." + ext, ""); - if (VideoTypes.Contains(ext)) + if (App.VideoTypes.Contains(ext)) RegistryHelp.SetObject($"HKCR\\" + "." + ext, "PerceivedType", "video"); - if (AudioTypes.Contains(ext)) + if (App.AudioTypes.Contains(ext)) RegistryHelp.SetObject($"HKCR\\" + "." + ext, "PerceivedType", "audio"); RegistryHelp.SetObject($"HKCR\\" + ExeFilenameNoExt + "." + ext + "\\shell\\open", null, "Play with " + Application.ProductName); RegistryHelp.SetObject($"HKCR\\" + ExeFilenameNoExt + "." + ext + "\\shell\\open\\command", null, $"\"{ExePath}\" \"%1\""); diff --git a/mpv.net/Native.cs b/mpv.net/Native.cs index 3f2703f..4939619 100644 --- a/mpv.net/Native.cs +++ b/mpv.net/Native.cs @@ -24,12 +24,23 @@ namespace mpvnet [DllImport("user32.dll")] public static extern bool AdjustWindowRect(ref RECT lpRect, uint dwStyle, bool bMenu); - [DllImport("user32.dll")] - public static extern IntPtr GetWindowLongPtrW(IntPtr hWnd, int nIndex); - [DllImport("user32.dll", SetLastError = true)] public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags); + [DllImport("user32.dll", EntryPoint = "GetWindowLong")] + private static extern IntPtr GetWindowLong32(IntPtr hWnd, int nIndex); + + [DllImport("user32.dll", EntryPoint = "GetWindowLongPtr")] + private static extern IntPtr GetWindowLong64(IntPtr hWnd, int nIndex); + + public static IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex) + { + if (IntPtr.Size == 8) + return GetWindowLong64(hWnd, nIndex); + else + return GetWindowLong32(hWnd, nIndex); + } + [StructLayout(LayoutKind.Sequential)] public struct RECT { diff --git a/mpv.net/NativeHelp.cs b/mpv.net/NativeHelp.cs index caea177..a79340a 100644 --- a/mpv.net/NativeHelp.cs +++ b/mpv.net/NativeHelp.cs @@ -32,7 +32,7 @@ namespace mpvnet public static void AddWindowBorders(IntPtr hwnd, ref Native.RECT rc) { - Native.AdjustWindowRect(ref rc, (uint)Native.GetWindowLongPtrW(hwnd, -16 /* GWL_STYLE */), false); + Native.AdjustWindowRect(ref rc, (uint)Native.GetWindowLongPtr(hwnd, -16 /* GWL_STYLE */), false); } } } \ No newline at end of file diff --git a/mpv.net/Program.cs b/mpv.net/Program.cs index 881fbb5..789c5a0 100644 --- a/mpv.net/Program.cs +++ b/mpv.net/Program.cs @@ -16,8 +16,8 @@ namespace mpvnet if (args.Length == 3 && args[1] == "--reg-file-assoc") { - if (args[2] == "audio") FileAssociation.Register(FileAssociation.AudioTypes); - if (args[2] == "video") FileAssociation.Register(FileAssociation.VideoTypes); + if (args[2] == "audio") FileAssociation.Register(App.AudioTypes); + if (args[2] == "video") FileAssociation.Register(App.VideoTypes); if (args[2] == "unreg") FileAssociation.Unregister(); return; } diff --git a/mpv.net/Properties/AssemblyInfo.cs b/mpv.net/Properties/AssemblyInfo.cs index 4a5216e..a4f85b1 100644 --- a/mpv.net/Properties/AssemblyInfo.cs +++ b/mpv.net/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.3.0.0")] -[assembly: AssemblyFileVersion("3.3.0.0")] +[assembly: AssemblyVersion("3.4.0.0")] +[assembly: AssemblyFileVersion("3.4.0.0")] diff --git a/mpv.net/mpv.net.csproj b/mpv.net/mpv.net.csproj index 0bbe521..28c231b 100644 --- a/mpv.net/mpv.net.csproj +++ b/mpv.net/mpv.net.csproj @@ -56,6 +56,46 @@ app.manifest + + true + bin\x86\ + DEBUG;TRACE + full + x86 + On + 7.3 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + + + true + bin\x64\ + DEBUG;TRACE + full + x64 + On + 7.3 + prompt + MinimumRecommendedRules.ruleset + + + bin\x64\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + False diff --git a/portable.ps1 b/portable.ps1 deleted file mode 100644 index 55679e7..0000000 --- a/portable.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$scriptDir = Split-Path -Path $PSCommandPath -Parent -$exePath = $scriptDir + "\mpv.net\bin\mpvnet.exe" -$version = [Diagnostics.FileVersionInfo]::GetVersionInfo($exePath).FileVersion -$desktopDir = [Environment]::GetFolderPath("Desktop") -$targetDir = $desktopDir + "\mpv.net-portable-x64-" + $version -Copy-Item $scriptDir\mpv.net\bin $targetDir -Recurse -Exclude System.Management.Automation.xml -Force -& "C:\Program Files\7-Zip\7z.exe" a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*" \ No newline at end of file diff --git a/setup.iss b/setup.iss index ea6de5d..01c4032 100644 --- a/setup.iss +++ b/setup.iss @@ -1,18 +1,30 @@ #define MyAppName "mpv.net" -#define MyAppVersion GetFileVersion("mpv.net\bin\mpvnet.exe") #define MyAppExeName "mpvnet.exe" -#define MyAppSourceDir "mpv.net\bin" + +#ifndef arch + #define arch "x64" +#endif + +#if arch == "x64" + #define MyAppSourceDir "mpv.net\bin\x64" + #define MyAppVersion GetFileVersion("mpv.net\bin\x64\mpvnet.exe") +#else + #define MyAppSourceDir "mpv.net\bin\x86" + #define MyAppVersion GetFileVersion("mpv.net\bin\x86\mpvnet.exe") +#endif [Setup] AppId={{9AA2B100-BEF3-44D0-B819-D8FC3C4D557D}} AppName={#MyAppName} AppVersion={#MyAppVersion} AppPublisher=Frank Skare (stax76) -ArchitecturesInstallIn64BitMode=x64 +#if arch == "x64" + ArchitecturesInstallIn64BitMode=x64 +#endif Compression=lzma2 -DefaultDirName={pf}\{#MyAppName} -OutputBaseFilename=mpvnet-setup-x64-{#MyAppVersion} -OutputDir=C:\Users\frank\Desktop +DefaultDirName={commonpf}\{#MyAppName} +OutputBaseFilename=mpvnet-setup-{#arch}-{#MyAppVersion} +OutputDir={#GetEnv('USERPROFILE')}\Desktop DefaultGroupName={#MyAppName} SetupIconFile=mpv.net\mpvnet.ico UninstallDisplayIcon={app}\{#MyAppExeName} diff --git a/setup.ps1 b/setup.ps1 new file mode 100644 index 0000000..1e7d998 --- /dev/null +++ b/setup.ps1 @@ -0,0 +1,52 @@ +function CheckExitCode { + if ($LastExitCode -gt 0) + { + Write-Host "`nExit code $LastExitCode was returned.`n" -ForegroundColor Red + exit + } +} + +$msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe" + +& $msbuild mpv.net.sln /p:Configuration=Debug /p:Platform=x64 + +CheckExitCode + +& $msbuild mpv.net.sln /p:Configuration=Debug /p:Platform=x86 + +CheckExitCode + +& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Darch="x64" setup.iss + +CheckExitCode + +& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Darch="x86" setup.iss + +CheckExitCode + +$scriptDir = Split-Path -Path $PSCommandPath -Parent +$desktopDir = [Environment]::GetFolderPath("Desktop") + +$exePath = $scriptDir + "\mpv.net\bin\x64\mpvnet.exe" +$version = [Diagnostics.FileVersionInfo]::GetVersionInfo($exePath).FileVersion +$targetDir = $desktopDir + "\mpv.net-portable-x64-" + $version +Copy-Item $scriptDir\mpv.net\bin\x64 $targetDir -Recurse -Exclude System.Management.Automation.xml -Force +& "C:\Program Files\7-Zip\7z.exe" a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*" + +CheckExitCode + +& "C:\Program Files\7-Zip\7z.exe" a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*" + +CheckExitCode + +$exePath = $scriptDir + "\mpv.net\bin\x86\mpvnet.exe" +$version = [Diagnostics.FileVersionInfo]::GetVersionInfo($exePath).FileVersion +$targetDir = $desktopDir + "\mpv.net-portable-x86-" + $version +Copy-Item $scriptDir\mpv.net\bin\x86 $targetDir -Recurse -Exclude System.Management.Automation.xml -Force +& "C:\Program Files\7-Zip\7z.exe" a -t7z -mx9 "$targetDir.7z" -r "$targetDir\*" + +CheckExitCode + +& "C:\Program Files\7-Zip\7z.exe" a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*" + +CheckExitCode \ No newline at end of file