ios ssl build: do sdk detection before download
This commit is contained in:
parent
e30d6109bc
commit
27d8844fab
@ -7,6 +7,7 @@
|
|||||||
#
|
#
|
||||||
# This script will download and build openssl for iOS (armv7, armv7s) and simulator (i386)
|
# This script will download and build openssl for iOS (armv7, armv7s) and simulator (i386)
|
||||||
|
|
||||||
|
# Settings and definitions
|
||||||
OPENSSLVERSION="1.0.0e"
|
OPENSSLVERSION="1.0.0e"
|
||||||
MD5SUM="7040b89c4c58c7a1016c0dfa6e821c86"
|
MD5SUM="7040b89c4c58c7a1016c0dfa6e821c86"
|
||||||
OPENSSLPATCH="OpenSSL-iFreeRDP.diff"
|
OPENSSLPATCH="OpenSSL-iFreeRDP.diff"
|
||||||
@ -19,14 +20,7 @@ MAKEOPTS="-j $CORES"
|
|||||||
MAKEOPTS=""
|
MAKEOPTS=""
|
||||||
INSTALLDIR="external"
|
INSTALLDIR="external"
|
||||||
|
|
||||||
if [ $# -gt 0 ];then
|
# Functions
|
||||||
INSTALLDIR=$1
|
|
||||||
if [ ! -d $INSTALLDIR ];then
|
|
||||||
echo "Install directory \"$INSTALLDIR\" does not exist"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
function buildArch(){
|
function buildArch(){
|
||||||
ARCH=$1
|
ARCH=$1
|
||||||
LOGFILE="BuildLog.darwin-${ARCH}.txt"
|
LOGFILE="BuildLog.darwin-${ARCH}.txt"
|
||||||
@ -40,6 +34,31 @@ function buildArch(){
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# main
|
||||||
|
if [ $# -gt 0 ];then
|
||||||
|
INSTALLDIR=$1
|
||||||
|
if [ ! -d $INSTALLDIR ];then
|
||||||
|
echo "Install directory \"$INSTALLDIR\" does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Detecting SDKs..."
|
||||||
|
OLDEST_OS_SDK=`ls -1 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs | sort -n | head -1`
|
||||||
|
if [ "x${OLDEST_OS_SDK}" == "x" ];then
|
||||||
|
echo "No iPhoneOS SDK found"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
echo "Using iPhoneOS SDK: ${OLDEST_OS_SDK}"
|
||||||
|
|
||||||
|
OLDEST_SIM_SDK=`ls -1 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs | sort -n | head -1`
|
||||||
|
if [ "x${OLDEST_SIM_SDK}" == "x" ];then
|
||||||
|
echo "No iPhoneSimulator SDK found"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
echo "Using iPhoneSimulator SDK: ${OLDEST_SIM_SDK}"
|
||||||
|
echo
|
||||||
|
|
||||||
cd $INSTALLDIR
|
cd $INSTALLDIR
|
||||||
if [ ! -d openssl ];then
|
if [ ! -d openssl ];then
|
||||||
mkdir openssl
|
mkdir openssl
|
||||||
@ -72,21 +91,6 @@ fi
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
echo "Applying iFreeRDP patch ..."
|
echo "Applying iFreeRDP patch ..."
|
||||||
OLDEST_OS_SDK=`ls -1 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs | sort -n | head -1`
|
|
||||||
if [ "x${OLDEST_OS_SDK}" == "x" ];then
|
|
||||||
echo "No iPhoneOS SDK found"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
echo "Using iPhoneOS SDK: ${OLDEST_OS_SDK}"
|
|
||||||
|
|
||||||
OLDEST_SIM_SDK=`ls -1 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs | sort -n | head -1`
|
|
||||||
if [ "x${OLDEST_SIM_SDK}" == "x" ];then
|
|
||||||
echo "No iPhoneSimulator SDK found"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
echo "Using iPhoneSimulator SDK: ${OLDEST_SIM_SDK}"
|
|
||||||
echo
|
|
||||||
|
|
||||||
cd "openssl-$OPENSSLVERSION"
|
cd "openssl-$OPENSSLVERSION"
|
||||||
cp ${SCRIPTDIR}/${OPENSSLPATCH} .
|
cp ${SCRIPTDIR}/${OPENSSLPATCH} .
|
||||||
sed -ie "s#__ISIMSDK__#${OLDEST_SIM_SDK}#" ${OPENSSLPATCH}
|
sed -ie "s#__ISIMSDK__#${OLDEST_SIM_SDK}#" ${OPENSSLPATCH}
|
||||||
|
Loading…
Reference in New Issue
Block a user