Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg: Generate and install pdb files when in debug or debug-optimized configuration #1165

Merged
merged 4 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions gvsbuild/patches/ffmpeg/build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,20 @@ configure_cmd[idx++]="--disable-postproc"
if [ "$build_type" = "debug" ]; then
configure_cmd[idx++]="--enable-debug"
# FIXME: the -Od and -Zi instructions are overriden in the compilation command
configure_cmd[idx++]="--extra-cflags=\"-Od -Zi -MDd\""
configure_cmd[idx++]="--extra-cflags=-MDd -Od -Zi"
else
configure_cmd[idx++]="--extra-cflags=-MD"
fi

if [ "$build_type" = "debug-optimized" ]; then
configure_cmd[idx++]="--extra-ldflags=-DEBUG:FULL"
configure_cmd[idx++]="--extra-cflags=-Zi"
fi

if [ "$enable_gpl" = "enable_gpl" ]; then
configure_cmd[idx++]="--enable-libx264"
configure_cmd[idx++]="--enable-gpl"
configure_cmd[idx++]="--enable-encoder=\"libx264\""
configure_cmd[idx++]="--enable-encoder=libx264"
fi

export PKG_CONFIG_PATH=$gtk_dir/lib/pkgconfig:$PKG_CONFIG_PATH
Expand Down
12 changes: 11 additions & 1 deletion gvsbuild/projects/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,29 @@ def __init__(self):
self.add_dependency("x264")

def build(self):
configuration = (
"debug-optimized"
if self.opts.release_configuration_is_actually_debug_optimized
else self.opts.configuration
)
msys_path = Project.get_tool_path("msys2")
self.exec_vs(
r"%s\bash build\build.sh %s %s %s %s"
% (
msys_path,
convert_to_msys(self.pkg_dir),
convert_to_msys(self.builder.gtk_dir),
self.builder.opts.configuration,
configuration,
"enable_gpl" if self.opts.ffmpeg_enable_gpl else "disable_gpl",
),
add_path=msys_path,
)

if configuration in ["debug-optimized", "debug"]:
self.install(r".\libavcodec\avcodec-60.pdb bin")
self.install(r".\libavutil\avutil-58.pdb bin")
self.install(r".\libswscale\libswscale-7.pdb bin")

self.install(r".\COPYING.LGPLv2.1 " r".\COPYING.LGPLv3 " r"share\doc\ffmpeg")
if self.opts.ffmpeg_enable_gpl:
self.install(r".\COPYING.GPLv2 " r"share\doc\ffmpeg")
Expand Down