From 7eb1304a55398d771079a7ca7bdb0e2b2cbfef24 Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Sun, 15 Oct 2023 17:11:18 +0200 Subject: [PATCH] osx: Sign executable and libraries after bundling --- tools/osx-bundle.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/osx-bundle.sh b/tools/osx-bundle.sh index 29e0fbfd97..2fe8dd9ad6 100755 --- a/tools/osx-bundle.sh +++ b/tools/osx-bundle.sh @@ -105,5 +105,14 @@ echo echo "---- Fixing libraries ----" sudo python3 "${SRC_DIR}/tools/osx-fix-libs.py" "${PKG_DIR}/Contents/MacOS/aegisub" || exit $? +echo +echo "---- Resigning ----" +# After bundling and rewriting dylib paths we need to resign everything. +if codesign -d "${PKG_DIR}/Contents/MacoOS/aegisub"; then + for fname in "${PKG_DIR}/Contents/MacOS/"*; do + codesign -s ${AEGISUB_BUNDLE_SIGNATURE:--} -vf "${fname}" + done +fi + echo echo "Done creating \"${PKG_DIR}\""