mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
b48e54aafe
Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
44 lines
1.1 KiB
Bash
Executable File
44 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# WARNING: You may have to run Clean in Xcode after changing CODE_SIGN_IDENTITY!
|
|
|
|
# Verify that $CODE_SIGN_IDENTITY is set
|
|
if [ -z "$CODE_SIGN_IDENTITY" ] ; then
|
|
echo "CODE_SIGN_IDENTITY needs to be non-empty for codesigning frameworks!"
|
|
|
|
if [ "$CONFIGURATION" = "Release" ] ; then
|
|
exit 1
|
|
else
|
|
# Codesigning is optional for non-release builds.
|
|
exit 0
|
|
fi
|
|
fi
|
|
|
|
FRAMEWORK_DIR="${TARGET_BUILD_DIR}"
|
|
|
|
# Loop through all frameworks
|
|
FRAMEWORKS=`find "${FRAMEWORK_DIR}" -type d -name "*.framework" | sort -r`
|
|
RESULT=$?
|
|
if [[ $RESULT != 0 ]] ; then
|
|
exit 1
|
|
fi
|
|
|
|
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}"
|
|
RESULT=$?
|
|
if [[ $RESULT != 0 ]] ; then
|
|
exit 1
|
|
fi
|
|
done
|