diff --git a/tools/osx-bundle.sh b/tools/osx-bundle.sh index 29e0fbfd9..813151a55 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/MacOS/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}\""