Strip the binaries before signing them, in release configuration
authorSam Lantinga <slouken@libsdl.org>
Tue, 08 Jul 2014 00:23:36 -0700
changeset 8997 9e23a50a63f7
parent 8996 b8147002c991
child 8998 995f6cd966a7
Strip the binaries before signing them, in release configuration
Xcode/SDL/pkg-support/codesign-frameworks.sh
--- a/Xcode/SDL/pkg-support/codesign-frameworks.sh	Mon Jul 07 23:48:21 2014 -0700
+++ b/Xcode/SDL/pkg-support/codesign-frameworks.sh	Tue Jul 08 00:23:36 2014 -0700
@@ -23,12 +23,19 @@
     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