shinchiro / mpv-winbuild-cmake

CMake-based MinGW-w64 Cross Toolchain
667 stars 118 forks source link

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

Open DeryabinKA opened 11 months ago

DeryabinKA commented 11 months ago

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)

}