Fix Spacedrive process being Killed during lauch on macOS (#825)

Sign ffmpeg dylibs with macOS local certificate
This commit is contained in:
Vítor Vasconcellos
2023-05-17 19:43:12 +00:00
committed by GitHub
parent dda7516980
commit eed7ad1e10

View File

@@ -312,8 +312,15 @@ elif [ "$SYSNAME" = "Darwin" ]; then
sleep 1
done
# Symlink the FFMpeg.framework libs to the lib directory
# Sign and Symlink the FFMpeg.framework libs to the lib directory
for _lib in "${_frameworks_dir}/FFMpeg.framework/Libraries/"*; do
if [ -f "$_lib" ]; then
# Sign the lib with the local machine certificate (Required for it to work on macOS 13+)
if ! codesign -s - -f "$_lib" 1>/dev/null 2>&1; then
err "Failed to sign: ${_lib#"$_frameworks_dir"}" \
'Please open an issue on https://github.com/spacedriveapp/spacedrive/issues'
fi
fi
_lib="${_lib#"${_frameworks_dir}/FFMpeg.framework/Libraries/"}"
ln -s "../FFMpeg.framework/Libraries/${_lib}" "${_frameworks_dir}/lib/${_lib}"
done