diff --git a/README.md b/README.md index 7d5417c..ae2392b 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,8 @@ burning subtitles, video stabilisation, pipe operations and concurrent command e `FFmpegKit` is licensed under the `LGPL v3.0`. However, if source code is built using the optional `--enable-gpl` flag or prebuilt binaries with `-gpl` postfix are used, then `FFmpegKit` is subject to the `GPL v3.0` license. +See the [License](https://github.com/tanersener/ffmpeg-kit/wiki/License) wiki page for the details. + ### 14. Patents It is not clearly explained in their documentation, but it is believed that `FFmpeg`, `kvazaar`, `x264` and `x265` diff --git a/ios.sh b/ios.sh index 7a11101..db756e7 100755 --- a/ios.sh +++ b/ios.sh @@ -19,7 +19,6 @@ source "${BASEDIR}"/scripts/function-${FFMPEG_KIT_BUILD_TYPE}.sh # SET DEFAULTS SETTINGS enable_default_ios_architectures -enable_main_build # SELECT XCODE VERSION USED FOR BUILDING XCODE_FOR_FFMPEG_KIT=$(ls ~/.xcode.for.ffmpeg.kit.sh 2>>"${BASEDIR}"/build.log) @@ -28,7 +27,7 @@ if [[ -f ${XCODE_FOR_FFMPEG_KIT} ]]; then fi # DETECT IOS SDK VERSION -DETECTED_IOS_SDK_VERSION="$(xcrun --sdk iphoneos --show-sdk-version 2>>${BASEDIR}/build.log)" +export DETECTED_IOS_SDK_VERSION="$(xcrun --sdk iphoneos --show-sdk-version 2>>${BASEDIR}/build.log)" echo -e "\nINFO: Using SDK ${DETECTED_IOS_SDK_VERSION} by Xcode provided at $(xcode-select -p)\n" 1>>"${BASEDIR}"/build.log 2>&1 echo -e "INFO: Build options: $*\n" 1>>"${BASEDIR}"/build.log 2>&1 @@ -45,6 +44,9 @@ if [[ -z ${BUILD_VERSION} ]]; then exit 1 fi +# MAIN BUILDS ENABLED BY DEFAULT +enable_main_build + # PROCESS LTS BUILD OPTION FIRST AND SET BUILD TYPE: MAIN OR LTS for argument in "$@"; do if [[ "$argument" == "-l" ]] || [[ "$argument" == "--lts" ]]; then @@ -163,33 +165,31 @@ fi disable_ios_architecture_not_supported_on_detected_sdk_version "${ARCH_ARMV7}" disable_ios_architecture_not_supported_on_detected_sdk_version "${ARCH_ARMV7S}" disable_ios_architecture_not_supported_on_detected_sdk_version "${ARCH_I386}" +disable_ios_architecture_not_supported_on_detected_sdk_version "${ARCH_ARM64E}" +disable_ios_architecture_not_supported_on_detected_sdk_version "${ARCH_X86_64_MAC_CATALYST}" +disable_ios_architecture_not_supported_on_detected_sdk_version "${ARCH_ARM64_MAC_CATALYST}" +disable_ios_architecture_not_supported_on_detected_sdk_version "${ARCH_ARM64_SIMULATOR}" # CHECK SOME RULES FOR .framework BUNDLES -# 1. DISABLE arm64-mac-catalyst WHEN arm64 IS ENABLED IN framework BUNDLES -if [[ -z ${FFMPEG_KIT_XCF_BUILD} ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_ARM64}]} -eq 1 ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_ARM64_MAC_CATALYST}]} -eq 1 ]]; then - echo -e "INFO: Disabled arm64-mac-catalyst architecture which can not co-exist with arm64 in the same framework bundle.\n" 1>>"${BASEDIR}"/build.log 2>&1 +# 1. DISABLE arm64-mac-catalyst IN framework BUNDLES +if [[ -z ${FFMPEG_KIT_XCF_BUILD} ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_ARM64_MAC_CATALYST}]} -eq 1 ]]; then + echo -e "INFO: Disabled arm64-mac-catalyst architecture which cannot exist in a framework bundle.\n" 1>>"${BASEDIR}"/build.log 2>&1 disable_arch "arm64-mac-catalyst" fi -# 2. DISABLE arm64-simulator WHEN arm64 IS ENABLED IN framework BUNDLES -if [[ -z ${FFMPEG_KIT_XCF_BUILD} ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_ARM64}]} -eq 1 ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_ARM64_SIMULATOR}]} -eq 1 ]]; then - echo -e "INFO: Disabled arm64-simulator architecture which can not co-exist with arm64 in the same framework bundle.\n" 1>>"${BASEDIR}"/build.log 2>&1 - disable_arch "arm64-simulator" +# 2. DISABLE x86-64-mac-catalyst IN framework BUNDLES +if [[ -z ${FFMPEG_KIT_XCF_BUILD} ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_X86_64_MAC_CATALYST}]} -eq 1 ]]; then + echo -e "INFO: Disabled x86-64-mac-catalyst architecture which cannot exist in a framework bundle.\n" 1>>"${BASEDIR}"/build.log 2>&1 + disable_arch "x86-64-mac-catalyst" fi -# 3. DISABLE arm64-simulator WHEN arm64-mac-catalyst IS ENABLED IN framework BUNDLES -if [[ -z ${FFMPEG_KIT_XCF_BUILD} ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_ARM64_MAC_CATALYST}]} -eq 1 ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_ARM64_SIMULATOR}]} -eq 1 ]]; then - echo -e "INFO: Disabled arm64-simulator architecture which can not co-exist with arm64-mac-catalyst in the same framework bundle.\n" 1>>"${BASEDIR}"/build.log 2>&1 +# 3. DISABLE arm64-simulator WHEN arm64 IS ENABLED IN framework BUNDLES +if [[ -z ${FFMPEG_KIT_XCF_BUILD} ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_ARM64}]} -eq 1 ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_ARM64_SIMULATOR}]} -eq 1 ]]; then + echo -e "INFO: Disabled arm64-simulator architecture which cannot co-exist with arm64 in the same framework bundle.\n" 1>>"${BASEDIR}"/build.log 2>&1 disable_arch "arm64-simulator" fi -# 4. DISABLE x86-64-mac-catalyst WHEN x86-64 IS ENABLED IN framework BUNDLES -if [[ -z ${FFMPEG_KIT_XCF_BUILD} ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_X86_64}]} -eq 1 ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_X86_64_MAC_CATALYST}]} -eq 1 ]]; then - echo -e "INFO: Disabled x86-64-mac-catalyst architecture which can not co-exist with x86-64 in the same framework bundle.\n" 1>>"${BASEDIR}"/build.log 2>&1 - disable_arch "x86-64-mac-catalyst" -fi - echo -e "\nBuilding ffmpeg-kit ${BUILD_TYPE_ID}shared library for iOS\n" echo -e -n "INFO: Building ffmpeg-kit ${BUILD_VERSION} ${BUILD_TYPE_ID}for iOS: " 1>>"${BASEDIR}"/build.log 2>&1 echo -e "$(date)\n" 1>>"${BASEDIR}"/build.log 2>&1 diff --git a/macos.sh b/macos.sh index fce67fa..988ae64 100755 --- a/macos.sh +++ b/macos.sh @@ -19,7 +19,6 @@ source "${BASEDIR}"/scripts/function-${FFMPEG_KIT_BUILD_TYPE}.sh # SET DEFAULTS SETTINGS enable_default_macos_architectures -enable_main_build # SELECT XCODE VERSION USED FOR BUILDING XCODE_FOR_FFMPEG_KIT=$(ls ~/.xcode.for.ffmpeg.kit.sh 2>>"${BASEDIR}"/build.log) @@ -28,7 +27,7 @@ if [[ -f ${XCODE_FOR_FFMPEG_KIT} ]]; then fi # DETECT MACOS SDK VERSION -DETECTED_MACOS_SDK_VERSION="$(xcrun --sdk macosx --show-sdk-version 2>>${BASEDIR}/build.log)" +export DETECTED_MACOS_SDK_VERSION="$(xcrun --sdk macosx --show-sdk-version 2>>${BASEDIR}/build.log)" echo -e "\nINFO: Using SDK ${DETECTED_MACOS_SDK_VERSION} by Xcode provided at $(xcode-select -p)\n" 1>>"${BASEDIR}"/build.log 2>&1 echo -e "\nINFO: Build options: $*\n" 1>>"${BASEDIR}"/build.log 2>&1 @@ -45,6 +44,9 @@ if [[ -z ${BUILD_VERSION} ]]; then exit 1 fi +# MAIN BUILDS ENABLED BY DEFAULT +enable_main_build + # PROCESS LTS BUILD OPTION FIRST AND SET BUILD TYPE: MAIN OR LTS for argument in "$@"; do if [[ "$argument" == "-l" ]] || [[ "$argument" == "--lts" ]]; then @@ -154,6 +156,9 @@ if [[ -n ${DISPLAY_HELP} ]]; then exit 0 fi +# DISABLE NOT SUPPORTED ARCHITECTURES +disable_macos_architecture_not_supported_on_detected_sdk_version "${ARCH_ARM64}" + echo -e "\nBuilding ffmpeg-kit ${BUILD_TYPE_ID}shared library for macOS\n" echo -e -n "INFO: Building ffmpeg-kit ${BUILD_VERSION} ${BUILD_TYPE_ID}for macOS: " 1>>"${BASEDIR}"/build.log 2>&1 echo -e "$(date)\n" 1>>"${BASEDIR}"/build.log 2>&1 diff --git a/scripts/apple/ffmpeg.sh b/scripts/apple/ffmpeg.sh index 4d50268..e24bebf 100755 --- a/scripts/apple/ffmpeg.sh +++ b/scripts/apple/ffmpeg.sh @@ -476,6 +476,7 @@ ${SED_INLINE} "s/\$version/$FFMPEG_VERSION/g" "${BASEDIR}"/src/"${LIB_NAME}"/ffb --ranlib="${RANLIB}" \ --strip="${STRIP}" \ --nm="${NM}" \ + --extra-ldflags="$(get_min_version_cflags)" \ --disable-autodetect \ --enable-cross-compile \ --enable-pic \ diff --git a/scripts/apple/gnutls.sh b/scripts/apple/gnutls.sh index 523f70d..6a1ac91 100755 --- a/scripts/apple/gnutls.sh +++ b/scripts/apple/gnutls.sh @@ -56,4 +56,8 @@ make -j$(get_cpu_count) || return 1 make install || return 1 # CREATE PACKAGE CONFIG MANUALLY -create_gnutls_package_config "3.6.15.1" || return 1 +if [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then + create_gnutls_package_config "3.6.15.1" "-framework Security" || return 1 +else + create_gnutls_package_config "3.6.15.1" || return 1 +fi diff --git a/scripts/apple/libaom.sh b/scripts/apple/libaom.sh index 28daa98..3b7347c 100755 --- a/scripts/apple/libaom.sh +++ b/scripts/apple/libaom.sh @@ -10,7 +10,7 @@ arm*) ASM_OPTIONS="-DCONFIG_RUNTIME_CPU_DETECT=0 -DARCH_ARM=1 -DENABLE_NEON=1 -DHAVE_NEON=1" ;; i386) - ASM_OPTIONS="-DARCH_X86=1 -DENABLE_SSE=1 -DHAVE_SSE=1 -DENABLE_SSE3=1 -DHAVE_SSE3=1" + ASM_OPTIONS="-DARCH_X86=1 -DENABLE_SSE=0 -DHAVE_SSE=0 -DENABLE_SSE3=0 -DHAVE_SSE3=0" ;; x86-64*) ASM_OPTIONS="-DARCH_X86_64=0 -DENABLE_SSE=0 -DENABLE_SSE2=0 -DENABLE_SSE3=0 -DENABLE_SSE4_1=0 -DENABLE_SSE4_2=0 -DENABLE_MMX=0" diff --git a/scripts/apple/openh264.sh b/scripts/apple/openh264.sh index 77721f9..1ce66c7 100755 --- a/scripts/apple/openh264.sh +++ b/scripts/apple/openh264.sh @@ -1,5 +1,22 @@ #!/bin/bash +get_local_asm_arch() { + case ${ARCH} in + armv7*) + echo "arm" + ;; + arm64*) + echo "arm64" + ;; + x86-64*) + echo "x86_64" + ;; + *) + echo "${ARCH}" + ;; + esac +} + # UPDATE BUILD FLAGS AND SET BUILD OPTIONS ASM_OPTIONS="OS=darwin" case ${ARCH} in @@ -14,19 +31,22 @@ arm64*) ;; esac +# ALWAYS CLEAN THE PREVIOUS BUILD +make clean 2>/dev/null 1>/dev/null + +# DISCARD APPLE WORKAROUNDS +git checkout "${BASEDIR}"/src/"${LIB_NAME}"/build || return 1 +git checkout "${BASEDIR}"/src/"${LIB_NAME}"/codec || return 1 + # MAKE SURE THAT ASM IS ENABLED FOR ALL IOS ARCHITECTURES - EXCEPT x86-64 ${SED_INLINE} 's/arm64 aarch64/arm64% aarch64/g' ${BASEDIR}/src/${LIB_NAME}/build/arch.mk ${SED_INLINE} 's/%86 x86_64,/%86 x86_64 x86-64%,/g' ${BASEDIR}/src/${LIB_NAME}/build/arch.mk ${SED_INLINE} 's/filter-out arm64,/filter-out arm64%,/g' ${BASEDIR}/src/${LIB_NAME}/build/arch.mk ${SED_INLINE} 's/CFLAGS += -DHAVE_NEON/#CFLAGS += -DHAVE_NEON/g' ${BASEDIR}/src/${LIB_NAME}/build/arch.mk ${SED_INLINE} 's/ifeq (\$(ASM_ARCH), arm64)/ifneq (\$(filter arm64%, \$(ASM_ARCH)),)/g' ${BASEDIR}/src/${LIB_NAME}/codec/common/targets.mk -${SED_INLINE} 's/ifeq (\$(ASM_ARCH), arm)/ifneq (\$(filter armv%, \$(ASM_ARCH)),)/g' ${BASEDIR}/src/${LIB_NAME}/codec/common/targets.mk - -# ALWAYS CLEAN THE PREVIOUS BUILD -make clean 2>/dev/null 1>/dev/null make -j$(get_cpu_count) \ - ASM_ARCH="$(get_target_cpu)" \ + ASM_ARCH="$(get_local_asm_arch)" \ ARCH="${ARCH}" \ CC="${CC}" \ CFLAGS="$CFLAGS" \ diff --git a/scripts/apple/x265.sh b/scripts/apple/x265.sh index 68bf268..4cf5159 100755 --- a/scripts/apple/x265.sh +++ b/scripts/apple/x265.sh @@ -30,6 +30,18 @@ ${SED_INLINE} 's/lsr 16/lsr #16/g' ${BASEDIR}/src/x265/source/common/arm/blockco ${SED_INLINE} 's/function x265_/function _x265_/g' ${BASEDIR}/src/x265/source/common/arm/*.S ${SED_INLINE} 's/ x265_/ _x265_/g' ${BASEDIR}/src/x265/source/common/arm/pixel-util.S +# fixing relocation errors +${SED_INLINE} 's/sad12_mask:/sad12_mask_bytes:/g' ${BASEDIR}/src/x265/source/common/arm/sad-a.S +${SED_INLINE} 's/g_lumaFilter:/g_lumaFilter_bytes:/g' ${BASEDIR}/src/x265/source/common/arm/ipfilter8.S +${SED_INLINE} 's/g_chromaFilter:/g_chromaFilter_bytes:/g' ${BASEDIR}/src/x265/source/common/arm/ipfilter8.S +${SED_INLINE} 's/\.text/.equ sad12_mask, .-sad12_mask_bytes\ +\ +.text/g' ${BASEDIR}/src/x265/source/common/arm/sad-a.S +${SED_INLINE} 's/\.text/.equ g_lumaFilter, .-g_lumaFilter_bytes\ +.equ g_chromaFilter, .-g_chromaFilter_bytes\ +\ +.text/g' ${BASEDIR}/src/x265/source/common/arm/ipfilter8.S + # WORKAROUND TO USE A CUSTOM BUILD FILE overwrite_file "${BASEDIR}"/tools/patch/cmake/x265/CMakeLists.txt "${BASEDIR}"/src/"${LIB_NAME}"/source/CMakeLists.txt || return 1 diff --git a/scripts/function-apple.sh b/scripts/function-apple.sh index b49cde0..e7f2f22 100755 --- a/scripts/function-apple.sh +++ b/scripts/function-apple.sh @@ -5,7 +5,7 @@ source "${BASEDIR}/scripts/function.sh" export FFMPEG_LIBS=("libavcodec" "libavdevice" "libavfilter" "libavformat" "libavutil" "libswresample" "libswscale") get_ffmpeg_kit_version() { - local FFMPEG_KIT_VERSION=$(grep 'const FFMPEG_KIT_VERSION' "${BASEDIR}"/apple/src/FFmpegKit.m | grep -Eo '\".*\"' | sed -e 's/\"//g') + local FFMPEG_KIT_VERSION=$(grep 'const FFmpegKitVersion' "${BASEDIR}"/apple/src/FFmpegKitConfig.m | grep -Eo '\".*\"' | sed -e 's/\"//g') if [[ -z ${FFMPEG_KIT_LTS_BUILD} ]]; then echo "${FFMPEG_KIT_VERSION}" @@ -48,7 +48,7 @@ disable_ios_architecture_not_supported_on_detected_sdk_version() { x86-64-mac-catalyst) # INTRODUCED IN IOS SDK 13.0 - if [[ $(compare_versions "$MAC_CATALYST_MIN_VERSION" "13.0") -ge 1 ]]; then + if [[ $(compare_versions "$DETECTED_IOS_SDK_VERSION" "13.0") -ge 1 ]]; then local SUPPORTED=1 else local SUPPORTED=0 @@ -57,7 +57,7 @@ disable_ios_architecture_not_supported_on_detected_sdk_version() { arm64-mac-catalyst) # INTRODUCED IN IOS SDK 14.0 - if [[ $(compare_versions "$MAC_CATALYST_MIN_VERSION" "14.0") -ge 1 ]]; then + if [[ $(compare_versions "$DETECTED_IOS_SDK_VERSION" "14.0") -ge 1 ]]; then local SUPPORTED=1 else local SUPPORTED=0 @@ -66,7 +66,7 @@ disable_ios_architecture_not_supported_on_detected_sdk_version() { arm64-simulator) # INTRODUCED IN IOS SDK 14.0 - if [[ $(compare_versions "$IOS_MIN_VERSION" "14.0") -ge 1 ]]; then + if [[ $(compare_versions "$DETECTED_IOS_SDK_VERSION" "14.0") -ge 1 ]]; then local SUPPORTED=1 else local SUPPORTED=0 @@ -79,7 +79,7 @@ disable_ios_architecture_not_supported_on_detected_sdk_version() { if [[ ${SUPPORTED} -ne 1 ]]; then if [[ -z ${BUILD_FORCE} ]]; then - echo -e "INFO: Disabled ${ARCH_NAME} architecture which is not supported on iOS SDK $IOS_MIN_VERSION and Mac Catalyst $MAC_CATALYST_MIN_VERSION\n" 1>>"${BASEDIR}"/build.log 2>&1 + echo -e "INFO: Disabled ${ARCH_NAME} architecture which is not supported with Min iOS Target $IOS_MIN_VERSION and Min Mac Catalyst Target $MAC_CATALYST_MIN_VERSION on iOS SDK $DETECTED_IOS_SDK_VERSION\n" 1>>"${BASEDIR}"/build.log 2>&1 disable_arch "${ARCH_NAME}" fi fi @@ -95,7 +95,7 @@ disable_tvos_architecture_not_supported_on_detected_sdk_version() { arm64-simulator) # INTRODUCED IN TVOS SDK 14.0 - if [[ $(compare_versions "$TVOS_MIN_VERSION" "14.0") -ge 1 ]]; then + if [[ $(compare_versions "$DETECTED_TVOS_SDK_VERSION" "14.0") -ge 1 ]]; then local SUPPORTED=1 else local SUPPORTED=0 @@ -108,7 +108,7 @@ disable_tvos_architecture_not_supported_on_detected_sdk_version() { if [[ ${SUPPORTED} -ne 1 ]]; then if [[ -z ${BUILD_FORCE} ]]; then - echo -e "INFO: Disabled ${ARCH_NAME} architecture which is not supported on tvOS SDK $TVOS_MIN_VERSION\n" 1>>"${BASEDIR}"/build.log 2>&1 + echo -e "INFO: Disabled ${ARCH_NAME} architecture which is not supported on tvOS SDK $DETECTED_TVOS_SDK_VERSION\n" 1>>"${BASEDIR}"/build.log 2>&1 disable_arch "${ARCH_NAME}" fi fi @@ -124,7 +124,7 @@ disable_macos_architecture_not_supported_on_detected_sdk_version() { arm64) # INTRODUCED IN MACOS SDK 11.0 - if [[ $(compare_versions "$MACOS_MIN_VERSION" "11.0") -ge 1 ]]; then + if [[ $(compare_versions "$DETECTED_MACOS_SDK_VERSION" "11.0") -ge 1 ]]; then local SUPPORTED=1 else local SUPPORTED=0 @@ -137,7 +137,7 @@ disable_macos_architecture_not_supported_on_detected_sdk_version() { if [[ ${SUPPORTED} -ne 1 ]]; then if [[ -z ${BUILD_FORCE} ]]; then - echo -e "INFO: Disabled ${ARCH_NAME} architecture which is not supported on macOS SDK $MACOS_MIN_VERSION\n" 1>>"${BASEDIR}"/build.log 2>&1 + echo -e "INFO: Disabled ${ARCH_NAME} architecture which is not supported on macOS SDK $DETECTED_MACOS_SDK_VERSION\n" 1>>"${BASEDIR}"/build.log 2>&1 disable_arch "${ARCH_NAME}" fi fi @@ -199,7 +199,7 @@ create_ffmpeg_universal_library() { local ARCHITECTURE_VARIANT="$1" local TARGET_ARCHITECTURES=("$(get_apple_architectures_for_variant "${ARCHITECTURE_VARIANT}")") local LIBRARY_NAME="ffmpeg" - local UNIVERSAL_LIBRARY_DIRECTORY="${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCHITECTURE_VARIANT}")" + local UNIVERSAL_LIBRARY_DIRECTORY="${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCHITECTURE_VARIANT}")" local FFMPEG_UNIVERSAL_LIBRARY_DIRECTORY="${UNIVERSAL_LIBRARY_DIRECTORY}/${LIBRARY_NAME}" local LIPO="$(xcrun --sdk "$(get_default_sdk_name)" -f lipo)" @@ -269,7 +269,7 @@ create_ffmpeg_kit_universal_library() { local ARCHITECTURE_VARIANT="$1" local TARGET_ARCHITECTURES=("$(get_apple_architectures_for_variant "${ARCHITECTURE_VARIANT}")") local LIBRARY_NAME="ffmpeg-kit" - local UNIVERSAL_LIBRARY_DIRECTORY="${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCHITECTURE_VARIANT}")" + local UNIVERSAL_LIBRARY_DIRECTORY="${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCHITECTURE_VARIANT}")" local FFMPEG_KIT_UNIVERSAL_LIBRARY_DIRECTORY="${UNIVERSAL_LIBRARY_DIRECTORY}/${LIBRARY_NAME}" local LIPO="$(xcrun --sdk "$(get_default_sdk_name)" -f lipo)" @@ -322,7 +322,7 @@ create_ffmpeg_kit_universal_library() { create_ffmpeg_framework() { local ARCHITECTURE_VARIANT="$1" local LIBRARY_NAME="ffmpeg" - local UNIVERSAL_LIBRARY_DIRECTORY="${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCHITECTURE_VARIANT}")" + local UNIVERSAL_LIBRARY_DIRECTORY="${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCHITECTURE_VARIANT}")" local FFMPEG_UNIVERSAL_LIBRARY_PATH="${UNIVERSAL_LIBRARY_DIRECTORY}/${LIBRARY_NAME}" if [[ $(is_apple_architecture_variant_supported "${ARCHITECTURE_VARIANT}") -eq 0 ]]; then @@ -341,35 +341,68 @@ create_ffmpeg_framework() { # INITIALIZE FRAMEWORK DIRECTORY local FFMPEG_LIB_FRAMEWORK_PATH="${BASEDIR}/prebuilt/$(get_framework_directory "${ARCHITECTURE_VARIANT}")/${FFMPEG_LIB}.framework" initialize_folder "${FFMPEG_LIB_FRAMEWORK_PATH}" - initialize_folder "${FFMPEG_LIB_FRAMEWORK_PATH}/Headers" - # COPY HEADER FILES - cp -r "${FFMPEG_UNIVERSAL_LIBRARY_PATH}/include/${FFMPEG_LIB}"/* "${FFMPEG_LIB_FRAMEWORK_PATH}"/Headers 1>>"${BASEDIR}"/build.log 2>&1 + if [[ ${ARCHITECTURE_VARIANT} -eq ${ARCH_VAR_MAC_CATALYST} ]] || [[ ${ARCHITECTURE_VARIANT} -eq ${ARCH_VAR_MACOS} ]]; then - # COPY LIBRARY FILE - cp "${FFMPEG_UNIVERSAL_LIBRARY_PATH}/lib/${FFMPEG_LIB}.dylib" "${FFMPEG_LIB_FRAMEWORK_PATH}/${FFMPEG_LIB}" 1>>"${BASEDIR}"/build.log 2>&1 + # VERSIONED FRAMEWORK + + local FFMPEG_LIB_FRAMEWORK_RESOURCE_PATH="${FFMPEG_LIB_FRAMEWORK_PATH}/Versions/A/Resources" + + initialize_folder "${FFMPEG_LIB_FRAMEWORK_PATH}/Versions/A/Headers" + initialize_folder "${FFMPEG_LIB_FRAMEWORK_PATH}/Versions/A/Resources" + + # LINK CURRENT VERSION + ln -s "A" "${FFMPEG_LIB_FRAMEWORK_PATH}/Versions/Current" 1>>"${BASEDIR}"/build.log 2>&1 + ln -s "Versions/Current/Headers" "${FFMPEG_LIB_FRAMEWORK_PATH}/Headers" 1>>"${BASEDIR}"/build.log 2>&1 + ln -s "Versions/Current/Resources" "${FFMPEG_LIB_FRAMEWORK_PATH}/Resources" 1>>"${BASEDIR}"/build.log 2>&1 + ln -s "Versions/Current/${FFMPEG_LIB}" "${FFMPEG_LIB_FRAMEWORK_PATH}/${FFMPEG_LIB}" 1>>"${BASEDIR}"/build.log 2>&1 + + # COPY HEADER FILES + cp -r "${FFMPEG_UNIVERSAL_LIBRARY_PATH}/include/${FFMPEG_LIB}"/* "${FFMPEG_LIB_FRAMEWORK_PATH}/Versions/A/Headers" 1>>"${BASEDIR}"/build.log 2>&1 + + # COPY LIBRARY FILE + cp "${FFMPEG_UNIVERSAL_LIBRARY_PATH}/lib/${FFMPEG_LIB}.dylib" "${FFMPEG_LIB_FRAMEWORK_PATH}/Versions/A/${FFMPEG_LIB}" 1>>"${BASEDIR}"/build.log 2>&1 + + else + + # DEFAULT FRAMEWORK + + local FFMPEG_LIB_FRAMEWORK_RESOURCE_PATH="${FFMPEG_LIB_FRAMEWORK_PATH}" + + initialize_folder "${FFMPEG_LIB_FRAMEWORK_PATH}/Headers" + + # COPY HEADER FILES + cp -r "${FFMPEG_UNIVERSAL_LIBRARY_PATH}/include/${FFMPEG_LIB}"/* "${FFMPEG_LIB_FRAMEWORK_PATH}"/Headers 1>>"${BASEDIR}"/build.log 2>&1 + + # COPY LIBRARY FILE + cp "${FFMPEG_UNIVERSAL_LIBRARY_PATH}/lib/${FFMPEG_LIB}.dylib" "${FFMPEG_LIB_FRAMEWORK_PATH}/${FFMPEG_LIB}" 1>>"${BASEDIR}"/build.log 2>&1 + + fi # COPY FRAMEWORK LICENSES if [[ "${GPL_ENABLED}" == "yes" ]]; then - cp "${BASEDIR}/LICENSE.GPLv3" "${FFMPEG_LIB_FRAMEWORK_PATH}/LICENSE" 1>>"${BASEDIR}"/build.log 2>&1 + cp "${BASEDIR}/LICENSE.GPLv3" "${FFMPEG_LIB_FRAMEWORK_RESOURCE_PATH}/LICENSE" 1>>"${BASEDIR}"/build.log 2>&1 else - cp "${BASEDIR}/LICENSE.LGPLv3" "${FFMPEG_LIB_FRAMEWORK_PATH}/LICENSE" 1>>"${BASEDIR}"/build.log 2>&1 + cp "${BASEDIR}/LICENSE.LGPLv3" "${FFMPEG_LIB_FRAMEWORK_RESOURCE_PATH}/LICENSE" 1>>"${BASEDIR}"/build.log 2>&1 fi - build_info_plist "${FFMPEG_LIB_FRAMEWORK_PATH}/Info.plist" "${FFMPEG_LIB}" "com.arthenica.ffmpegkit.${CAPITAL_CASE_FFMPEG_LIB_NAME}" "${FFMPEG_LIB_VERSION}" "${FFMPEG_LIB_VERSION}" + # COPY EXTERNAL LIBRARY LICENSES + if [[ "${FFMPEG_LIB}" == "libavcodec" ]]; then + for library in {0..46}; do + if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then + local ENABLED_LIBRARY_NAME="$(get_library_name ${library})" + local ENABLED_LIBRARY_NAME_UPPERCASE=$(echo "${ENABLED_LIBRARY_NAME}" | tr '[a-z]' '[A-Z]') - echo -e "DEBUG: ${FFMPEG_LIB} framework built for $(get_apple_architecture_variant "${ARCHITECTURE_VARIANT}") platform successfully\n" 1>>"${BASEDIR}"/build.log 2>&1 - done + RC=$(copy_external_library_license "${library}" ${FFMPEG_LIB_FRAMEWORK_RESOURCE_PATH}/LICENSE.${ENABLED_LIBRARY_NAME_UPPERCASE}) - for library in {0..46}; do - if [[ ${ENABLED_LIBRARIES[$library]} -eq 1 ]]; then - local ENABLED_LIBRARY_NAME="$(get_library_name ${library})" - local ENABLED_LIBRARY_NAME_UPPERCASE=$(echo "${ENABLED_LIBRARY_NAME}" | tr '[a-z]' '[A-Z]') + [[ ${RC} -ne 0 ]] && exit_universal_library "${LIBRARY_NAME}" + fi + done + fi - RC=$(copy_external_library_license "${library}" ${BASEDIR}/prebuilt/$(get_framework_directory ${ARCHITECTURE_VARIANT})/libavcodec.framework/LICENSE.${ENABLED_LIBRARY_NAME_UPPERCASE}) + build_info_plist "${FFMPEG_LIB_FRAMEWORK_RESOURCE_PATH}/Info.plist" "${FFMPEG_LIB}" "com.arthenica.ffmpegkit.${CAPITAL_CASE_FFMPEG_LIB_NAME}" "${FFMPEG_LIB_VERSION}" "${FFMPEG_LIB_VERSION}" - [[ ${RC} -ne 0 ]] && exit_universal_library "${LIBRARY_NAME}" - fi + echo -e "DEBUG: ${FFMPEG_LIB} framework built for $(get_apple_architecture_variant "${ARCHITECTURE_VARIANT}") platform successfully\n" 1>>"${BASEDIR}"/build.log 2>&1 done } @@ -379,7 +412,7 @@ create_ffmpeg_framework() { create_ffmpeg_kit_framework() { local ARCHITECTURE_VARIANT="$1" local LIBRARY_NAME="ffmpeg-kit" - local UNIVERSAL_LIBRARY_DIRECTORY="${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCHITECTURE_VARIANT}")" + local UNIVERSAL_LIBRARY_DIRECTORY="${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCHITECTURE_VARIANT}")" local FFMPEG_KIT_UNIVERSAL_LIBRARY_DIRECTORY="${UNIVERSAL_LIBRARY_DIRECTORY}/${LIBRARY_NAME}" if [[ $(is_apple_architecture_variant_supported "${ARCHITECTURE_VARIANT}") -eq 0 ]]; then @@ -393,23 +426,58 @@ create_ffmpeg_kit_framework() { # INITIALIZE FRAMEWORK DIRECTORY local FFMPEG_KIT_FRAMEWORK_PATH="${BASEDIR}/prebuilt/$(get_framework_directory "${ARCHITECTURE_VARIANT}")/ffmpegkit.framework" initialize_folder "${FFMPEG_KIT_FRAMEWORK_PATH}" - initialize_folder "${FFMPEG_KIT_FRAMEWORK_PATH}/Headers" - initialize_folder "${FFMPEG_KIT_FRAMEWORK_PATH}/Modules" - # COPY HEADER FILES - cp -r "${FFMPEG_KIT_UNIVERSAL_LIBRARY_DIRECTORY}"/include/* "${FFMPEG_KIT_FRAMEWORK_PATH}"/Headers 1>>"${BASEDIR}"/build.log 2>&1 + if [[ ${ARCHITECTURE_VARIANT} -eq ${ARCH_VAR_MAC_CATALYST} ]] || [[ ${ARCHITECTURE_VARIANT} -eq ${ARCH_VAR_MACOS} ]]; then + + # VERSIONED FRAMEWORK + + local FFMPEG_KIT_FRAMEWORK_RESOURCE_PATH="${FFMPEG_KIT_FRAMEWORK_PATH}/Versions/A/Resources" - # COPY LIBRARY FILE - cp "${FFMPEG_KIT_UNIVERSAL_LIBRARY_DIRECTORY}/lib/libffmpegkit.dylib" "${FFMPEG_KIT_FRAMEWORK_PATH}"/ffmpegkit 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${FFMPEG_KIT_FRAMEWORK_PATH}/Versions/A/Headers" + initialize_folder "${FFMPEG_KIT_FRAMEWORK_PATH}/Versions/A/Modules" + initialize_folder "${FFMPEG_KIT_FRAMEWORK_PATH}/Versions/A/Resources" + + # LINK CURRENT VERSION + ln -s "A" "${FFMPEG_KIT_FRAMEWORK_PATH}/Versions/Current" 1>>"${BASEDIR}"/build.log 2>&1 + ln -s "Versions/Current/Headers" "${FFMPEG_KIT_FRAMEWORK_PATH}/Headers" 1>>"${BASEDIR}"/build.log 2>&1 + ln -s "Versions/Current/Modules" "${FFMPEG_KIT_FRAMEWORK_PATH}/Modules" 1>>"${BASEDIR}"/build.log 2>&1 + ln -s "Versions/Current/Resources" "${FFMPEG_KIT_FRAMEWORK_PATH}/Resources" 1>>"${BASEDIR}"/build.log 2>&1 + ln -s "Versions/Current/ffmpegkit" "${FFMPEG_KIT_FRAMEWORK_PATH}/ffmpegkit" 1>>"${BASEDIR}"/build.log 2>&1 + + # COPY HEADER FILES + cp -r "${FFMPEG_KIT_UNIVERSAL_LIBRARY_DIRECTORY}"/include/* "${FFMPEG_KIT_FRAMEWORK_PATH}/Versions/A/Headers" 1>>"${BASEDIR}"/build.log 2>&1 + + # COPY LIBRARY FILE + cp "${FFMPEG_KIT_UNIVERSAL_LIBRARY_DIRECTORY}/lib/libffmpegkit.dylib" "${FFMPEG_KIT_FRAMEWORK_PATH}/Versions/A/ffmpegkit" 1>>"${BASEDIR}"/build.log 2>&1 + + else + + # DEFAULT FRAMEWORK + + local FFMPEG_KIT_FRAMEWORK_RESOURCE_PATH="${FFMPEG_KIT_FRAMEWORK_PATH}" + + initialize_folder "${FFMPEG_KIT_FRAMEWORK_PATH}/Headers" + initialize_folder "${FFMPEG_KIT_FRAMEWORK_PATH}/Modules" + + # COPY HEADER FILES + cp -r "${FFMPEG_KIT_UNIVERSAL_LIBRARY_DIRECTORY}"/include/* "${FFMPEG_KIT_FRAMEWORK_PATH}"/Headers 1>>"${BASEDIR}"/build.log 2>&1 + + # COPY LIBRARY FILE + cp "${FFMPEG_KIT_UNIVERSAL_LIBRARY_DIRECTORY}/lib/libffmpegkit.dylib" "${FFMPEG_KIT_FRAMEWORK_PATH}"/ffmpegkit 1>>"${BASEDIR}"/build.log 2>&1 + + fi # COPY FRAMEWORK LICENSES if [[ "${GPL_ENABLED}" == "yes" ]]; then - cp "${BASEDIR}/LICENSE.GPLv3" "${FFMPEG_KIT_FRAMEWORK_PATH}/LICENSE" 1>>"${BASEDIR}"/build.log 2>&1 + cp "${BASEDIR}/LICENSE.GPLv3" "${FFMPEG_KIT_FRAMEWORK_RESOURCE_PATH}/LICENSE" 1>>"${BASEDIR}"/build.log 2>&1 else - cp "${BASEDIR}/LICENSE.LGPLv3" "${FFMPEG_KIT_FRAMEWORK_PATH}/LICENSE" 1>>"${BASEDIR}"/build.log 2>&1 + cp "${BASEDIR}/LICENSE.LGPLv3" "${FFMPEG_KIT_FRAMEWORK_RESOURCE_PATH}/LICENSE" 1>>"${BASEDIR}"/build.log 2>&1 fi - build_info_plist "${FFMPEG_KIT_FRAMEWORK_PATH}/Info.plist" "ffmpegkit" "com.arthenica.ffmpegkit.FFmpegKit" "${FFMPEG_KIT_VERSION}" "${FFMPEG_KIT_VERSION}" + # COPYING STRIP SCRIPT FOR SHARED LIBRARY + cp ${BASEDIR}/tools/release/apple/strip-frameworks.sh ${FFMPEG_KIT_FRAMEWORK_RESOURCE_PATH} 1>>${BASEDIR}/build.log 2>&1 + + build_info_plist "${FFMPEG_KIT_FRAMEWORK_RESOURCE_PATH}/Info.plist" "ffmpegkit" "com.arthenica.ffmpegkit.FFmpegKit" "${FFMPEG_KIT_VERSION}" "${FFMPEG_KIT_VERSION}" build_modulemap "${FFMPEG_KIT_FRAMEWORK_PATH}/Modules/module.modulemap" echo -e "DEBUG: ffmpeg-kit framework built for $(get_apple_architecture_variant "${ARCHITECTURE_VARIANT}") platform successfully\n" 1>>"${BASEDIR}"/build.log 2>&1 @@ -1124,6 +1192,7 @@ EOF create_gnutls_package_config() { local GNUTLS_VERSION="$1" + local EXTRA_LIBS="$2" cat >"${INSTALL_PKG_CONFIG_DIR}/gnutls.pc" <>"${BASEDIR}"/build.log 2>&1 if [[ $(is_apple_architecture_variant_supported "${ARCH_VAR_IPHONEOS}") -eq 1 ]]; then - initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_IPHONEOS}")" + initialize_folder "${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_IPHONEOS}")" initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_IPHONEOS}")" fi if [[ $(is_apple_architecture_variant_supported "${ARCH_VAR_IPHONESIMULATOR}") -eq 1 ]]; then - initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_IPHONESIMULATOR}")" + initialize_folder "${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_IPHONESIMULATOR}")" initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_IPHONESIMULATOR}")" fi if [[ $(is_apple_architecture_variant_supported "${ARCH_VAR_MAC_CATALYST}") -eq 1 ]]; then - initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_MAC_CATALYST}")" + initialize_folder "${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_MAC_CATALYST}")" initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_MAC_CATALYST}")" fi @@ -492,10 +512,10 @@ initialize_prebuilt_ios_folders() { initialize_folder "${BASEDIR}/prebuilt/$(get_xcframework_directory)" else - echo -e "DEBUG: Initializing default universal directory at ${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_IOS}")\n" 1>>"${BASEDIR}"/build.log 2>&1 + echo -e "DEBUG: Initializing default universal directory at ${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_IOS}")\n" 1>>"${BASEDIR}"/build.log 2>&1 # DEFAULT BUILDS GENERATE UNIVERSAL LIBRARIES AND FRAMEWORKS - initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_IOS}")" + initialize_folder "${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_IOS}")" echo -e "DEBUG: Initializing framework directory at ${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_IOS}")\n" 1>>"${BASEDIR}"/build.log 2>&1 @@ -507,7 +527,7 @@ initialize_prebuilt_ios_folders() { # DEPENDS TARGET_ARCH_LIST VARIABLE # create_universal_libraries_for_ios_default_frameworks() { - local ROOT_UNIVERSAL_DIRECTORY_PATH="${BASEDIR}/prebuilt/$(get_universal_library_directory 1)" + local ROOT_UNIVERSAL_DIRECTORY_PATH="${BASEDIR}/.tmp/$(get_universal_library_directory 1)" echo -e "INFO: Building universal libraries in ${ROOT_UNIVERSAL_DIRECTORY_PATH} for default frameworks using ${TARGET_ARCH_LIST[@]}\n" 1>>"${BASEDIR}"/build.log 2>&1 diff --git a/scripts/function-macos.sh b/scripts/function-macos.sh index ccf2ac0..6762ee4 100755 --- a/scripts/function-macos.sh +++ b/scripts/function-macos.sh @@ -47,14 +47,23 @@ When compilation ends, libraries are created under the prebuilt folder.\n" } enable_main_build() { - export MACOS_MIN_VERSION=10.15 + if [[ $(compare_versions "$DETECTED_MACOS_SDK_VERSION" "10.15") -le 0 ]]; then + export MACOS_MIN_VERSION=$DETECTED_MACOS_SDK_VERSION + else + export MACOS_MIN_VERSION=10.15 + fi } enable_lts_build() { export FFMPEG_KIT_LTS_BUILD="1" - # XCODE 7.3 HAS MACOS SDK 10.11 - export MACOS_MIN_VERSION=10.11 + if [[ $(compare_versions "$DETECTED_MACOS_SDK_VERSION" "10.11") -le 0 ]]; then + export MACOS_MIN_VERSION=$DETECTED_MACOS_SDK_VERSION + else + + # XCODE 7.3 HAS MACOS SDK 10.11 + export MACOS_MIN_VERSION=10.11 + fi } get_common_includes() { @@ -241,7 +250,7 @@ get_common_linked_libraries() { } get_common_ldflags() { - echo "-isysroot ${SDK_PATH}" + echo "-isysroot ${SDK_PATH} $(get_min_version_cflags)" } get_size_optimization_ldflags() { @@ -376,7 +385,7 @@ initialize_prebuilt_macos_folders() { echo -e "DEBUG: Initializing universal directories and frameworks for xcf builds\n" 1>>"${BASEDIR}"/build.log 2>&1 if [[ $(is_apple_architecture_variant_supported "${ARCH_VAR_MACOS}") -eq 1 ]]; then - initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_MACOS}")" + initialize_folder "${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_MACOS}")" initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_MACOS}")" fi @@ -386,10 +395,10 @@ initialize_prebuilt_macos_folders() { initialize_folder "${BASEDIR}/prebuilt/$(get_xcframework_directory)" else - echo -e "DEBUG: Initializing default universal directory at ${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_MACOS}")\n" 1>>"${BASEDIR}"/build.log 2>&1 + echo -e "DEBUG: Initializing default universal directory at ${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_MACOS}")\n" 1>>"${BASEDIR}"/build.log 2>&1 # DEFAULT BUILDS GENERATE UNIVERSAL LIBRARIES AND FRAMEWORKS - initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_MACOS}")" + initialize_folder "${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_MACOS}")" echo -e "DEBUG: Initializing framework directory at ${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_MACOS}")\n" 1>>"${BASEDIR}"/build.log 2>&1 @@ -401,7 +410,7 @@ initialize_prebuilt_macos_folders() { # DEPENDS TARGET_ARCH_LIST VARIABLE # create_universal_libraries_for_macos_default_frameworks() { - local ROOT_UNIVERSAL_DIRECTORY_PATH="${BASEDIR}/prebuilt/$(get_universal_library_directory 1)" + local ROOT_UNIVERSAL_DIRECTORY_PATH="${BASEDIR}/.tmp/$(get_universal_library_directory 1)" echo -e "INFO: Building universal libraries in ${ROOT_UNIVERSAL_DIRECTORY_PATH} for default frameworks using ${TARGET_ARCH_LIST[@]}\n" 1>>"${BASEDIR}"/build.log 2>&1 diff --git a/scripts/function-tvos.sh b/scripts/function-tvos.sh index 6460e5f..9d9750b 100755 --- a/scripts/function-tvos.sh +++ b/scripts/function-tvos.sh @@ -47,14 +47,23 @@ set explicitly. When compilation ends, libraries are created under the prebuilt } enable_main_build() { - export TVOS_MIN_VERSION=11.0 + if [[ $(compare_versions "$DETECTED_TVOS_SDK_VERSION" "11.0") -le 0 ]]; then + export TVOS_MIN_VERSION=$DETECTED_TVOS_SDK_VERSION + else + export TVOS_MIN_VERSION=11.0 + fi } enable_lts_build() { export FFMPEG_KIT_LTS_BUILD="1" - # XCODE 7.3 HAS TVOS SDK 9.2 - export TVOS_MIN_VERSION=9.2 + if [[ $(compare_versions "$DETECTED_TVOS_SDK_VERSION" "9.2") -le 0 ]]; then + export TVOS_MIN_VERSION=$DETECTED_TVOS_SDK_VERSION + else + + # XCODE 7.3 HAS TVOS SDK 9.2 + export TVOS_MIN_VERSION=9.2 + fi # TVOS SDK 9.2 DOES NOT INCLUDE VIDEOTOOLBOX ENABLED_LIBRARIES[LIBRARY_VIDEOTOOLBOX]=0 @@ -279,7 +288,7 @@ get_common_linked_libraries() { } get_common_ldflags() { - echo "-isysroot ${SDK_PATH}" + echo "-isysroot ${SDK_PATH} $(get_min_version_cflags)" } get_size_optimization_ldflags() { @@ -430,11 +439,11 @@ initialize_prebuilt_tvos_folders() { echo -e "DEBUG: Initializing universal directories and frameworks for xcf builds\n" 1>>"${BASEDIR}"/build.log 2>&1 if [[ $(is_apple_architecture_variant_supported "${ARCH_VAR_APPLETVOS}") -eq 1 ]]; then - initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_APPLETVOS}")" + initialize_folder "${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_APPLETVOS}")" initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_APPLETVOS}")" fi if [[ $(is_apple_architecture_variant_supported "${ARCH_VAR_APPLETVSIMULATOR}") -eq 1 ]]; then - initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_APPLETVSIMULATOR}")" + initialize_folder "${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_APPLETVSIMULATOR}")" initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_APPLETVSIMULATOR}")" fi @@ -444,10 +453,10 @@ initialize_prebuilt_tvos_folders() { initialize_folder "${BASEDIR}/prebuilt/$(get_xcframework_directory)" else - echo -e "DEBUG: Initializing default universal directory at ${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_TVOS}")\n" 1>>"${BASEDIR}"/build.log 2>&1 + echo -e "DEBUG: Initializing default universal directory at ${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_TVOS}")\n" 1>>"${BASEDIR}"/build.log 2>&1 # DEFAULT BUILDS GENERATE UNIVERSAL LIBRARIES AND FRAMEWORKS - initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_TVOS}")" + initialize_folder "${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_TVOS}")" echo -e "DEBUG: Initializing framework directory at ${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_TVOS}")\n" 1>>"${BASEDIR}"/build.log 2>&1 @@ -459,7 +468,7 @@ initialize_prebuilt_tvos_folders() { # DEPENDS TARGET_ARCH_LIST VARIABLE # create_universal_libraries_for_tvos_default_frameworks() { - local ROOT_UNIVERSAL_DIRECTORY_PATH="${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_TVOS}")" + local ROOT_UNIVERSAL_DIRECTORY_PATH="${BASEDIR}/.tmp/$(get_universal_library_directory "${ARCH_VAR_TVOS}")" echo -e "INFO: Building universal libraries in ${ROOT_UNIVERSAL_DIRECTORY_PATH} for default frameworks using ${TARGET_ARCH_LIST[@]}\n" 1>>"${BASEDIR}"/build.log 2>&1 diff --git a/tools/release/apple/ffmpeg-kit-ios-audio.podspec b/tools/release/apple/ffmpeg-kit-ios-audio.podspec index a9c33eb..a07c328 100644 --- a/tools/release/apple/ffmpeg-kit-ios-audio.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-audio.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.ios.deployment_target = '9.3' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' - s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'lame.framework', 'libilbc.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libsndfile.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'opus.framework', 'shine.framework', 'soxr.framework', 'speex.framework', 'twolame.framework', 'vo-amrwbenc.framework' + s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec b/tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec index 1f122a5..8247000 100644 --- a/tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.ios.deployment_target = '9.3' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' - s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'dav1d.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'harfbuzz.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpmux.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'vo-amrwbenc.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework' + s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-ios-full.podspec b/tools/release/apple/ffmpeg-kit-ios-full.podspec index 0379ff4..41d2fb0 100644 --- a/tools/release/apple/ffmpeg-kit-ios-full.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-full.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.ios.deployment_target = '9.3' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' - s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'dav1d.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'harfbuzz.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpmux.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'vo-amrwbenc.framework' + s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec b/tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec index 65b6c8c..4551828 100644 --- a/tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.ios.deployment_target = '9.3' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' - s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'gmp.framework', 'gnutls.framework', 'libhogweed.framework', 'libnettle.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework' + s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-ios-https.podspec b/tools/release/apple/ffmpeg-kit-ios-https.podspec index 5c1a381..82470d2 100644 --- a/tools/release/apple/ffmpeg-kit-ios-https.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-https.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.ios.deployment_target = '9.3' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' - s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'gmp.framework', 'gnutls.framework', 'libhogweed.framework', 'libnettle.framework' + s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec b/tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec index 36fb68a..1d05c0d 100644 --- a/tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.ios.deployment_target = '9.3' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' - s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework' + s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-ios-video.podspec b/tools/release/apple/ffmpeg-kit-ios-video.podspec index a014fe3..5350564 100644 --- a/tools/release/apple/ffmpeg-kit-ios-video.podspec +++ b/tools/release/apple/ffmpeg-kit-ios-video.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.ios.deployment_target = '9.3' s.ios.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','VideoToolbox' - s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'dav1d.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'harfbuzz.framework', 'jpeg.framework', 'kvazaar.framework', 'libass.framework', 'libogg.framework', 'libpng.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpmux.framework', 'libwebpdemux.framework', 'snappy.framework', 'tiff.framework' + s.ios.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-macos-audio.podspec b/tools/release/apple/ffmpeg-kit-macos-audio.podspec index d9bbeda..035b5c8 100644 --- a/tools/release/apple/ffmpeg-kit-macos-audio.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-audio.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.11' s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL','VideoToolbox' - s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'lame.framework', 'libilbc.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libsndfile.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'opus.framework', 'shine.framework', 'soxr.framework', 'speex.framework', 'twolame.framework', 'vo-amrwbenc.framework' + s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec b/tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec index 220674b..f2aa96b 100644 --- a/tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec @@ -18,7 +18,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-gpl-VERSION-macos-framework.zip" } s.osx.deployment_target = '10.11' - s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL','VideoToolbox' - s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'dav1d.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'harfbuzz.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpmux.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'vo-amrwbenc.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework' + s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL', 'Security', 'VideoToolbox' + s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-macos-full.podspec b/tools/release/apple/ffmpeg-kit-macos-full.podspec index 6d9d4f3..5f6b1e3 100644 --- a/tools/release/apple/ffmpeg-kit-macos-full.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-full.podspec @@ -18,7 +18,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-VERSION-macos-framework.zip" } s.osx.deployment_target = '10.11' - s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL','VideoToolbox' - s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'dav1d.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'harfbuzz.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpmux.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'vo-amrwbenc.framework' + s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL', 'Security', 'VideoToolbox' + s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec b/tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec index d26f946..c9ca4c3 100644 --- a/tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec @@ -18,7 +18,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-gpl-VERSION-macos-framework.zip" } s.osx.deployment_target = '10.11' - s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL','VideoToolbox' - s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'gmp.framework', 'gnutls.framework', 'libhogweed.framework', 'libnettle.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework' + s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL', 'Security', 'VideoToolbox' + s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-macos-https.podspec b/tools/release/apple/ffmpeg-kit-macos-https.podspec index 20de514..860fc84 100644 --- a/tools/release/apple/ffmpeg-kit-macos-https.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-https.podspec @@ -18,7 +18,7 @@ Pod::Spec.new do |s| s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-VERSION-macos-framework.zip" } s.osx.deployment_target = '10.11' - s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL','VideoToolbox' - s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'gmp.framework', 'gnutls.framework', 'libhogweed.framework', 'libnettle.framework' + s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL', 'Security', 'VideoToolbox' + s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec b/tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec index 6e63e11..b393113 100644 --- a/tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.11' s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL','VideoToolbox' - s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework' + s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-macos-video.podspec b/tools/release/apple/ffmpeg-kit-macos-video.podspec index 3520199..cdaaba3 100644 --- a/tools/release/apple/ffmpeg-kit-macos-video.podspec +++ b/tools/release/apple/ffmpeg-kit-macos-video.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.11' s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreAudio','CoreImage','CoreMedia','OpenCL','OpenGL','VideoToolbox' - s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'dav1d.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'harfbuzz.framework', 'jpeg.framework', 'kvazaar.framework', 'libass.framework', 'libogg.framework', 'libpng.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpmux.framework', 'libwebpdemux.framework', 'snappy.framework', 'tiff.framework' + s.osx.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-tvos-audio.podspec b/tools/release/apple/ffmpeg-kit-tvos-audio.podspec index 5952a49..ba0f5a2 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-audio.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-audio.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.2' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' - s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'lame.framework', 'libilbc.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libsndfile.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'opus.framework', 'shine.framework', 'soxr.framework', 'speex.framework', 'twolame.framework', 'vo-amrwbenc.framework' + s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec b/tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec index 73210ad..e8990ef 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.2' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' - s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'dav1d.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'harfbuzz.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpmux.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'vo-amrwbenc.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework' + s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-tvos-full.podspec b/tools/release/apple/ffmpeg-kit-tvos-full.podspec index f83c7ca..46e0945 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-full.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-full.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.2' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' - s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'dav1d.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'gmp.framework', 'gnutls.framework', 'harfbuzz.framework', 'jpeg.framework', 'kvazaar.framework', 'lame.framework', 'libass.framework', 'libhogweed.framework', 'libilbc.framework', 'libnettle.framework', 'libogg.framework', 'libopencore-amrnb.framework', 'libpng.framework', 'libsndfile.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpmux.framework', 'libwebpdemux.framework', 'libxml2.framework', 'opus.framework', 'shine.framework', 'snappy.framework', 'soxr.framework', 'speex.framework', 'tiff.framework', 'twolame.framework', 'vo-amrwbenc.framework' + s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec b/tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec index 618f552..5ee933d 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.2' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' - s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'gmp.framework', 'gnutls.framework', 'libhogweed.framework', 'libnettle.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework' + s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-tvos-https.podspec b/tools/release/apple/ffmpeg-kit-tvos-https.podspec index ea1e64b..d8a2924 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-https.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-https.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.2' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' - s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'gmp.framework', 'gnutls.framework', 'libhogweed.framework', 'libnettle.framework' + s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec b/tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec index c164537..3056b02 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.2' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' - s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'libvidstab.framework', 'x264.framework', 'x265.framework', 'xvidcore.framework' + s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/ffmpeg-kit-tvos-video.podspec b/tools/release/apple/ffmpeg-kit-tvos-video.podspec index d598116..1e34365 100644 --- a/tools/release/apple/ffmpeg-kit-tvos-video.podspec +++ b/tools/release/apple/ffmpeg-kit-tvos-video.podspec @@ -19,6 +19,6 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.2' s.tvos.frameworks = 'AudioToolbox','VideoToolbox','CoreMedia' - s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework', 'dav1d.framework', 'expat.framework', 'fontconfig.framework', 'freetype.framework', 'fribidi.framework', 'giflib.framework', 'harfbuzz.framework', 'jpeg.framework', 'kvazaar.framework', 'libass.framework', 'libogg.framework', 'libpng.framework', 'libtheora.framework', 'libtheoradec.framework', 'libtheoraenc.framework', 'libvorbis.framework', 'libvorbisenc.framework', 'libvorbisfile.framework', 'libvpx.framework', 'libwebp.framework', 'libwebpmux.framework', 'libwebpdemux.framework', 'snappy.framework', 'tiff.framework' + s.tvos.vendored_frameworks = 'ffmpegkit.framework', 'libavcodec.framework', 'libavdevice.framework', 'libavfilter.framework', 'libavformat.framework', 'libavutil.framework', 'libswresample.framework', 'libswscale.framework' end diff --git a/tools/release/apple/strip-frameworks.sh b/tools/release/apple/strip-frameworks.sh new file mode 100755 index 0000000..2c23237 --- /dev/null +++ b/tools/release/apple/strip-frameworks.sh @@ -0,0 +1,62 @@ +################################################################################ +# +# Copyright 2015 Realm Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +# This script strips all non-valid architectures from dynamic libraries in +# the application's `Frameworks` directory. +# +# The following environment variables are required: +# +# BUILT_PRODUCTS_DIR +# FRAMEWORKS_FOLDER_PATH +# VALID_ARCHS +# EXPANDED_CODE_SIGN_IDENTITY + + +# Signs a framework with the provided identity +code_sign() { +# Use the current code_sign_identitiy +echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" +echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1" +/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" +} + +echo "Stripping frameworks" +cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +for file in $(find . -type f -perm +111); do +# Skip non-dynamic libraries +if ! [[ "$(file "$file")" == *"dynamically linked shared library"* ]]; then +continue +fi +# Get architectures for current file +archs="$(lipo -info "${file}" | rev | cut -d ':' -f1 | rev)" +stripped="" +for arch in $archs; do +if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then +# Strip non-valid architectures in-place +lipo -remove "$arch" -output "$file" "$file" || exit 1 +stripped="$stripped $arch" +fi +done +if [[ "$stripped" != "" ]]; then +echo "Stripped $file of architectures:$stripped" +if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then +code_sign "${file}" +fi +fi +done diff --git a/tools/release/flutter/create_packages.sh b/tools/release/flutter/create_packages.sh index e89e624..5867cef 100755 --- a/tools/release/flutter/create_packages.sh +++ b/tools/release/flutter/create_packages.sh @@ -19,7 +19,7 @@ create_main_releases() { for CURRENT_PACKAGE in "${PACKAGES[@]}"; do local FLUTTER_PACKAGE_NAME="$(echo "${CURRENT_PACKAGE}" | sed "s/\-/\_/g")" local PACKAGE_PATH="${PACKAGES_DIR}/${CURRENT_PACKAGE}" - cp -r ${SOURCE_DIR} ${PACKAGE_PATH} + cp -R ${SOURCE_DIR} ${PACKAGE_PATH} # 1. pubspec $SED_INLINE "s|name: ffmpeg_kit_flutter|name: ffmpeg_kit_flutter_$FLUTTER_PACKAGE_NAME|g" ${PACKAGE_PATH}/pubspec.yaml @@ -54,7 +54,7 @@ create_lts_releases() { for CURRENT_PACKAGE in "${PACKAGES[@]}"; do local FLUTTER_PACKAGE_NAME="$(echo "${CURRENT_PACKAGE}" | sed "s/\-/\_/g")" local PACKAGE_PATH="${PACKAGES_DIR}/${CURRENT_PACKAGE}-lts" - cp -r ${SOURCE_DIR} ${PACKAGE_PATH} + cp -R ${SOURCE_DIR} ${PACKAGE_PATH} # 1. pubspec $SED_INLINE "s|name: ffmpeg_kit_flutter|name: ffmpeg_kit_flutter_$FLUTTER_PACKAGE_NAME|g" ${PACKAGE_PATH}/pubspec.yaml @@ -103,4 +103,4 @@ create_main_releases; create_lts_releases; -cp -r "${BASEDIR}/flutter/flutter_platform_interface" "$PACKAGES_DIR" \ No newline at end of file +cp -R "${BASEDIR}/flutter/flutter_platform_interface" "$PACKAGES_DIR" \ No newline at end of file diff --git a/tools/release/ios.lts.sh b/tools/release/ios.lts.sh index eec9c55..3cb42a6 100755 --- a/tools/release/ios.lts.sh +++ b/tools/release/ios.lts.sh @@ -18,7 +18,7 @@ create_package() { rm -rf "${CURRENT_PACKAGE}" mkdir -p "${CURRENT_PACKAGE}" || exit 1 - cp -r "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 + cp -R "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 cd "${CURRENT_PACKAGE}" || exit 1 zip -r "../ffmpeg-kit-$1-${PACKAGE_VERSION}-ios-framework.zip" * || exit 1 @@ -47,8 +47,8 @@ create_package() { cp "${LICENSE_FILE}" "${CURRENT_UNIVERSAL_PACKAGE}"/LICENSE."${LIBRARY_NAME}" || exit 1 done - cp -r "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg-kit/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 - cp -r "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 + cp -R "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg-kit/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 + cp -R "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 cp "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/LICENSE "${CURRENT_UNIVERSAL_PACKAGE}"/LICENSE || exit 1 cd "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 diff --git a/tools/release/ios.sh b/tools/release/ios.sh index e4954a0..42715c3 100755 --- a/tools/release/ios.sh +++ b/tools/release/ios.sh @@ -16,7 +16,7 @@ create_package() { rm -rf "${CURRENT_PACKAGE}" mkdir -p "${CURRENT_PACKAGE}" || exit 1 - cp -r "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 + cp -R "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 cd "${CURRENT_PACKAGE}" || exit 1 zip -r "../ffmpeg-kit-$1-${PACKAGE_VERSION}-ios-xcframework.zip" * || exit 1 diff --git a/tools/release/macos.lts.sh b/tools/release/macos.lts.sh index 3dcd08b..3eaee4d 100755 --- a/tools/release/macos.lts.sh +++ b/tools/release/macos.lts.sh @@ -18,7 +18,7 @@ create_package() { rm -rf "${CURRENT_PACKAGE}" mkdir -p "${CURRENT_PACKAGE}" || exit 1 - cp -r "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 + cp -R "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 cd "${CURRENT_PACKAGE}" || exit 1 zip -r "../ffmpeg-kit-$1-${PACKAGE_VERSION}-macos-framework.zip" * || exit 1 @@ -46,8 +46,8 @@ create_package() { cp "${LICENSE_FILE}" "${CURRENT_UNIVERSAL_PACKAGE}"/LICENSE."${LIBRARY_NAME}" || exit 1 done - cp -r "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg-kit/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 - cp -r "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 + cp -R "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg-kit/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 + cp -R "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 cp "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/LICENSE "${CURRENT_UNIVERSAL_PACKAGE}"/LICENSE || exit 1 cd "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 diff --git a/tools/release/macos.sh b/tools/release/macos.sh index 1df773d..f8c93bb 100755 --- a/tools/release/macos.sh +++ b/tools/release/macos.sh @@ -16,7 +16,7 @@ create_package() { rm -rf "${CURRENT_PACKAGE}" mkdir -p "${CURRENT_PACKAGE}" || exit 1 - cp -r "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 + cp -R "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 cd "${CURRENT_PACKAGE}" || exit 1 zip -r "../ffmpeg-kit-$1-${PACKAGE_VERSION}-macos-xcframework.zip" * || exit 1 diff --git a/tools/release/tvos.lts.sh b/tools/release/tvos.lts.sh index 9345dcd..b1f52d7 100755 --- a/tools/release/tvos.lts.sh +++ b/tools/release/tvos.lts.sh @@ -18,7 +18,7 @@ create_package() { rm -rf "${CURRENT_PACKAGE}" mkdir -p "${CURRENT_PACKAGE}" || exit 1 - cp -r "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 + cp -R "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 cd "${CURRENT_PACKAGE}" || exit 1 zip -r "../ffmpeg-kit-$1-${PACKAGE_VERSION}-tvos-framework.zip" * || exit 1 @@ -46,8 +46,8 @@ create_package() { cp "${LICENSE_FILE}" "${CURRENT_UNIVERSAL_PACKAGE}"/LICENSE."${LIBRARY_NAME}" || exit 1 done - cp -r "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg-kit/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 - cp -r "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 + cp -R "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg-kit/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 + cp -R "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/include/* "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 cp "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/LICENSE "${CURRENT_UNIVERSAL_PACKAGE}"/LICENSE || exit 1 cd "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 diff --git a/tools/release/tvos.sh b/tools/release/tvos.sh index 5c35b70..44b27fb 100755 --- a/tools/release/tvos.sh +++ b/tools/release/tvos.sh @@ -16,7 +16,7 @@ create_package() { rm -rf "${CURRENT_PACKAGE}" mkdir -p "${CURRENT_PACKAGE}" || exit 1 - cp -r "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 + cp -R "${SOURCE_PACKAGE}"/* "${CURRENT_PACKAGE}" || exit 1 cd "${CURRENT_PACKAGE}" || exit 1 zip -r "../ffmpeg-kit-$1-${PACKAGE_VERSION}-tvos-xcframework.zip" * || exit 1 diff --git a/tvos.sh b/tvos.sh index 1b1da32..ac03120 100755 --- a/tvos.sh +++ b/tvos.sh @@ -19,7 +19,6 @@ source "${BASEDIR}"/scripts/function-${FFMPEG_KIT_BUILD_TYPE}.sh # SET DEFAULTS SETTINGS enable_default_tvos_architectures -enable_main_build # SELECT XCODE VERSION USED FOR BUILDING XCODE_FOR_FFMPEG_KIT=$(ls ~/.xcode.for.ffmpeg.kit.sh 2>>"${BASEDIR}"/build.log) @@ -28,7 +27,7 @@ if [[ -f ${XCODE_FOR_FFMPEG_KIT} ]]; then fi # DETECT TVOS SDK VERSION -DETECTED_TVOS_SDK_VERSION="$(xcrun --sdk appletvos --show-sdk-version 2>>${BASEDIR}/build.log)" +export DETECTED_TVOS_SDK_VERSION="$(xcrun --sdk appletvos --show-sdk-version 2>>${BASEDIR}/build.log)" echo -e "\nINFO: Using SDK ${DETECTED_TVOS_SDK_VERSION} by Xcode provided at $(xcode-select -p)\n" 1>>"${BASEDIR}"/build.log 2>&1 echo -e "\nINFO: Build options: $*\n" 1>>"${BASEDIR}"/build.log 2>&1 @@ -45,6 +44,9 @@ if [[ -z ${BUILD_VERSION} ]]; then exit 1 fi +# MAIN BUILDS ENABLED BY DEFAULT +enable_main_build + # PROCESS LTS BUILD OPTION FIRST AND SET BUILD TYPE: MAIN OR LTS for argument in "$@"; do if [[ "$argument" == "-l" ]] || [[ "$argument" == "--lts" ]]; then @@ -154,11 +156,14 @@ if [[ -n ${DISPLAY_HELP} ]]; then exit 0 fi +# DISABLE NOT SUPPORTED ARCHITECTURES +disable_tvos_architecture_not_supported_on_detected_sdk_version "${ARCH_ARM64_SIMULATOR}" + # CHECK SOME RULES FOR .framework BUNDLES # 1. DISABLE arm64-simulator WHEN arm64 IS ENABLED IN framework BUNDLES if [[ -z ${FFMPEG_KIT_XCF_BUILD} ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_ARM64}]} -eq 1 ]] && [[ ${ENABLED_ARCHITECTURES[${ARCH_ARM64_SIMULATOR}]} -eq 1 ]]; then - echo -e "INFO: Disabled arm64-simulator architecture which can not co-exist with arm64 in the same framework bundle.\n" 1>>"${BASEDIR}"/build.log 2>&1 + echo -e "INFO: Disabled arm64-simulator architecture which cannot co-exist with arm64 in the same framework bundle.\n" 1>>"${BASEDIR}"/build.log 2>&1 disable_arch "arm64-simulator" fi