This commit is contained in:
Frank Skare
2019-03-11 21:10:14 +01:00
parent 7e1c30ffa0
commit d91bba6521
7 changed files with 175 additions and 221 deletions

View File

@@ -134,7 +134,7 @@ namespace mpvnet
public bool IsFullscreen public bool IsFullscreen
{ {
get { return WindowState == FormWindowState.Maximized; } get => WindowState == FormWindowState.Maximized;
} }
void MpvChangeFullscreen(bool value) void MpvChangeFullscreen(bool value)

View File

@@ -78,7 +78,7 @@ public class ActionMenuItem : MenuItemEx
public static ActionMenuItem Add(ToolStripItemCollection items, string path, Action action) public static ActionMenuItem Add(ToolStripItemCollection items, string path, Action action)
{ {
var a = path.Split(new[] { " > " }, StringSplitOptions.RemoveEmptyEntries); var a = path.Split(new[] { " > ", " | " }, StringSplitOptions.RemoveEmptyEntries);
var l = items; var l = items;
for (var x = 0; x <= a.Length - 1; x++) for (var x = 0; x <= a.Length - 1; x++)
@@ -381,37 +381,25 @@ public struct HSLColor
Luminosity = l; Luminosity = l;
} }
private double HueValue; private double hue;
public int Hue { public int Hue {
get { get => System.Convert.ToInt32(hue * 240);
return System.Convert.ToInt32(HueValue * 240); set => hue = CheckRange(value / 240.0);
}
set {
HueValue = CheckRange(value / 240.0);
}
} }
private double SaturationValue; private double saturation;
public int Saturation { public int Saturation {
get { get => System.Convert.ToInt32(saturation * 240);
return System.Convert.ToInt32(SaturationValue * 240); set => saturation = CheckRange(value / 240.0);
}
set {
SaturationValue = CheckRange(value / (double)240);
}
} }
private double LuminosityValue; private double luminosity;
public int Luminosity { public int Luminosity {
get { get => System.Convert.ToInt32(luminosity * 240);
return System.Convert.ToInt32(LuminosityValue * 240); set => luminosity = CheckRange(value / 240.0);
}
set {
LuminosityValue = CheckRange(value / (double)240);
}
} }
private double CheckRange(double value) private double CheckRange(double value)
@@ -426,13 +414,13 @@ public struct HSLColor
public Color ToColorAddLuminosity(int luminosity) public Color ToColorAddLuminosity(int luminosity)
{ {
this.Luminosity += luminosity; Luminosity += luminosity;
return ToColor(); return ToColor();
} }
public Color ToColorSetLuminosity(int luminosity) public Color ToColorSetLuminosity(int luminosity)
{ {
this.Luminosity = luminosity; Luminosity = luminosity;
return ToColor(); return ToColor();
} }
@@ -440,22 +428,22 @@ public struct HSLColor
{ {
double r = 0, g = 0, b = 0; double r = 0, g = 0, b = 0;
if (LuminosityValue != 0) if (luminosity != 0)
{ {
if (SaturationValue == 0) if (saturation == 0)
{ {
b = LuminosityValue; b = luminosity;
g = LuminosityValue; g = luminosity;
r = LuminosityValue; r = luminosity;
} }
else else
{ {
var temp2 = GetTemp2(this); var temp2 = GetTemp2(this);
var temp1 = 2.0 * LuminosityValue - temp2; var temp1 = 2.0 * luminosity - temp2;
r = GetColorComponent(temp1, temp2, HueValue + 1.0 / 3.0); r = GetColorComponent(temp1, temp2, hue + 1.0 / 3.0);
g = GetColorComponent(temp1, temp2, HueValue); g = GetColorComponent(temp1, temp2, hue);
b = GetColorComponent(temp1, temp2, HueValue - 1.0 / 3.0); b = GetColorComponent(temp1, temp2, hue - 1.0 / 3.0);
} }
} }
@@ -493,10 +481,10 @@ public struct HSLColor
{ {
double temp2; double temp2;
if (hslColor.LuminosityValue < 0.5) if (hslColor.luminosity < 0.5)
temp2 = hslColor.LuminosityValue * (1.0 + hslColor.SaturationValue); temp2 = hslColor.luminosity * (1.0 + hslColor.saturation);
else else
temp2 = hslColor.LuminosityValue + hslColor.SaturationValue - (hslColor.LuminosityValue * hslColor.SaturationValue); temp2 = hslColor.luminosity + hslColor.saturation - (hslColor.luminosity * hslColor.saturation);
return temp2; return temp2;
} }
@@ -504,17 +492,17 @@ public struct HSLColor
public static HSLColor Convert(Color c) public static HSLColor Convert(Color c)
{ {
HSLColor r = new HSLColor(); HSLColor r = new HSLColor();
r.HueValue = c.GetHue() / 360.0; r.hue = c.GetHue() / 360.0;
r.LuminosityValue = c.GetBrightness(); r.luminosity = c.GetBrightness();
r.SaturationValue = c.GetSaturation(); r.saturation = c.GetSaturation();
return r; return r;
} }
public void SetRGB(int red, int green, int blue) public void SetRGB(int red, int green, int blue)
{ {
var hc = HSLColor.Convert(Color.FromArgb(red, green, blue)); var hc = HSLColor.Convert(Color.FromArgb(red, green, blue));
HueValue = hc.HueValue; hue = hc.hue;
SaturationValue = hc.SaturationValue; saturation = hc.saturation;
LuminosityValue = hc.LuminosityValue; luminosity = hc.luminosity;
} }
} }

