diff --git a/iosbuild.sh b/iosbuild.sh index e4031de0..044745f0 100755 --- a/iosbuild.sh +++ b/iosbuild.sh @@ -1,8 +1,9 @@ #!/bin/bash # -# This script generates 'WebP.framework' and 'WebPDecoder.framework'. An iOS -# app can decode WebP images by including 'WebPDecoder.framework' and both -# encode and decode WebP images by including 'WebP.framework'. +# This script generates 'WebP.framework' and 'WebPDecoder.framework', +# 'WebPDemux.framework' and 'WebPMux.framework'. +# An iOS app can decode WebP images by including 'WebPDecoder.framework' and +# both encode and decode WebP images by including 'WebP.framework'. # # Run ./iosbuild.sh to generate the frameworks under the current directory # (the previous build will be erased if it exists). @@ -50,13 +51,27 @@ if [[ -z "${SDK}" ]]; then exit 1 elif [[ ${SDK%%.*} -gt 8 ]]; then EXTRA_CFLAGS="-fembed-bitcode" -elif [[ ${SDK} < 6.0 ]]; then +elif [[ ${SDK%%.*} -le 6 ]]; then echo "You need iOS SDK version 6.0 or above" exit 1 -else - echo "iOS SDK Version ${SDK}" fi +echo "Xcode Version: ${XCODE}" +echo "iOS SDK Version: ${SDK}" + +if [[ -e "${BUILDDIR}" || -e "${TARGETDIR}" || -e "${DECTARGETDIR}" \ + || -e "${MUXTARGETDIR}" || -e "${DEMUXTARGETDIR}" ]]; then + cat << EOF +WARNING: The following directories will be deleted: +WARNING: ${BUILDDIR} +WARNING: ${TARGETDIR} +WARNING: ${DECTARGETDIR} +WARNING: ${MUXTARGETDIR} +WARNING: ${DEMUXTARGETDIR} +WARNING: The build will continue in 5 seconds... +EOF + sleep 5 +fi rm -rf ${BUILDDIR} ${TARGETDIR} ${DECTARGETDIR} \ ${MUXTARGETDIR} ${DEMUXTARGETDIR} mkdir -p ${BUILDDIR} ${TARGETDIR}/Headers/ ${DECTARGETDIR}/Headers/ \ @@ -64,12 +79,12 @@ mkdir -p ${BUILDDIR} ${TARGETDIR}/Headers/ ${DECTARGETDIR}/Headers/ \ if [[ ! -e ${SRCDIR}/configure ]]; then if ! (cd ${SRCDIR} && sh autogen.sh); then - cat <