Files

19 lines
1.1 KiB
PowerShell

[CmdletBinding()]param()
$ErrorActionPreference='Stop'
. (Join-Path $PSScriptRoot 'hash-file.ps1')
$root=[IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
$download=Join-Path $root 'build\downloads\ffmpeg-lgpl.zip'
$url='https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2026-10-25-13-00/ffmpeg-n9.0.2-36-g6882969ce9-win64-lgpl-shared-9.0.zip'
$expected='72E3FBAF17F8D5162C3010F9E58872FCB93BA2B03731FD0FFF1CA9AABB616EA6'
New-Item -ItemType Directory -Force (Split-Path $download) | Out-Null
if (-not (Test-Path $download)) { Invoke-WebRequest $url -OutFile $download }
if ((Get-FileBowSha256 $download) -ne $expected) { throw 'FFmpeg-Prüfsumme stimmt nicht überein.' }
$unpack=Join-Path $root 'build\downloads\ffmpeg'
Expand-Archive $download $unpack -Force
$source=Join-Path $unpack 'ffmpeg-n9.0.2-36-g6882969ce9-win64-lgpl-shared-9.0'
$target=Join-Path $root 'vendor\ffmpeg'
New-Item -ItemType Directory -Force $target | Out-Null
Copy-Item "$source\bin\ffmpeg.exe","$source\bin\ffprobe.exe","$source\bin\*.dll" $target -Force
Copy-Item "$source\LICENSE.txt" $target -Force
Write-Output 'FFmpeg heruntergeladen und SHA-256 geprüft.'