diff --git a/Build-Dependencies.ps1 b/Build-Dependencies.ps1 index 5f7247cd6..ecd277e9c 100644 --- a/Build-Dependencies.ps1 +++ b/Build-Dependencies.ps1 @@ -122,7 +122,7 @@ function Package-Dependencies { switch ( $PackageName ) { ffmpeg { - Get-ChildItem ./bin/* -Include '*.exe','srt-ffplay' -Exclude 'ffmpeg.exe','ffprobe.exe' | Remove-Item -Force -Recurse + Get-ChildItem ./bin/* -Include '*.exe','srt-ffplay' -Exclude 'ffmpeg.exe','ffprobe.exe','ffmpeg_g.exe','ffprobe_g.exe' | Remove-Item -Force -Recurse Get-ChildItem ./lib -Exclude 'librist.lib','zlibstatic.lib','srt.lib','libx264.lib','mbed*.lib','everest.lib','p256m.lib','zlib.lib','datachannel.lib','cmake' | Remove-Item -Force -Recurse Get-ChildItem ./lib/cmake -Exclude 'LibDataChannel','MbedTLS' | Remove-Item -Force -Recurse Get-ChildItem ./share/* | Remove-Item -Force -Recurse diff --git a/deps.ffmpeg/99-ffmpeg.ps1 b/deps.ffmpeg/99-ffmpeg.ps1 index af5ae35a9..ecdf2fb47 100644 --- a/deps.ffmpeg/99-ffmpeg.ps1 +++ b/deps.ffmpeg/99-ffmpeg.ps1 @@ -68,7 +68,8 @@ function Configure { '--toolchain=msvc' ('--extra-cflags=' + "'-D_WINDLL -MD -D_WIN32_WINNT=0x0A00" + $(if ( $Target -eq 'arm64' ) { ' -D__ARM_PCS_VFP' }) + "'") ('--extra-cxxflags=' + "'-MD -D_WIN32_WINNT=0x0A00'") - ('--extra-ldflags=' + "'-APPCONTAINER:NO -MACHINE:${Target}'") + ('--extra-ldflags=' + "'-APPCONTAINER:NO -MACHINE:${Target} -DEBUG" + + $(if ( $Configuration -match '(Release|RelWithDebInfo|MinSizeRel)' ) { ' -OPT:REF -OPT:ICF -LTCG -INCREMENTAL:NO' }) + "'") $(if ( $Target -eq 'arm64' ) { '--as=armasm64.exe','--cpu=armv8' }) '--pkg-config=pkg-config' $(if ( $Target -ne 'x86' ) { '--target-os=win64' } else { '--target-os=win32' }) @@ -165,4 +166,9 @@ function Install { $env:VERBOSE = $(if ( $VerbosePreference -eq 'Continue' ) { '1' }) Invoke-DevShell @Params $Backup.GetEnumerator() | ForEach-Object { Set-Item -Path "env:\$($_.Key)" -Value $_.Value } + + Push-Location "build_${Target}" + Copy-Item 'ffmpeg_g.exe','ffprobe_g.exe' "$($script:ConfigData.OutputPath)/bin" + Get-ChildItem -Path '.' -Filter '*.pdb' -Recurse | Copy-Item -Destination "$($script:ConfigData.OutputPath)/bin" + Pop-Location }