mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
fix(ci): bundle FFmpeg dylibs in macOS app artifact (#53)
dylibbundler misses Homebrew's FFmpeg libraries, causing a launch crash: Library not loaded: libavformat.62.12.100.dylib Add a manual copy block for libavformat, libavcodec, libavutil, libswscale, and libswresample — same pattern already used for Vulkan and OpenSSL. Applied to both build.yml and release.yml.
This commit is contained in:
parent
faf1d70c34
commit
70a0be9e79
2 changed files with 34 additions and 0 deletions
17
.github/workflows/build.yml
vendored
17
.github/workflows/build.yml
vendored
|
|
@ -235,6 +235,23 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# dylibbundler may miss Homebrew's FFmpeg libraries.
|
||||
# Copy libavformat, libavcodec, libavutil, and libswscale.
|
||||
FFMPEG_LIB_DIR="$(brew --prefix ffmpeg)/lib"
|
||||
for lib in "${FFMPEG_LIB_DIR}"/libavformat*.dylib \
|
||||
"${FFMPEG_LIB_DIR}"/libavcodec*.dylib \
|
||||
"${FFMPEG_LIB_DIR}"/libavutil*.dylib \
|
||||
"${FFMPEG_LIB_DIR}"/libswscale*.dylib \
|
||||
"${FFMPEG_LIB_DIR}"/libswresample*.dylib; do
|
||||
[ -e "${lib}" ] || continue
|
||||
cp -f "${lib}" Wowee.app/Contents/Frameworks/
|
||||
done
|
||||
|
||||
if ! ls Wowee.app/Contents/Frameworks/libavformat*.dylib >/dev/null 2>&1; then
|
||||
echo "Missing FFmpeg libavformat dylib(s) in app bundle Frameworks/" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Info.plist
|
||||
cat > Wowee.app/Contents/Info.plist << 'EOF'
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
|
|
|||
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
|
|
@ -210,6 +210,23 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# dylibbundler may miss Homebrew's FFmpeg libraries.
|
||||
# Copy libavformat, libavcodec, libavutil, and libswscale.
|
||||
FFMPEG_LIB_DIR="$(brew --prefix ffmpeg)/lib"
|
||||
for lib in "${FFMPEG_LIB_DIR}"/libavformat*.dylib \
|
||||
"${FFMPEG_LIB_DIR}"/libavcodec*.dylib \
|
||||
"${FFMPEG_LIB_DIR}"/libavutil*.dylib \
|
||||
"${FFMPEG_LIB_DIR}"/libswscale*.dylib \
|
||||
"${FFMPEG_LIB_DIR}"/libswresample*.dylib; do
|
||||
[ -e "${lib}" ] || continue
|
||||
cp -f "${lib}" Wowee.app/Contents/Frameworks/
|
||||
done
|
||||
|
||||
if ! ls Wowee.app/Contents/Frameworks/libavformat*.dylib >/dev/null 2>&1; then
|
||||
echo "Missing FFmpeg libavformat dylib(s) in app bundle Frameworks/" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Info.plist
|
||||
cat > Wowee.app/Contents/Info.plist << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue