Files
UltraGrid/data/Windows/update.ps1
Martin Pulec b8ce258d4d sdl_mixer: try to open from common path
Copy sounfont to known path for macOS and Windows CI builds (in Linux,
this is already handled with a environment var SDL_SOUNDFONTS). And also
use that location if there is any soundfont.
2023-04-28 10:15:11 +02:00

24 lines
961 B
PowerShell

$ErrorActionPreference = "Stop"
$scriptPath = $MyInvocation.MyCommand.Path
$scriptDir = Split-Path $scriptPath
cd $scriptDir
rm UltraGrid-nightly*
Invoke-WebRequest https://github.com/CESNET/UltraGrid/releases/download/nightly/UltraGrid-nightly-win64.zip -OutFile UltraGrid-nightly-win64.zip
if ($LastExitCode -ne 0) {
throw "Download failed"
}
$downloadExtractDir = "UltraGrid-nightly-latest-win64"
Expand-Archive -LiteralPath UltraGrid-nightly-win64.zip -DestinationPath $downloadExtractDir
$currentName = (Split-Path -Leaf Get-Location).Path
$downloadedName = (Get-ChildItem $downloadExtractDir).Name
if ($currentName -ne $downloadedName) {
Move-Item $downloadExtractDir/* ..
Write-Host "Downloaded ,$downloadedName removing $currentName."
Set-Location ../$downloadedName
Remove-Item -Recurse ../$currentName
} else {
Remove-Item -Recurse $downloadExtractDir
Remove-Item UltraGrid-nightly-win64.zip
}