From eed7ad1e102f71a7d6057efdc014d42402aa4d2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Vasconcellos?= Date: Wed, 17 May 2023 19:43:12 +0000 Subject: [PATCH] Fix Spacedrive process being `Killed` during lauch on macOS (#825) Sign ffmpeg dylibs with macOS local certificate --- .github/scripts/setup-system.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/scripts/setup-system.sh b/.github/scripts/setup-system.sh index d8157e049..346abf0ef 100755 --- a/.github/scripts/setup-system.sh +++ b/.github/scripts/setup-system.sh @@ -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