-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_shotcut_v22.ps1
21 lines (20 loc) · 1.08 KB
/
install_shotcut_v22.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function Install {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$DownloadUrl = "https://github.com/mltframework/shotcut/releases/download/v22.12.21/shotcut-win64-221221.zip"
$KiloathDir = Join-Path $HOME "KiloathApp"
$Directory = Join-Path $KiloathDir "Shotcut"
$Target = Join-Path $Directory "shotcut-win64-221221.zip"
New-Item $Directory -Force -ItemType Directory | Out-Null
Invoke-WebRequest $DownloadUrl -OutFile $Target -UseBasicParsing
Expand-Archive -Path $Target -DestinationPath $Directory -Force
$BinDir = "$Directory\Shotcut"
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$KiloathDir\shotcut.lnk")
$Shortcut.TargetPath = "$BinDir\shotcut.exe"
$Shortcut.Save()
$Shortcut = $WshShell.CreateShortcut("$([Environment]::GetFolderPath('Desktop'))\KiloathApp.lnk")
$Shortcut.TargetPath = Join-Path $HOME "KiloathApp"
$Shortcut.Save()
}
Install
# v23之後Settings > Player > External Monitor被移除了, 但對我很重要所以不升級, v22.12.21版很好。