shinchiro/mpv-winbuild-cmake

updater.ps, function Download-Archive ($filename, $link)

DeryabinKA opened this issue · 0 comments

On any computers Invoke-WebRequest download html, no binary 7z.
Worked variant:

function Download-Archive ($filename, $link) {
Write-Host "Downloading" $filename -ForegroundColor Green

Invoke-WebRequest -Uri $link -UserAgent $useragent -OutFile $filename

$cli = New-Object System.Net.WebClient;
$cli.Headers['User-Agent'] = $useragent;
$cli.DownloadFile($link, $filename)

}