From aac77049b33cca53504b3ea3a6cdbfca58fae913 Mon Sep 17 00:00:00 2001 From: tofuliang Date: Fri, 26 Jun 2026 23:16:22 +0800 Subject: [PATCH] fix(ci): fix VapourSynth dylib file existence check on macOS (#966) Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- scripts/copy_python_dep_osx.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/copy_python_dep_osx.sh b/scripts/copy_python_dep_osx.sh index 3b4ac43..8c8b2c1 100755 --- a/scripts/copy_python_dep_osx.sh +++ b/scripts/copy_python_dep_osx.sh @@ -1,5 +1,15 @@ #!/bin/sh -PYTHON_PATH=$(otool -L ./Supersonic.app/Contents/Frameworks/libvapoursynth-script.0.dylib | grep 'Python' | awk '{print $1}') -install_name_tool -change "$PYTHON_PATH" "@executable_path/../Frameworks/Python" "./Supersonic.app/Contents/Frameworks/libvapoursynth-script.0.dylib" -cp "$PYTHON_PATH" ./Supersonic.app/Contents/Frameworks +VAPOURSYNTH_LIB=./Supersonic.app/Contents/Frameworks/libvapoursynth-script.0.dylib + +# Check if VapourSynth library exists before processing +if [ ! -f "$VAPOURSYNTH_LIB" ]; then + echo "VapourSynth library not found, skipping Python dependency copy" + exit 0 +fi + +PYTHON_PATH=$(otool -L "$VAPOURSYNTH_LIB" | grep 'Python' | awk '{print $1}') +if [ -n "$PYTHON_PATH" ]; then + install_name_tool -change "$PYTHON_PATH" "@executable_path/../Frameworks/Python" "$VAPOURSYNTH_LIB" + cp "$PYTHON_PATH" ./Supersonic.app/Contents/Frameworks +fi