View File

@@ -61,17 +61,17 @@ namespace mpvnet
public Size Size public Size Size
{ {
get { return new Size(Right - Left, Bottom - Top); } get => new Size(Right - Left, Bottom - Top);
} }
public int Width public int Width
{ {
get { return Right - Left; } get => Right - Left;
} }
public int Height public int Height
{ {
get { return Bottom - Top; } get => Bottom - Top;
} }
} }
} }

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.6.0")] [assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("0.2.6.0")] [assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -61,19 +61,6 @@ namespace mpvnet.Properties {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to
///#key command key caption menu path/caption
///
///o script-message mpv.net open-files #menu: O; Open Files
///
///Space cycle pause #menu: Space ; Play/Pause
///s stop #menu: S ; Stop
///
///F11 playlist-prev #menu: F11 ; Navigate | Previous
///F12 playlist-next #menu: F12 ; Navigate | Next
///
///Ctrl++ add video-zoom 0.1 #menu: Ctrl++ ; Pan &amp;&amp; Scan | Increase Size
///Ctrl+- add video-zoom -0.1 #menu: Ct [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal static string input_conf { internal static string input_conf {
get { get {

View File

@@ -1,161 +1,140 @@
# mpv.net key bindings, mouse bindings and context menu configuration # mpv.net key bindings, mouse bindings and context menu configuration
o script-message mpv.net open-files #menu: O ; Open Files... o script-message mpv.net open-files #menu: O ; Open Files...
_ ignore #menu: _ ; - _ ignore #menu: _ ; -
Space cycle pause #menu: Space, Enter ; Play/Pause Space cycle pause #menu: Space, Enter ; Play/Pause
Enter cycle pause Enter cycle pause
s stop #menu: S ; Stop s stop #menu: S ; Stop
_ ignore #menu: _ ; - _ ignore #menu: _ ; -
f cycle fullscreen #menu: F ; Toggle Fullscreen f cycle fullscreen #menu: F ; Toggle Fullscreen
F11 playlist-prev #menu: F11 ; Navigate > Previous F11 playlist-prev #menu: F11 ; Navigate > Previous
F12 playlist-next #menu: F12 ; Navigate > Next F12 playlist-next #menu: F12 ; Navigate > Next
_ ignore #menu: _ ; Navigate > - _ ignore #menu: _ ; Navigate > -
PGUP add chapter 1 #menu: Page Up ; Navigate > Next Chapter PGUP add chapter 1 #menu: Page Up ; Navigate > Next Chapter
PGDWN add chapter -1 #menu: Page Down ; Navigate > Previous Chapter PGDWN add chapter -1 #menu: Page Down ; Navigate > Previous Chapter
. frame-step #menu: . ; Seek > Next Frame . frame-step #menu: . ; Seek > Next Frame
, frame-back-step #menu: , ; Seek > Previous Frame , frame-back-step #menu: , ; Seek > Previous Frame
_ ignore #menu: _ ; Seek > - _ ignore #menu: _ ; Seek > -
Right no-osd seek 7 #menu: Right ; Seek > 7 sec forward Right no-osd seek 7 #menu: Right ; Seek > 7 sec forward
Left no-osd seek -7 #menu: Left ; Seek > 7 sec backward Left no-osd seek -7 #menu: Left ; Seek > 7 sec backward
_ ignore #menu: _ ; Seek > - _ ignore #menu: _ ; Seek > -
Up no-osd seek 40 #menu: Up ; Seek > 40 sec forward Up no-osd seek 40 #menu: Up ; Seek > 40 sec forward
Down no-osd seek -40 #menu: Down ; Seek > 40 sec backward Down no-osd seek -40 #menu: Down ; Seek > 40 sec backward
_ ignore #menu: _ ; Seek > - _ ignore #menu: _ ; Seek > -
Ctrl+Right no-osd seek 300 #menu: Ctrl+Right ; Seek > 5 min forward Ctrl+Right no-osd seek 300 #menu: Ctrl+Right ; Seek > 5 min forward
Ctrl+Left no-osd seek -300 #menu: Ctrl+Left ; Seek > 5 min backward Ctrl+Left no-osd seek -300 #menu: Ctrl+Left ; Seek > 5 min backward
Ctrl++ add video-zoom 0.1 #menu: Ctrl++ ; Pan && Scan > Increase Size Ctrl++ add video-zoom 0.1 #menu: Ctrl++ ; Pan && Scan > Increase Size
Ctrl+- add video-zoom -0.1 #menu: Ctrl+- ; Pan && Scan > Decrease Size Ctrl+- add video-zoom -0.1 #menu: Ctrl+- ; Pan && Scan > Decrease Size
_ ignore #menu: _ ; Pan && Scan > - _ ignore #menu: _ ; Pan && Scan > -
Shift+Left add video-pan-x -0.01 #menu: Shift+Left ; Pan && Scan > Move Left Shift+Left add video-pan-x -0.01 #menu: Shift+Left ; Pan && Scan > Move Left
Shift+Right add video-pan-x 0.01 #menu: Shift+Right ; Pan && Scan > Move Right Shift+Right add video-pan-x 0.01 #menu: Shift+Right ; Pan && Scan > Move Right
_ ignore #menu: _ ; Pan && Scan > - _ ignore #menu: _ ; Pan && Scan > -
Shift+Up add video-pan-y -0.01 #menu: Shift+Up ; Pan && Scan > Move Up Shift+Up add video-pan-y -0.01 #menu: Shift+Up ; Pan && Scan > Move Up
Shift+Down add video-pan-y 0.01 #menu: Shift+Down ; Pan && Scan > Move Down Shift+Down add video-pan-y 0.01 #menu: Shift+Down ; Pan && Scan > Move Down
_ ignore #menu: _ ; Pan && Scan > - _ ignore #menu: _ ; Pan && Scan > -
Shift+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 #menu: Alt+Backspace ; Pan && Scan > Reset w add panscan -0.1 #menu: W ; Pan && Scan > Decrease Height
W add panscan +0.1 #menu: Shift+W ; Pan && Scan > Increase Height
_ ignore #menu: _ ; Pan && Scan > -
Shift+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 #menu: Alt+Backspace ; Pan && Scan > Reset
KP7 cycle audio #menu: Keypad 7 ; Audio > Cycle/Next Ctrl+1 add contrast -1 #menu: Ctrl+1 ; Video > Decrease Contrast
_ ignore #menu: _ ; Audio > - Ctrl+2 add contrast 1 #menu: Ctrl+2 ; Video > Increase Contrast
KP6 add audio-delay 0.100 #menu: Keypad 6 ; Audio > Delay +0.1 _ ignore #menu: _ ; Video > -
KP9 add audio-delay -0.100 #menu: Keypad 9 ; Audio > Delay -0.1 Ctrl+3 add brightness -1 #menu: Ctrl+3 ; Video > Decrease Brightness
Ctrl+4 add brightness 1 #menu: Ctrl+4 ; Video > Increase Brightness
_ ignore #menu: _ ; Video > -
Ctrl+5 add gamma -1 #menu: Ctrl+5 ; Video > Decrease Gamma
Ctrl+6 add gamma 1 #menu: Ctrl+6 ; Video > Increase Gamma
_ ignore #menu: _ ; Video > -
Ctrl+7 add saturation -1 #menu: Ctrl+7 ; Video > Decrease Saturation
Ctrl+8 add saturation 1 #menu: Ctrl+8 ; Video > Increase Saturation
_ ignore #menu: _ ; Video > -
Ctrl+S async screenshot #menu: Ctrl+S ; Video > Take Screenshot
Ctrl+Shift+S screenshot each-frame #menu: Ctrl+Shift+S ; Video > Take Screenshots All Frames
_ ignore #menu: _ ; Video > -
d cycle deinterlace #menu: D ; Video > Toggle Deinterlace
a cycle-values video-aspect "16:9" "4:3" "2.35:1" "-1" #menu: A ; Video > Cycle Aspect Ratio
KP8 cycle sub #menu: Keypad 8 ; Subtitle > Cycle/Next KP7 cycle audio #menu: Keypad 7 ; Audio > Cycle/Next
_ ignore #menu: _ ; Subtitle > - _ ignore #menu: _ ; Audio > -
z add sub-delay -0.1 #menu: Z ; Subtitle > Delay -0.1 KP6 add audio-delay 0.100 #menu: Keypad 6 ; Audio > Delay +0.1
Z add sub-delay +0.1 #menu: Shift+Z ; Subtitle > Delay +0.1 KP9 add audio-delay -0.100 #menu: Keypad 9 ; Audio > Delay -0.1
+ add volume 10 #menu: + ; Volume > Up KP8 cycle sub #menu: Keypad 8 ; Subtitle > Cycle/Next
- add volume -10 #menu: - ; Volume > Down v cycle sub-visibility #menu: V ; Subtitle > Toggle Visibility
WHEEL_UP add volume 10 _ ignore #menu: _ ; Subtitle > -
WHEEL_DOWN add volume -10 z add sub-delay -0.1 #menu: Z ; Subtitle > Delay -0.1
_ ignore #menu: _ ; Volume > - Z add sub-delay +0.1 #menu: Shift+Z ; Subtitle > Delay +0.1
m cycle mute #menu: M ; Volume > Mute _ ignore #menu: _ ; Subtitle > -
r add sub-pos -1 #menu: R ; Subtitle > Move Up
R add sub-pos +1 #menu: Shift+R ; Subtitle > Move Down
_ ignore #menu: _ ; Subtitle > -
_ add sub-scale -0.1 #menu: _ ; Subtitle > Decrease Subtitle Font Size
_ add sub-scale +0.1 #menu: _ ; Subtitle > Increase Subtitle Font Size
_ ignore #menu: _ ; Subtitle > -
[ multiply speed 0.9 #menu: [ ; Speed > -10% + add volume 10 #menu: + ; Volume > Up
] multiply speed 1.1 #menu: ] ; Speed > +10% - add volume -10 #menu: - ; Volume > Down
_ ignore #menu: _ ; Speed > - WHEEL_UP add volume 10
{ multiply speed 0.5 #menu: { ; Speed > Half WHEEL_DOWN add volume -10
} multiply speed 2.0 #menu: } ; Speed > Double _ ignore #menu: _ ; Volume > -
_ ignore #menu: _ ; Speed > - m cycle mute #menu: M ; Volume > Mute
BS set speed 1 #menu: Backspace ; Speed > Reset
KP0 script-message rate-file 0 #menu: Keypad 0 ; Addons > Rating > 0stars [ multiply speed 0.9 #menu: [ ; Speed > -10%
KP1 script-message rate-file 1 #menu: Keypad 1 ; Addons > Rating > 1stars ] multiply speed 1.1 #menu: ] ; Speed > +10%
KP2 script-message rate-file 2 #menu: Keypad 2 ; Addons > Rating > 2stars _ ignore #menu: _ ; Speed > -
KP3 script-message rate-file 3 #menu: Keypad 3 ; Addons > Rating > 3stars { multiply speed 0.5 #menu: { ; Speed > Half
KP4 script-message rate-file 4 #menu: Keypad 4 ; Addons > Rating > 4stars } multiply speed 2.0 #menu: } ; Speed > Double
KP5 script-message rate-file 5 #menu: Keypad 5 ; Addons > Rating > 5stars _ ignore #menu: _ ; Speed > -
BS set speed 1 #menu: Backspace ; Speed > Reset
_ script-message mpv.net set-setting hwdec yes #menu: _ ; Settings > Hardware Decoding > Enable KP0 script-message rate-file 0 #menu: Keypad 0 ; Addons > Rating > 0stars
_ script-message mpv.net set-setting hwdec no #menu: _ ; Settings > Hardware Decoding > Disable KP1 script-message rate-file 1 #menu: Keypad 1 ; Addons > Rating > 1stars
p script-message mpv.net show-prefs #menu: P ; Settings > Show Preferences KP2 script-message rate-file 2 #menu: Keypad 2 ; Addons > Rating > 2stars
k script-message mpv.net show-keys #menu: K ; Settings > Show Keys KP3 script-message rate-file 3 #menu: Keypad 3 ; Addons > Rating > 3stars
c script-message mpv.net open-config-folder #menu: C ; Settings > Open Config Folder KP4 script-message rate-file 4 #menu: Keypad 4 ; Addons > Rating > 4stars
KP5 script-message rate-file 5 #menu: Keypad 5 ; Addons > Rating > 5stars
i show-progress ; script-message mpv.net show-info #menu: I ; Tools > Info _ script-message mpv.net set-setting hwdec yes #menu: _ ; Settings > Hardware Decoding > Enable
t script-binding stats/display-stats #menu: T ; Tools > Show Statistics _ script-message mpv.net set-setting hwdec no #menu: _ ; Settings > Hardware Decoding > Disable
T script-binding stats/display-stats-toggle #menu: Shift+T ; Tools > Toggle Statistics p script-message mpv.net show-prefs #menu: P ; Settings > Show Preferences
_ ignore #menu: _ ; Tools > - k script-message mpv.net show-keys #menu: K ; Settings > Show Keys
h script-message mpv.net history #menu: H ; Tools > Show History c script-message mpv.net open-config-folder #menu: C ; Settings > Open Config Folder
l ab-loop #menu: L ; Tools > Set/clear A-B loop points
_ script-message mpv.net shell-execute https://mpv.io/manual/stable/ #menu: _ ; Tools > Web > Show mpv manual
_ script-message mpv.net shell-execute https://github.com/mpv-player/mpv/blob/master/etc/input.conf #menu: _ ; Tools > Web > Show mpv default keys
_ script-message mpv.net shell-execute https://github.com/stax76/mpvnet #menu: _ ; Tools > Web > Show mpv.net web site
_ ignore #menu: _ ; -
Esc quit #menu: Escape ; Exit
Q quit-watch-later #menu: Shift+Q ; Exit Watch Later
# Adjust timing to previous/next subtitle i show-progress ; script-message mpv.net show-info #menu: I ; Tools | Info
Ctrl+Shift+LEFT sub-step -1 t script-binding stats/display-stats #menu: T ; Tools > Show Statistics
Ctrl+Shift+RIGHT sub-step 1 T script-binding stats/display-stats-toggle #menu: Shift+T ; Tools > Toggle Statistics
_ ignore #menu: _ ; Tools > -
h script-message mpv.net history #menu: H ; Tools > Show History
l ab-loop #menu: L ; Tools > Set/clear A-B loop points
L cycle-values loop-file "inf" "no" #menu: Shift+L ; Tools > Toggle Infinite Looping
DEL script-binding osc/visibility #menu: Delete ; Tools > Toggle OSC Visibility
Ctrl+H cycle-values hwdec "auto" "no" #menu: Ctrl+H ; Tools > Cycle Hardware Decoding
F8 show_text ${playlist} #menu: F8 ; Tools > Show Playlist
F9 show_text ${track-list} #menu: F9 ; Tools > Show Audio/Video/Subtitle List
> playlist-next # skip to next file _ script-message mpv.net shell-execute https://mpv.io/manual/stable/ #menu: _ ; Tools > Web > Show mpv manual
< playlist-prev # skip to previous file _ script-message mpv.net shell-execute https://github.com/mpv-player/mpv/blob/master/etc/input.conf #menu: _ ; Tools > Web > Show mpv default keys
_ script-message mpv.net shell-execute https://github.com/stax76/mpvnet #menu: _ ; Tools > Web > Show mpv.net web site
_ ignore #menu: _ ; -
Esc quit #menu: Escape ; Exit
Q quit-watch-later #menu: Shift+Q ; Exit Watch Later
O no-osd cycle-values osd-level 3 1 # cycle through OSD mode > playlist-next
< playlist-prev
#1 add contrast -1 POWER quit
#2 add contrast 1 PLAY cycle pause
#3 add brightness -1 PAUSE cycle pause
#4 add brightness 1 PLAYPAUSE cycle pause
#5 add gamma -1 STOP quit
#6 add gamma 1 FORWARD seek 60
#7 add saturation -1 REWIND seek -60
#8 add saturation 1 VOLUME_UP add volume 2
VOLUME_DOWN add volume -2
# toggle deinterlacer (automatically inserts or removes required filter) MUTE cycle mute
#d cycle deinterlace CLOSE_WIN quit
#r add sub-pos -1 # move subtitles up CLOSE_WIN {encode} quit 4
#R add sub-pos +1 # down
#t add sub-pos +1 # same as previous binding (discouraged)
#v cycle sub-visibility
# stretch SSA/ASS subtitles with anamorphic videos to match historical
#V cycle sub-ass-vsfilter-aspect-compat
# switch between applying no style overrides to SSA/ASS subtitles, and
# overriding them almost completely with the normal subtitle style
#u cycle-values sub-ass-override "force" "no"
#j cycle sub # cycle through subtitles
#J cycle sub down # ...backwards
#SHARP cycle audio # switch audio streams
#_ cycle video
#T cycle ontop # toggle video window ontop of other windows
#s async screenshot # take a screenshot
#S async screenshot video # ...without subtitles
#Ctrl+s async screenshot window # ...with subtitles and OSD, and scaled
#Alt+s screenshot each-frame # automatically screenshot every frame
#w add panscan -0.1 # zoom out with -panscan 0 -fs
#W add panscan +0.1 # in
#e add panscan +0.1 # same as previous binding (discouraged)
# cycle video aspect ratios; "-1" is the container aspect
#A cycle-values video-aspect "16:9" "4:3" "2.35:1" "-1"
#POWER quit
#PLAY cycle pause
#PAUSE cycle pause
#PLAYPAUSE cycle pause
#STOP quit
#FORWARD seek 60
#REWIND seek -60
#NEXT playlist-next
#PREV playlist-prev
#VOLUME_UP add volume 2
#VOLUME_DOWN add volume -2
#MUTE cycle mute
#CLOSE_WIN quit
#CLOSE_WIN {encode} quit 4
#E cycle edition # next edition
#L cycle-values loop-file "inf" "no" # toggle infinite looping
#ctrl+c quit 4
#DEL script-binding osc/visibility # cycle OSC display
#ctrl+h cycle-values hwdec "auto" "no" # cycle hardware decoding
#F8 show_text ${playlist} # show playlist
#F9 show_text ${track-list} # show list of audio/sub streams
# ? add sub-scale +0.1 # increase subtitle font size
# ? add sub-scale -0.1 # decrease subtitle font size
# ? cycle angle # switch DVD/Bluray angle
# ? cycle sub-forced-only # toggle DVD forced subs
# ? cycle program # cycle transport stream programs
# ? stop # stop playback (quit or enter idle mode)

View File

@@ -6,7 +6,7 @@ $targetDir = $desktopDir + "\mpv.net-" + $version
if (Test-Path $targetDir) { rd $targetDir -recurse } if (Test-Path $targetDir) { rd $targetDir -recurse }
Copy-Item $scriptDir\mpv.net\bin\Debug $targetDir -recurse Copy-Item $scriptDir\mpv.net\bin\Debug $targetDir -recurse
$addonDir = $targetDir + "\Addons" $addonDir = $targetDir + "\Addons"
remove-item $addonDir -Recurse -Include *mpvnet.exe, *mpvnet.exe.config, *mpvnet.pdb Remove-Item $addonDir -Recurse -Include *mpvnet.exe, *mpvnet.exe.config, *mpvnet.pdb
$7zPath = "C:\Program Files\7-Zip\7z.exe" $7zPath = "C:\Program Files\7-Zip\7z.exe"
$args = "a -t7z -mx9 $targetDir.7z -r $targetDir\*" $args = "a -t7z -mx9 $targetDir.7z -r $targetDir\*"
Start-Process -FilePath $7zPath -ArgumentList $args Start-Process -FilePath $7zPath -ArgumentList $args