Skip to content

Commit f1ccc2b

Browse files
Verify installed FFmpeg binaries and preserve license notices
1 parent 3dc1e82 commit f1ccc2b

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

‎src/facut/installation.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@
3939
"swresample-",
4040
"swscale-",
4141
)
42-
NATIVE_NOTICE_FILES = {"THIRD_PARTY_NOTICES.md", "FFMPEG_LICENSE.txt"}
42+
NATIVE_NOTICE_FILES = {
43+
"THIRD_PARTY_NOTICES.md",
44+
"FFMPEG_LICENSE.txt",
45+
"FFMPEG_CLI_GPLv3.txt",
46+
"FFMPEG_CLI_BUILD_LICENSE.txt",
47+
}
4348

4449

4550
def default_install_directory() -> Path:

‎tools/test_and_package_ffmpeg91.ps1‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,17 @@ $video = @($result.results | Where-Object { $_.kind -eq 'video' })
7474
if ($photo.Count -ne 1 -or @($photo[0].representative_frames).Count -ne 1) { throw 'Still-image scan failed' }
7575
if ($video.Count -ne 1 -or !$video[0].representative_frames -or !$video[0].waveform.peaks -or
7676
$video[0].waveform.sample_rate -ne 48000) { throw 'Video frames or original audio waveform missing' }
77+
78+
# Test installation with a fresh destination and explicitly excluded model weights.
79+
$installed = Join-Path $env:RUNNER_TEMP 'facut91-installed-smoke'
80+
& $facut --json install --directory $installed --no-path --exclude model
81+
$installedFacut = Join-Path $installed 'facut.exe'
82+
$installedNative = Join-Path $installed 'facut-native.exe'
83+
$installedDoctor = & $installedNative --doctor | ConvertFrom-Json
84+
if (($installedDoctor.ffmpeg.avcodec -shr 16) -ne 63) { throw 'Installed native ABI mismatch' }
85+
if ((Get-FileHash -LiteralPath (Join-Path $installed 'facut_runtime/facut_bin/ffmpeg.exe')).Hash -ne (Get-FileHash -LiteralPath $ff).Hash) { throw 'Installed FFmpeg mismatch' }
86+
if ((Get-FileHash -LiteralPath (Join-Path $installed 'facut_runtime/facut_bin/ffprobe.exe')).Hash -ne (Get-FileHash -LiteralPath $fp).Hash) { throw 'Installed FFprobe mismatch' }
87+
foreach ($notice in @('THIRD_PARTY_NOTICES.md', 'FFMPEG_LICENSE.txt', 'FFMPEG_CLI_GPLv3.txt', 'FFMPEG_CLI_BUILD_LICENSE.txt')) {
88+
if (!(Test-Path -LiteralPath (Join-Path $installed $notice) -PathType Leaf)) { throw "Installed license missing: $notice" }
89+
}
90+
& $installedFacut --json native doctor

0 commit comments

Comments
 (0)