From 29d98f94c1feabc1b960aa9a1af86180c51434d5 Mon Sep 17 00:00:00 2001 From: uncor3 Date: Mon, 1 Dec 2025 22:10:51 +0000 Subject: [PATCH] fix dmg deploy script --- scripts/deploy-dmg.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/scripts/deploy-dmg.sh b/scripts/deploy-dmg.sh index 7d75bd0..2a0972f 100755 --- a/scripts/deploy-dmg.sh +++ b/scripts/deploy-dmg.sh @@ -93,9 +93,29 @@ for lib in "${GST_LIBS[@]}"; do fi done -# Copy FFmpeg libavfilter +# Copy FFmpeg libraries FFMPEG_LIB_DIR="$(brew --prefix ffmpeg)/lib" -cp "${FFMPEG_LIB_DIR}"/libavfilter.*.dylib "${FRAMEWORKS_DIR}/" +FFMPEG_LIBS=( + "libavformat" + "libavcodec" + "libavutil" + "libswscale" + "libavfilter" +) + +for lib_base in "${FFMPEG_LIBS[@]}"; do + # Use find to get the full versioned filename + lib_path=$(find "${FFMPEG_LIB_DIR}" -name "${lib_base}.*.dylib" -print -quit) + if [ -f "$lib_path" ]; then + lib_name=$(basename "$lib_path") + cp "$lib_path" "${FRAMEWORKS_DIR}/" + #These maybe unneeded, macdeployqt already does this but just in case + install_name_tool -id "@rpath/${lib_name}" "${FRAMEWORKS_DIR}/${lib_name}" + echo "Copied and fixed rpath for ${lib_name}" + else + echo "Warning: ${lib_base} library not found in ${FFMPEG_LIB_DIR}" + fi +done macdeployqt "${APP_PATH}" -qmldir=qml -verbose=2