From 35ec0075cf906b2b9a021874839bd2763829f231 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 8 Jul 2014 00:23:36 -0700 Subject: [PATCH] Strip the binaries before signing them, in release configuration --- Xcode/SDL/pkg-support/codesign-frameworks.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Xcode/SDL/pkg-support/codesign-frameworks.sh b/Xcode/SDL/pkg-support/codesign-frameworks.sh index d27ef7d0c..1e184b08c 100755 --- a/Xcode/SDL/pkg-support/codesign-frameworks.sh +++ b/Xcode/SDL/pkg-support/codesign-frameworks.sh @@ -23,12 +23,19 @@ if [[ $RESULT != 0 ]] ; then exit 1 fi -echo "Found: ${FRAMEWORKS}" - for FRAMEWORK in $FRAMEWORKS; do + if [[ "$CONFIGURATION" = "Release" ]]; then + echo "Stripping '${FRAMEWORK}'" + NAME=$(basename "${FRAMEWORK}" .framework) + xcrun strip -x "${FRAMEWORK}/${NAME}" + RESULT=$? + if [[ $RESULT != 0 ]] ; then + exit 1 + fi + fi echo "Signing '${FRAMEWORK}'" - `codesign -f -v -s "${CODE_SIGN_IDENTITY}" "${FRAMEWORK}"` + codesign -f -v -s "${CODE_SIGN_IDENTITY}" "${FRAMEWORK}" RESULT=$? if [[ $RESULT != 0 ]] ; then exit 1