From eaa0db206747426131a8faccd7ff7510d86c11e5 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Sun, 28 Feb 2021 13:43:12 +0000 Subject: [PATCH] add release scripts --- android/ffmpeg-kit-android-lib/build.gradle | 6 +- scripts/function-apple.sh | 6 + scripts/function-ios.sh | 18 +- scripts/function-macos.sh | 10 +- scripts/function-tvos.sh | 14 +- scripts/function.sh | 11 +- tools/release/android.lts.sh | 91 ++++++++ tools/release/android.sh | 91 ++++++++ tools/release/android/build.gradle | 6 +- tools/release/android/build.lts.gradle | 6 +- tools/release/android/release.template.gradle | 201 ++++++------------ .../apple/ffmpeg-kit-ios-audio.podspec | 24 +++ .../apple/ffmpeg-kit-ios-full-gpl.podspec | 24 +++ .../release/apple/ffmpeg-kit-ios-full.podspec | 24 +++ .../apple/ffmpeg-kit-ios-https-gpl.podspec | 24 +++ .../apple/ffmpeg-kit-ios-https.podspec | 24 +++ .../apple/ffmpeg-kit-ios-min-gpl.podspec | 24 +++ .../release/apple/ffmpeg-kit-ios-min.podspec | 24 +++ .../apple/ffmpeg-kit-ios-video.podspec | 24 +++ .../apple/ffmpeg-kit-macos-audio.podspec | 24 +++ .../apple/ffmpeg-kit-macos-full-gpl.podspec | 24 +++ .../apple/ffmpeg-kit-macos-full.podspec | 24 +++ .../apple/ffmpeg-kit-macos-https-gpl.podspec | 24 +++ .../apple/ffmpeg-kit-macos-https.podspec | 24 +++ .../apple/ffmpeg-kit-macos-min-gpl.podspec | 24 +++ .../apple/ffmpeg-kit-macos-min.podspec | 24 +++ .../apple/ffmpeg-kit-macos-video.podspec | 24 +++ .../apple/ffmpeg-kit-tvos-audio.podspec | 24 +++ .../apple/ffmpeg-kit-tvos-full-gpl.podspec | 24 +++ .../apple/ffmpeg-kit-tvos-full.podspec | 24 +++ .../apple/ffmpeg-kit-tvos-https-gpl.podspec | 24 +++ .../apple/ffmpeg-kit-tvos-https.podspec | 24 +++ .../apple/ffmpeg-kit-tvos-min-gpl.podspec | 24 +++ .../release/apple/ffmpeg-kit-tvos-min.podspec | 24 +++ .../apple/ffmpeg-kit-tvos-video.podspec | 24 +++ tools/release/common.sh | 45 ++++ tools/release/ios.lts.sh | 120 +++++++++++ tools/release/ios.sh | 94 ++++++++ tools/release/macos.lts.sh | 120 +++++++++++ tools/release/macos.sh | 94 ++++++++ tools/release/tvos.lts.sh | 120 +++++++++++ tools/release/tvos.sh | 94 ++++++++ tvos.sh | 8 + 43 files changed, 1569 insertions(+), 162 deletions(-) create mode 100755 tools/release/android.lts.sh create mode 100755 tools/release/android.sh create mode 100644 tools/release/apple/ffmpeg-kit-ios-audio.podspec create mode 100644 tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec create mode 100644 tools/release/apple/ffmpeg-kit-ios-full.podspec create mode 100644 tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec create mode 100644 tools/release/apple/ffmpeg-kit-ios-https.podspec create mode 100644 tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec create mode 100644 tools/release/apple/ffmpeg-kit-ios-min.podspec create mode 100644 tools/release/apple/ffmpeg-kit-ios-video.podspec create mode 100644 tools/release/apple/ffmpeg-kit-macos-audio.podspec create mode 100644 tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec create mode 100644 tools/release/apple/ffmpeg-kit-macos-full.podspec create mode 100644 tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec create mode 100644 tools/release/apple/ffmpeg-kit-macos-https.podspec create mode 100644 tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec create mode 100644 tools/release/apple/ffmpeg-kit-macos-min.podspec create mode 100644 tools/release/apple/ffmpeg-kit-macos-video.podspec create mode 100644 tools/release/apple/ffmpeg-kit-tvos-audio.podspec create mode 100644 tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec create mode 100644 tools/release/apple/ffmpeg-kit-tvos-full.podspec create mode 100644 tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec create mode 100644 tools/release/apple/ffmpeg-kit-tvos-https.podspec create mode 100644 tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec create mode 100644 tools/release/apple/ffmpeg-kit-tvos-min.podspec create mode 100644 tools/release/apple/ffmpeg-kit-tvos-video.podspec create mode 100755 tools/release/common.sh create mode 100755 tools/release/ios.lts.sh create mode 100755 tools/release/ios.sh create mode 100755 tools/release/macos.lts.sh create mode 100755 tools/release/macos.sh create mode 100755 tools/release/tvos.lts.sh create mode 100755 tools/release/tvos.sh diff --git a/android/ffmpeg-kit-android-lib/build.gradle b/android/ffmpeg-kit-android-lib/build.gradle index 42a400a..8c017a9 100644 --- a/android/ffmpeg-kit-android-lib/build.gradle +++ b/android/ffmpeg-kit-android-lib/build.gradle @@ -41,5 +41,9 @@ task javadoc(type: Javadoc) { dependencies { implementation 'com.arthenica:smart-exception-java:0.1.0' testImplementation "androidx.test.ext:junit:1.1.2" - testImplementation "org.json:json:20190722" + testImplementation "org.json:json:20201115" +} + +if (System.properties.containsKey('releaseFFmpegKit')) { + apply from: "${rootProject.projectDir}/../tools/release/android/release.template.gradle" } diff --git a/scripts/function-apple.sh b/scripts/function-apple.sh index 0dbe091..307c08a 100755 --- a/scripts/function-apple.sh +++ b/scripts/function-apple.sh @@ -469,6 +469,12 @@ create_framework() { local LIBRARY_NAME=$(get_library_name "${LIBRARY_INDEX}") local PACKAGE_CONFIG_FILE_NAME=$(get_package_config_file_name "${LIBRARY_INDEX}") + if [[ $(is_apple_architecture_variant_supported "${ARCHITECTURE_VARIANT}") -eq 0 ]]; then + + # THERE ARE NO ARCHITECTURES ENABLED FOR THIS LIBRARY TYPE + return + fi + # EACH ENABLED LIBRARY HAS TO HAVE A .pc FILE AND A VERSION local LIBRARY_VERSION=$(get_external_library_version "${PACKAGE_CONFIG_FILE_NAME}") if [[ -z ${LIBRARY_VERSION} ]]; then diff --git a/scripts/function-ios.sh b/scripts/function-ios.sh index 0139d8f..ea95de5 100755 --- a/scripts/function-ios.sh +++ b/scripts/function-ios.sh @@ -464,32 +464,32 @@ initialize_prebuilt_ios_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_IPHONEOS}") -eq 1 ]]; then - mkdir -p "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_IPHONEOS}")" 1>>"${BASEDIR}"/build.log 2>&1 - mkdir -p "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_IPHONEOS}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(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 - mkdir -p "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_IPHONESIMULATOR}")" 1>>"${BASEDIR}"/build.log 2>&1 - mkdir -p "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_IPHONESIMULATOR}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(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 - mkdir -p "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_MAC_CATALYST}")" 1>>"${BASEDIR}"/build.log 2>&1 - mkdir -p "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_MAC_CATALYST}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_MAC_CATALYST}")" + initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_MAC_CATALYST}")" fi echo -e "DEBUG: Initializing xcframework directory at ${BASEDIR}/prebuilt/$(get_xcframework_directory)\n" 1>>"${BASEDIR}"/build.log 2>&1 # XCF BUILDS GENERATE XCFFRAMEWORKS - mkdir -p "${BASEDIR}/prebuilt/$(get_xcframework_directory)" 1>>"${BASEDIR}"/build.log 2>&1 + 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 # DEFAULT BUILDS GENERATE UNIVERSAL LIBRARIES AND FRAMEWORKS - mkdir -p "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_IOS}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(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 - mkdir -p "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_IOS}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_IOS}")" fi } diff --git a/scripts/function-macos.sh b/scripts/function-macos.sh index b63d2b4..1212d21 100755 --- a/scripts/function-macos.sh +++ b/scripts/function-macos.sh @@ -376,24 +376,24 @@ 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 - mkdir -p "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_MACOS}")" 1>>"${BASEDIR}"/build.log 2>&1 - mkdir -p "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_MACOS}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_MACOS}")" + initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_MACOS}")" fi echo -e "DEBUG: Initializing xcframework directory at ${BASEDIR}/prebuilt/$(get_xcframework_directory)\n" 1>>"${BASEDIR}"/build.log 2>&1 # XCF BUILDS GENERATE XCFFRAMEWORKS - mkdir -p "${BASEDIR}/prebuilt/$(get_xcframework_directory)" 1>>"${BASEDIR}"/build.log 2>&1 + 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 # DEFAULT BUILDS GENERATE UNIVERSAL LIBRARIES AND FRAMEWORKS - mkdir -p "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_MACOS}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(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 - mkdir -p "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_MACOS}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_MACOS}")" fi } diff --git a/scripts/function-tvos.sh b/scripts/function-tvos.sh index b2b30db..21fbacf 100755 --- a/scripts/function-tvos.sh +++ b/scripts/function-tvos.sh @@ -429,28 +429,28 @@ 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 - mkdir -p "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_APPLETVOS}")" 1>>"${BASEDIR}"/build.log 2>&1 - mkdir -p "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_APPLETVOS}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(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 - mkdir -p "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_APPLETVSIMULATOR}")" 1>>"${BASEDIR}"/build.log 2>&1 - mkdir -p "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_APPLETVSIMULATOR}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_APPLETVSIMULATOR}")" + initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_APPLETVSIMULATOR}")" fi echo -e "DEBUG: Initializing xcframework directory at ${BASEDIR}/prebuilt/$(get_xcframework_directory)\n" 1>>"${BASEDIR}"/build.log 2>&1 # XCF BUILDS GENERATE XCFFRAMEWORKS - mkdir -p "${BASEDIR}/prebuilt/$(get_xcframework_directory)" 1>>"${BASEDIR}"/build.log 2>&1 + 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 # DEFAULT BUILDS GENERATE UNIVERSAL LIBRARIES AND FRAMEWORKS - mkdir -p "${BASEDIR}/prebuilt/$(get_universal_library_directory "${ARCH_VAR_TVOS}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(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 - mkdir -p "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_TVOS}")" 1>>"${BASEDIR}"/build.log 2>&1 + initialize_folder "${BASEDIR}/prebuilt/$(get_framework_directory "${ARCH_VAR_TVOS}")" fi } diff --git a/scripts/function.sh b/scripts/function.sh index c1e8803..d5aa899 100755 --- a/scripts/function.sh +++ b/scripts/function.sh @@ -332,7 +332,7 @@ is_arch_supported_on_platform() { ;; # IOS - $ARCH_ARMV7 | $ARCH_ARMV7S | $ARCH_ARM64E | $ARCH_I386 | $ARCH_X86_64_MAC_CATALYST | $ARCH_ARM64_MAC_CATALYST | $ARCH_ARM64_SIMULATOR) + $ARCH_ARMV7 | $ARCH_ARMV7S | $ARCH_ARM64E | $ARCH_I386 | $ARCH_X86_64_MAC_CATALYST | $ARCH_ARM64_MAC_CATALYST) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]]; then echo 1 else @@ -340,6 +340,15 @@ is_arch_supported_on_platform() { fi ;; + # IOS OR TVOS + $ARCH_ARM64_SIMULATOR) + if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]]; then + echo 1 + else + echo 0 + fi + ;; + # IOS, MACOS OR TVOS $ARCH_ARM64) if [[ ${FFMPEG_KIT_BUILD_TYPE} == "ios" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "tvos" ]] || [[ ${FFMPEG_KIT_BUILD_TYPE} == "macos" ]]; then diff --git a/tools/release/android.lts.sh b/tools/release/android.lts.sh new file mode 100755 index 0000000..72e0213 --- /dev/null +++ b/tools/release/android.lts.sh @@ -0,0 +1,91 @@ +#!/bin/bash +# +# Creates a new android release from the current branch +# + +RELEASE_TYPE=android + +source ./common.sh +export PACKAGE_DIRECTORY="${BASEDIR}/../../prebuilt/bundle-android-aar-lts/ffmpeg-kit" + +create_package() { + local NEW_PACKAGE="${PACKAGE_DIRECTORY}/ffmpeg-kit-$1-$2.LTS.aar" + + local CURRENT_PACKAGE="${PACKAGE_DIRECTORY}/ffmpeg-kit.aar" + rm -f "${NEW_PACKAGE}" + + mv "${CURRENT_PACKAGE}" "${NEW_PACKAGE}" || exit 1 +} + +if [ $# -ne 1 ]; then + echo "Usage: android.lts.sh " + exit 1 +fi + +export VERSION_CODE="${ANDROID_LTS_MIN_SDK}0"$(echo $1 | sed "s/\.//g")"0" + +# VALIDATE VERSIONS +if [[ "${ANDROID_FFMPEG_KIT_VERSION}" != "$1" ]]; then + echo "Error: version mismatch. v$1 requested but v${ANDROID_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again." + echo "1. Update docs" + echo "2. Update gradle files under the tools/release/android folder" + echo "3. Update the versions in tools/release/common.sh" + echo "4. Update ffmpegkit.h versions for both android and ios" + echo "5. Update versions in Doxyfile" + exit 1 +fi + +# MIN RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_LTS_OPTIONS} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1.LTS" -PreleaseMinSdk="${ANDROID_LTS_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-min -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_MIN}" uploadArchives || exit 1 +create_package "min" "$1" || exit 1 + +# MIN-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_LTS_OPTIONS} ${GPL_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1.LTS" -PreleaseMinSdk="${ANDROID_LTS_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-min-gpl -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_MIN_GPL}" -PreleaseGPL=1 uploadArchives || exit 1 +create_package "min-gpl" "$1" || exit 1 + +# HTTPS RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_LTS_OPTIONS} ${HTTPS_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1.LTS" -PreleaseMinSdk="${ANDROID_LTS_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-https -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_HTTPS}" uploadArchives || exit 1 +create_package "https" "$1" || exit 1 + +# HTTPS-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_LTS_OPTIONS} ${HTTPS_PACKAGES} ${GPL_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1.LTS" -PreleaseMinSdk="${ANDROID_LTS_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-https-gpl -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_HTTPS_GPL}" -PreleaseGPL=1 uploadArchives || exit 1 +create_package "https-gpl" "$1" || exit 1 + +# AUDIO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_LTS_OPTIONS} ${AUDIO_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1.LTS" -PreleaseMinSdk="${ANDROID_LTS_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-audio -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_AUDIO}" uploadArchives || exit 1 +create_package "audio" "$1" || exit 1 + +# VIDEO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_LTS_OPTIONS} ${VIDEO_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1.LTS" -PreleaseMinSdk="${ANDROID_LTS_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-video -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_VIDEO}" uploadArchives || exit 1 +create_package "video" "$1" || exit 1 + +# FULL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_LTS_OPTIONS} ${FULL_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1.LTS" -PreleaseMinSdk="${ANDROID_LTS_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-full -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_FULL}" uploadArchives || exit 1 +create_package "full" "$1" || exit 1 + +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_LTS_OPTIONS} ${FULL_PACKAGES} ${GPL_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1.LTS" -PreleaseMinSdk="${ANDROID_LTS_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-full-gpl -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_FULL_GPL}" -PreleaseGPL=1 uploadArchives || exit 1 +create_package "full-gpl" "$1" || exit 1 diff --git a/tools/release/android.sh b/tools/release/android.sh new file mode 100755 index 0000000..b39d8aa --- /dev/null +++ b/tools/release/android.sh @@ -0,0 +1,91 @@ +#!/bin/bash +# +# Creates a new android release from the current branch +# + +RELEASE_TYPE=android + +source ./common.sh +export PACKAGE_DIRECTORY="${BASEDIR}/../../prebuilt/bundle-android-aar/ffmpeg-kit" + +create_package() { + local NEW_PACKAGE="${PACKAGE_DIRECTORY}/ffmpeg-kit-$1-$2.aar" + + local CURRENT_PACKAGE="${PACKAGE_DIRECTORY}/ffmpeg-kit.aar" + rm -f "${NEW_PACKAGE}" + + mv "${CURRENT_PACKAGE}" "${NEW_PACKAGE}" || exit 1 +} + +if [ $# -ne 1 ]; then + echo "Usage: android.sh " + exit 1 +fi + +export VERSION_CODE="${ANDROID_MAIN_MIN_SDK}0"$(echo $1 | sed "s/\.//g")"0" + +# VALIDATE VERSIONS +if [[ "${ANDROID_FFMPEG_KIT_VERSION}" != "$1" ]]; then + echo "Error: version mismatch. v$1 requested but v${ANDROID_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again." + echo "1. Update docs" + echo "2. Update gradle files under the tools/release/android folder" + echo "3. Update the versions in tools/release/common.sh" + echo "4. Update ffmpegkit.h versions for both android and ios" + echo "5. Update versions in Doxyfile" + exit 1 +fi + +# MIN RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_MAIN_OPTIONS} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1" -PreleaseMinSdk="${ANDROID_MAIN_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-min -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_MIN}" uploadArchives || exit 1 +create_package "min" "$1" || exit 1 + +# MIN-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_MAIN_OPTIONS} ${GPL_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1" -PreleaseMinSdk="${ANDROID_MAIN_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-min-gpl -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_MIN_GPL}" -PreleaseGPL=1 uploadArchives || exit 1 +create_package "min-gpl" "$1" || exit 1 + +# HTTPS RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_MAIN_OPTIONS} ${HTTPS_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1" -PreleaseMinSdk="${ANDROID_MAIN_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-https -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_HTTPS}" uploadArchives || exit 1 +create_package "https" "$1" || exit 1 + +# HTTPS-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_MAIN_OPTIONS} ${HTTPS_PACKAGES} ${GPL_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1" -PreleaseMinSdk="${ANDROID_MAIN_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-https-gpl -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_HTTPS_GPL}" -PreleaseGPL=1 uploadArchives || exit 1 +create_package "https-gpl" "$1" || exit 1 + +# AUDIO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_MAIN_OPTIONS} ${AUDIO_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1" -PreleaseMinSdk="${ANDROID_MAIN_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-audio -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_AUDIO}" uploadArchives || exit 1 +create_package "audio" "$1" || exit 1 + +# VIDEO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_MAIN_OPTIONS} ${VIDEO_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1" -PreleaseMinSdk="${ANDROID_MAIN_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-video -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_VIDEO}" uploadArchives || exit 1 +create_package "video" "$1" || exit 1 + +# FULL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_MAIN_OPTIONS} ${FULL_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1" -PreleaseMinSdk="${ANDROID_MAIN_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-full -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_FULL}" uploadArchives || exit 1 +create_package "full" "$1" || exit 1 + +cd "${BASEDIR}/../.." || exit 1 +./android.sh ${ANDROID_MAIN_OPTIONS} ${FULL_PACKAGES} ${GPL_PACKAGES} || exit 1 +cd "${BASEDIR}"/../../android/ffmpeg-kit-android-lib || exit 1 +gradle -p "${BASEDIR}"/../../android/ffmpeg-kit-android-lib -DreleaseFFmpegKit=true -PreleaseVersionCode="${VERSION_CODE}" -PreleaseVersionName="$1" -PreleaseMinSdk="${ANDROID_MAIN_MIN_SDK}" -PreleaseTargetSdk="${ANDROID_TARGET_SDK}" -PreleaseProject=ffmpeg-kit-full-gpl -PreleaseProjectDescription="${LIBRARY_DESCRIPTION_FULL_GPL}" -PreleaseGPL=1 uploadArchives || exit 1 +create_package "full-gpl" "$1" || exit 1 diff --git a/tools/release/android/build.gradle b/tools/release/android/build.gradle index 42a400a..8c017a9 100644 --- a/tools/release/android/build.gradle +++ b/tools/release/android/build.gradle @@ -41,5 +41,9 @@ task javadoc(type: Javadoc) { dependencies { implementation 'com.arthenica:smart-exception-java:0.1.0' testImplementation "androidx.test.ext:junit:1.1.2" - testImplementation "org.json:json:20190722" + testImplementation "org.json:json:20201115" +} + +if (System.properties.containsKey('releaseFFmpegKit')) { + apply from: "${rootProject.projectDir}/../tools/release/android/release.template.gradle" } diff --git a/tools/release/android/build.lts.gradle b/tools/release/android/build.lts.gradle index 0020767..6c643d9 100644 --- a/tools/release/android/build.lts.gradle +++ b/tools/release/android/build.lts.gradle @@ -41,5 +41,9 @@ task javadoc(type: Javadoc) { dependencies { implementation 'com.arthenica:smart-exception-java:0.1.0' testImplementation "androidx.test.ext:junit:1.1.2" - testImplementation "org.json:json:20190722" + testImplementation "org.json:json:20201115" +} + +if (System.properties.containsKey('releaseFFmpegKit')) { + apply from: "${rootProject.projectDir}/../tools/release/android/release.template.gradle" } diff --git a/tools/release/android/release.template.gradle b/tools/release/android/release.template.gradle index b4c1969..2532587 100644 --- a/tools/release/android/release.template.gradle +++ b/tools/release/android/release.template.gradle @@ -1,72 +1,50 @@ -apply plugin: 'com.android.library' -apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'com.jfrog.bintray' +task sourcesJar(type: Jar) { + archiveClassifier.set('sources') + from android.sourceSets.main.java.srcDirs +} -buildscript { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:4.0.1' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - } +task javadoc(type: Javadoc) { + title = 'FFmpegKit' + source = android.sourceSets.main.java.srcDirs + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) } -android { - compileSdkVersion Integer.parseInt(releaseTargetSdk) - ndkVersion "21.3.6528147" - - defaultConfig { - minSdkVersion Integer.parseInt(releaseMinSdk) - targetSdkVersion Integer.parseInt(releaseTargetSdk) - versionCode Integer.parseInt(releaseVersionCode) - versionName releaseVersionName - project.archivesBaseName = releaseProject - consumerProguardFiles 'proguard-rules.pro' - } +task javadocJar(type: Jar, dependsOn: javadoc) { + archiveClassifier.set('javadoc') + from javadoc.destinationDir +} - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } +artifacts { + archives javadocJar + archives sourcesJar +} - sourceSets { - main { - jniLibs.srcDirs = ["../libs"] - } - } +apply plugin: 'maven' +apply plugin: 'signing' - testOptions { - unitTests.returnDefaultValues = true - } +group = 'com.arthenica' +archivesBaseName = releaseProject +version = releaseVersionName - libraryVariants.all { variant -> - variant.outputs.all { - outputFileName = "${archivesBaseName}-${android.defaultConfig.versionName}.aar" - } +File propertiesFile = project.rootProject.file('local.properties') +if (propertiesFile.exists()) { + Properties properties = new Properties() + properties.load(new FileInputStream(propertiesFile)) + properties.each { name, value -> + ext[name] = value } } ext { - bintrayRepo = 'maven' - bintrayName = releaseProject - - publishedGroupId = 'com.arthenica' - libraryName = releaseProject + publishedGroupId = group artifact = releaseProject - + libraryName = releaseProject + libraryVersion = version libraryDescription = releaseProjectDescription siteUrl = 'https://github.com/tanersener/ffmpeg-kit' - issueTrackerUrl = 'https://github.com/tanersener/ffmpeg-kit/issues' gitUrl = 'https://github.com/tanersener/ffmpeg-kit.git' - libraryVersion = releaseVersionName - developerId = 'tanersener' developerName = 'Taner Sener' developerEmail = 'tanersener@gmail.com' @@ -74,105 +52,54 @@ ext { if (Project.hasProperty('releaseGPL')) { licenseName = 'GNU General Public License version 3' licenseUrl = 'https://www.gnu.org/licenses/gpl-3.0.txt' - allLicenses = ["GPL-3.0"] } else { licenseName = 'GNU Lesser General Public License, Version 3' licenseUrl = 'https://www.gnu.org/licenses/lgpl-3.0.txt' - allLicenses = ["LGPL-3.0"] } } -group = publishedGroupId -version = libraryVersion +uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } -install { - repositories.mavenInstaller { - pom.project { - packaging 'aar' - groupId publishedGroupId - artifactId artifact + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } - name libraryName - description libraryDescription - url siteUrl + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } - licenses { - license { - name licenseName - url licenseUrl + pom.project { + packaging 'aar' + name = libraryName + description = libraryDescription + url = siteUrl + + licenses { + license { + name = licenseName + url = licenseUrl + } } - } - developers { - developer { - id developerId - name developerName - email developerEmail + developers { + developer { + id developerId + name developerName + email developerEmail + } + } + scm { + connection gitUrl + developerConnection gitUrl + url siteUrl } - } - scm { - connection gitUrl - developerConnection gitUrl - url siteUrl } } } } -Properties properties = new Properties() -properties.load(project.rootProject.file('local.properties').newDataInputStream()) - -bintray { - user = properties.getProperty("bintray.user") - key = properties.getProperty("bintray.apikey") - - configurations = ['archives'] - pkg { - repo = bintrayRepo - name = bintrayName - desc = libraryDescription - websiteUrl = siteUrl - vcsUrl = gitUrl - issueTrackerUrl = issueTrackerUrl - licenses = allLicenses - dryRun = true - publish = false - override = false - publicDownloadNumbers = false - version { - desc = libraryDescription - } - } -} - -task sourcesJar(type: Jar) { - archiveClassifier.set('sources') - from android.sourceSets.main.java.srcDirs -} - -task javadoc(type: Javadoc) { - title = 'FFmpegKit' - source = android.sourceSets.main.java.srcDirs - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - archiveClassifier.set('javadoc') - from javadoc.destinationDir -} - -artifacts { - archives javadocJar - archives sourcesJar -} - -dependencies { - testImplementation "androidx.test.ext:junit:1.1.2" - testImplementation "org.json:json:20190722" -} - -allprojects { - repositories { - google() - jcenter() - } +signing { + sign configurations.archives } diff --git a/tools/release/apple/ffmpeg-kit-ios-audio.podspec b/tools/release/apple/ffmpeg-kit-ios-audio.podspec new file mode 100644 index 0000000..b171d48 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-ios-audio.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-ios-audio" + s.version = "VERSION" + s.summary = "FFmpeg Kit iOS Audio Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :ios + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-audio-VERSION-ios-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec b/tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec new file mode 100644 index 0000000..548506f --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-ios-full-gpl.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-ios-full-gpl" + s.version = "VERSION" + s.summary = "FFmpeg Kit iOS Full GPL Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "GPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :ios + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-gpl-VERSION-ios-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-ios-full.podspec b/tools/release/apple/ffmpeg-kit-ios-full.podspec new file mode 100644 index 0000000..38f08ac --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-ios-full.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-ios-full" + s.version = "VERSION" + s.summary = "FFmpeg Kit iOS Full Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :ios + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-VERSION-ios-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec b/tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec new file mode 100644 index 0000000..218bbe3 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-ios-https-gpl.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-ios-https-gpl" + s.version = "VERSION" + s.summary = "FFmpeg Kit iOS Https GPL Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "GPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :ios + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-gpl-VERSION-ios-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-ios-https.podspec b/tools/release/apple/ffmpeg-kit-ios-https.podspec new file mode 100644 index 0000000..7cc5db3 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-ios-https.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-ios-https" + s.version = "VERSION" + s.summary = "FFmpeg Kit iOS Https Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :ios + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-VERSION-ios-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec b/tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec new file mode 100644 index 0000000..6b1ff4b --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-ios-min-gpl.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-ios-min-gpl" + s.version = "VERSION" + s.summary = "FFmpeg Kit iOS Min GPL Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "GPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :ios + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-gpl-VERSION-ios-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-ios-min.podspec b/tools/release/apple/ffmpeg-kit-ios-min.podspec new file mode 100644 index 0000000..d800b40 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-ios-min.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-ios-min" + s.version = "VERSION" + s.summary = "FFmpeg Kit iOS Min Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :ios + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-VERSION-ios-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-ios-video.podspec b/tools/release/apple/ffmpeg-kit-ios-video.podspec new file mode 100644 index 0000000..0beacb2 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-ios-video.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-ios-video" + s.version = "VERSION" + s.summary = "FFmpeg Kit iOS Video Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :ios + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-video-VERSION-ios-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-macos-audio.podspec b/tools/release/apple/ffmpeg-kit-macos-audio.podspec new file mode 100644 index 0000000..3aebdbf --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-macos-audio.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-macos-audio" + s.version = "VERSION" + s.summary = "FFmpeg Kit macOS Audio Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :osx + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-audio-VERSION-macos-framework.zip" } + + s.osx.deployment_target = '10.11' + s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','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' + +end diff --git a/tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec b/tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec new file mode 100644 index 0000000..84f86da --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-macos-full-gpl.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-macos-full-gpl" + s.version = "VERSION" + s.summary = "FFmpeg Kit macOS Full GPL Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "GPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :osx + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + 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','CoreMedia','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' + +end diff --git a/tools/release/apple/ffmpeg-kit-macos-full.podspec b/tools/release/apple/ffmpeg-kit-macos-full.podspec new file mode 100644 index 0000000..b833bad --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-macos-full.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-macos-full" + s.version = "VERSION" + s.summary = "FFmpeg Kit macOS Full Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :osx + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + 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','CoreMedia','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' + +end diff --git a/tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec b/tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec new file mode 100644 index 0000000..70d0f6b --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-macos-https-gpl.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-macos-https-gpl" + s.version = "VERSION" + s.summary = "FFmpeg Kit macOS Https GPL Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "GPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :osx + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + 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','CoreMedia','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' + +end diff --git a/tools/release/apple/ffmpeg-kit-macos-https.podspec b/tools/release/apple/ffmpeg-kit-macos-https.podspec new file mode 100644 index 0000000..3502885 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-macos-https.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-macos-https" + s.version = "VERSION" + s.summary = "FFmpeg Kit macOS Https Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :osx + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + 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','CoreMedia','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' + +end diff --git a/tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec b/tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec new file mode 100644 index 0000000..44bf12a --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-macos-min-gpl.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-macos-min-gpl" + s.version = "VERSION" + s.summary = "FFmpeg Kit macOS Min GPL Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "GPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :osx + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-gpl-VERSION-macos-framework.zip" } + + s.osx.deployment_target = '10.11' + s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','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' + +end diff --git a/tools/release/apple/ffmpeg-kit-macos-min.podspec b/tools/release/apple/ffmpeg-kit-macos-min.podspec new file mode 100644 index 0000000..51b7596 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-macos-min.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-macos-min" + s.version = "VERSION" + s.summary = "FFmpeg Kit macOS Min Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :osx + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-VERSION-macos-framework.zip" } + + s.osx.deployment_target = '10.11' + s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','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-video.podspec b/tools/release/apple/ffmpeg-kit-macos-video.podspec new file mode 100644 index 0000000..7b8b19c --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-macos-video.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-macos-video" + s.version = "VERSION" + s.summary = "FFmpeg Kit macOS Video Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :osx + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-video-VERSION-macos-framework.zip" } + + s.osx.deployment_target = '10.11' + s.osx.frameworks = 'AudioToolbox','AVFoundation','CoreMedia','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' + +end diff --git a/tools/release/apple/ffmpeg-kit-tvos-audio.podspec b/tools/release/apple/ffmpeg-kit-tvos-audio.podspec new file mode 100644 index 0000000..98cbf65 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-tvos-audio.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-tvos-audio" + s.version = "VERSION" + s.summary = "FFmpeg Kit tvOS Audio Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :tvos + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-audio-VERSION-tvos-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec b/tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec new file mode 100644 index 0000000..577d857 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-tvos-full-gpl.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-tvos-full-gpl" + s.version = "VERSION" + s.summary = "FFmpeg Kit tvOS Full GPL Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "GPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :tvos + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-gpl-VERSION-tvos-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-tvos-full.podspec b/tools/release/apple/ffmpeg-kit-tvos-full.podspec new file mode 100644 index 0000000..63b1946 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-tvos-full.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-tvos-full" + s.version = "VERSION" + s.summary = "FFmpeg Kit tvOS Full Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :tvos + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-full-VERSION-tvos-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec b/tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec new file mode 100644 index 0000000..98b27c5 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-tvos-https-gpl.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-tvos-https-gpl" + s.version = "VERSION" + s.summary = "FFmpeg Kit tvOS Https GPL Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "GPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :tvos + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-gpl-VERSION-tvos-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-tvos-https.podspec b/tools/release/apple/ffmpeg-kit-tvos-https.podspec new file mode 100644 index 0000000..d00368b --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-tvos-https.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-tvos-https" + s.version = "VERSION" + s.summary = "FFmpeg Kit tvOS Https Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :tvos + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-https-VERSION-tvos-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec b/tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec new file mode 100644 index 0000000..9bb5698 --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-tvos-min-gpl.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-tvos-min-gpl" + s.version = "VERSION" + s.summary = "FFmpeg Kit tvOS Min GPL Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "GPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :tvos + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-gpl-VERSION-tvos-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-tvos-min.podspec b/tools/release/apple/ffmpeg-kit-tvos-min.podspec new file mode 100644 index 0000000..9c8676a --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-tvos-min.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-tvos-min" + s.version = "VERSION" + s.summary = "FFmpeg Kit tvOS Min Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :tvos + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-min-VERSION-tvos-framework.zip" } + + 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' + +end diff --git a/tools/release/apple/ffmpeg-kit-tvos-video.podspec b/tools/release/apple/ffmpeg-kit-tvos-video.podspec new file mode 100644 index 0000000..e785c5a --- /dev/null +++ b/tools/release/apple/ffmpeg-kit-tvos-video.podspec @@ -0,0 +1,24 @@ +Pod::Spec.new do |s| + s.name = "ffmpeg-kit-tvos-video" + s.version = "VERSION" + s.summary = "FFmpeg Kit tvOS Video Static Framework" + s.description = <<-DESC + DESCRIPTION + DESC + + s.homepage = "https://github.com/tanersener/ffmpeg-kit" + + s.author = { "Taner Sener" => "tanersener@gmail.com" } + s.license = { :type => "LGPL-3.0", :file => "ffmpegkit.framework/LICENSE" } + + s.platform = :tvos + s.requires_arc = true + s.libraries = 'z', 'bz2', 'c++', 'iconv' + + s.source = { :http => "https://github.com/tanersener/ffmpeg-kit/releases/download/vVERSION/ffmpeg-kit-video-VERSION-tvos-framework.zip" } + + 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' + +end diff --git a/tools/release/common.sh b/tools/release/common.sh new file mode 100755 index 0000000..c787d6f --- /dev/null +++ b/tools/release/common.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +export BASEDIR=$(pwd) + +export ANDROID_MAIN_OPTIONS="--disable-arm-v7a --enable-android-media-codec --enable-android-zlib" +export ANDROID_LTS_OPTIONS="--lts --enable-android-media-codec --enable-android-zlib" + +export IOS_MAIN_OPTIONS="--xcframework --disable-armv7 --disable-armv7s --disable-i386 --disable-arm64e --enable-ios-audiotoolbox --enable-ios-avfoundation --enable-ios-bzip2 --enable-ios-libiconv --enable-ios-videotoolbox --enable-ios-zlib" +export IOS_LTS_OPTIONS="--disable-armv7s --lts --enable-ios-audiotoolbox --enable-ios-bzip2 --enable-ios-libiconv --enable-ios-videotoolbox --enable-ios-zlib" + +export TVOS_MAIN_OPTIONS="--xcframework --enable-tvos-bzip2 --enable-tvos-audiotoolbox --enable-tvos-libiconv --enable-tvos-videotoolbox --enable-tvos-zlib" +export TVOS_LTS_OPTIONS="--disable-arm64-simulator --lts --enable-tvos-bzip2 --enable-tvos-audiotoolbox --enable-tvos-libiconv --enable-tvos-zlib" + +export TVOS_MAIN_OPTIONS="--xcframework --enable-macos-audiotoolbox --enable-macos-avfoundation --enable-macos-bzip2 --enable-macos-coreimage --enable-macos-libiconv --enable-macos-opencl --enable-macos-opengl --enable-macos-videotoolbox --enable-macos-zlib" +export TVOS_LTS_OPTIONS="--disable-arm64 --lts --enable-macos-audiotoolbox --enable-macos-bzip2 --enable-macos-coreimage --enable-macos-libiconv --enable-macos-opencl --enable-macos-opengl --enable-macos-videotoolbox --enable-macos-zlib" + +if [[ "${RELEASE_TYPE}" == "android" ]]; then + export ANDROID_EXTRA_VIDEO_PACKAGES="--enable-libiconv " + export ANDROID_EXTRA_DESCRIPTION="libiconv, " +else + export ANDROID_EXTRA_VIDEO_PACKAGES="" + export ANDROID_EXTRA_DESCRIPTION="" +fi + +export GPL_PACKAGES="--enable-gpl --enable-libvidstab --enable-x264 --enable-x265 --enable-xvidcore" +export HTTPS_PACKAGES="--enable-gnutls --enable-gmp" +export AUDIO_PACKAGES="--enable-lame --enable-libilbc --enable-libvorbis --enable-opencore-amr --enable-opus --enable-shine --enable-soxr --enable-speex --enable-twolame --enable-vo-amrwbenc" +export VIDEO_PACKAGES="--enable-dav1d --enable-fontconfig --enable-freetype --enable-fribidi --enable-kvazaar --enable-libass ${ANDROID_EXTRA_VIDEO_PACKAGES} --enable-libtheora --enable-libvpx --enable-snappy --enable-libwebp" +export FULL_PACKAGES="--enable-dav1d --enable-fontconfig --enable-freetype --enable-fribidi --enable-gmp --enable-gnutls --enable-kvazaar --enable-lame --enable-libass ${ANDROID_EXTRA_VIDEO_PACKAGES} --enable-libilbc --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-opencore-amr --enable-opus --enable-shine --enable-snappy --enable-soxr --enable-speex --enable-twolame --enable-vo-amrwbenc" + +export ANDROID_FFMPEG_KIT_VERSION=$(grep '#define FFMPEG_KIT_VERSION' "${BASEDIR}"/../../android/ffmpeg-kit-android-lib/src/main/cpp/ffmpegkit.h | grep -Eo '\".*\"' | sed -e 's/\"//g') +export APPLE_FFMPEG_KIT_VERSION=$(grep 'FFmpegKitVersion ' ${BASEDIR}/../../apple/src/FFmpegKitConfig.m | grep -Eo '\".*\"' | sed -e 's/\"//g') + +export ANDROID_MAIN_MIN_SDK=24 +export ANDROID_LTS_MIN_SDK=16 +export ANDROID_TARGET_SDK=30 + +export LIBRARY_DESCRIPTION_MIN="Includes FFmpeg without any external libraries enabled." +export LIBRARY_DESCRIPTION_MIN_GPL="Includes FFmpeg with libvid.stab, x264, x265 and xvidcore libraries enabled." +export LIBRARY_DESCRIPTION_HTTPS="Includes FFmpeg with gmp and gnutls libraries enabled." +export LIBRARY_DESCRIPTION_HTTPS_GPL="Includes FFmpeg with gmp, gnutls, libvid.stab, x264, x265 and xvidcore libraries enabled." +export LIBRARY_DESCRIPTION_AUDIO="Includes FFmpeg with lame, libilbc, libvorbis, opencore-amr, opus, shine, soxr, speex, twolame and vo-amrwbenc libraries enabled." +export LIBRARY_DESCRIPTION_VIDEO="Includes FFmpeg with dav1d, fontconfig, freetype, fribidi, kvazaar, libass, ${ANDROID_EXTRA_DESCRIPTION}libtheora, libvpx, snappy and libwebp libraries enabled." +export LIBRARY_DESCRIPTION_FULL="Includes FFmpeg with dav1d, fontconfig, freetype, fribidi, gmp, gnutls, kvazaar, lame, libass, ${ANDROID_EXTRA_DESCRIPTION}libilbc, libtheora, libvorbis, libvpx, libwebp, libxml2, opencore-amr, opus, shine, snappy, soxr, speex, twolame and vo-amrwbenc libraries enabled." +export LIBRARY_DESCRIPTION_FULL_GPL="Includes FFmpeg with dav1d, fontconfig, freetype, fribidi, gmp, gnutls, kvazaar, lame, libass, ${ANDROID_EXTRA_DESCRIPTION}libilbc, libtheora, libvid.stab, libvorbis, libvpx, libwebp, libxml2, opencore-amr, opus, shine, snappy, soxr, speex, twolame, vo-amrwbenc, x264, x265 and xvidcore libraries enabled." diff --git a/tools/release/ios.lts.sh b/tools/release/ios.lts.sh new file mode 100755 index 0000000..1ac9727 --- /dev/null +++ b/tools/release/ios.lts.sh @@ -0,0 +1,120 @@ +#!/bin/bash +# +# Creates a new ios lts release from the current branch +# + +source ./common.sh +export SOURCE_PACKAGE="${BASEDIR}/../../prebuilt/bundle-apple-framework-ios-lts" +export COCOAPODS_DIRECTORY="${BASEDIR}/../../prebuilt/bundle-apple-cocoapods-ios-lts" +export SOURCE_UNIVERSAL_PACKAGE="${BASEDIR}/../../prebuilt/bundle-apple-universal-ios-lts" +export ALL_UNIVERSAL_DIRECTORY="${BASEDIR}/../../prebuilt/bundle-apple-all-universal-ios-lts" + +create_package() { + local PACKAGE_NAME="ffmpeg-kit-ios-$1" + local PACKAGE_VERSION="$2" + local PACKAGE_DESCRIPTION="$3" + + local CURRENT_PACKAGE="${COCOAPODS_DIRECTORY}/${PACKAGE_NAME}" + rm -rf "${CURRENT_PACKAGE}" + mkdir -p "${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 + + # COPY PODSPEC AS THE LAST ITEM + cp "${BASEDIR}"/apple/"${PACKAGE_NAME}".podspec "${CURRENT_PACKAGE}" || exit 1 + sed -i '' "s/VERSION/${PACKAGE_VERSION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/DESCRIPTION/${PACKAGE_DESCRIPTION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/\,\'AVFoundation\'//g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + + mkdir -p "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 + local CURRENT_UNIVERSAL_PACKAGE="${ALL_UNIVERSAL_DIRECTORY}/${PACKAGE_NAME}-universal" + rm -rf "${CURRENT_UNIVERSAL_PACKAGE}" + mkdir -p "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 + mkdir -p "${CURRENT_UNIVERSAL_PACKAGE}"/lib || exit 1 + + cd "${SOURCE_UNIVERSAL_PACKAGE}" || exit 1 + find . -name "*.a" -exec cp {} "${CURRENT_UNIVERSAL_PACKAGE}"/lib \; || exit 1 + + # COPY THE LICENSE FILE OF EACH LIBRARY + LICENSE_FILES=$(find . -name LICENSE | grep -vi ffmpeg) + + for LICENSE_FILE in ${LICENSE_FILES[@]} + do + LIBRARY_NAME=$(echo "${LICENSE_FILE}" | sed 's/\.\///g;s/\/LICENSE//g') + 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 "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/LICENSE "${CURRENT_UNIVERSAL_PACKAGE}"/LICENSE || exit 1 + + cd "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 + zip -r "${PACKAGE_NAME}-${PACKAGE_VERSION}-ios-static-universal.zip" "${PACKAGE_NAME}"-universal || exit 1 +} + +if [[ $# -ne 1 ]]; +then + echo "Usage: ios.lts.sh " + exit 1 +fi + +# VALIDATE VERSIONS +if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then + echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again." + echo "1. Update docs" + echo "2. Update gradle files under the tools/release/android folder" + echo "3. Update the versions in tools/release/common.sh" + echo "4. Update podspec links" + echo "5. Update ffmpegkit.h versions for both android and apple" + echo "6. Update versions in Doxyfile" + exit 1 +fi + +# CREATE COCOAPODS DIRECTORY +rm -rf "${COCOAPODS_DIRECTORY}" +mkdir -p "${COCOAPODS_DIRECTORY}" || exit 1 + +rm -rf "${ALL_UNIVERSAL_DIRECTORY}" +mkdir -p "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 + +# MIN RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_LTS_OPTIONS} || exit 1 +create_package "min" "$1.LTS" "${LIBRARY_DESCRIPTION_MIN}" || exit 1 + +# MIN-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_LTS_OPTIONS} ${GPL_PACKAGES} || exit 1 +create_package "min-gpl" "$1.LTS" "${LIBRARY_DESCRIPTION_MIN_GPL}" || exit 1 + +# HTTPS RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_LTS_OPTIONS} ${HTTPS_PACKAGES} || exit 1 +create_package "https" "$1.LTS" "${LIBRARY_DESCRIPTION_HTTPS}" || exit 1 + +# HTTPS-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_LTS_OPTIONS} ${HTTPS_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "https-gpl" "$1.LTS" "${LIBRARY_DESCRIPTION_HTTPS_GPL}" || exit 1 + +# AUDIO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_LTS_OPTIONS} ${AUDIO_PACKAGES} || exit 1 +create_package "audio" "$1.LTS" "${LIBRARY_DESCRIPTION_AUDIO}" || exit 1 + +# VIDEO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_LTS_OPTIONS} ${VIDEO_PACKAGES} || exit 1 +create_package "video" "$1.LTS" "${LIBRARY_DESCRIPTION_VIDEO}" || exit 1 + +# FULL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_LTS_OPTIONS} ${FULL_PACKAGES} || exit 1 +create_package "full" "$1.LTS" "${LIBRARY_DESCRIPTION_FULL}" || exit 1 + +# FULL-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_LTS_OPTIONS} ${FULL_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "full-gpl" "$1.LTS" "${LIBRARY_DESCRIPTION_FULL_GPL}" || exit 1 diff --git a/tools/release/ios.sh b/tools/release/ios.sh new file mode 100755 index 0000000..e4954a0 --- /dev/null +++ b/tools/release/ios.sh @@ -0,0 +1,94 @@ +#!/bin/bash +# +# Creates a new ios release from the current branch +# + +source ./common.sh +export SOURCE_PACKAGE="${BASEDIR}/../../prebuilt/bundle-apple-xcframework-ios" +export COCOAPODS_DIRECTORY="${BASEDIR}/../../prebuilt/bundle-apple-cocoapods-ios" + +create_package() { + local PACKAGE_NAME="ffmpeg-kit-ios-$1" + local PACKAGE_VERSION="$2" + local PACKAGE_DESCRIPTION="$3" + + local CURRENT_PACKAGE="${COCOAPODS_DIRECTORY}/${PACKAGE_NAME}" + rm -rf "${CURRENT_PACKAGE}" + mkdir -p "${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 + + # COPY PODSPEC AS THE LAST ITEM + cp "${BASEDIR}"/apple/"${PACKAGE_NAME}".podspec "${CURRENT_PACKAGE}" || exit 1 + sed -i '' "s/VERSION/${PACKAGE_VERSION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/DESCRIPTION/${PACKAGE_DESCRIPTION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/\.framework/\.xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/-framework/-xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/ios\.xcframeworks/ios\.frameworks/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/9\.3/12\.1/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/ffmpegkit\.xcframework\/LICENSE/ffmpegkit\.xcframework\/ios-arm64\/ffmpegkit\.framework\/LICENSE/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 +} + +if [[ $# -ne 1 ]]; +then + echo "Usage: ios.sh " + exit 1 +fi + +# VALIDATE VERSIONS +if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then + echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again." + echo "1. Update docs" + echo "2. Update gradle files under the tools/release/android folder" + echo "3. Update the versions in tools/release/common.sh" + echo "4. Update podspec links" + echo "5. Update ffmpegkit.h versions for both android and apple" + echo "6. Update versions in Doxyfile" + exit 1 +fi + +# CREATE COCOAPODS DIRECTORY +rm -rf "${COCOAPODS_DIRECTORY}" +mkdir -p "${COCOAPODS_DIRECTORY}" || exit 1 + +# MIN RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_MAIN_OPTIONS} || exit 1 +create_package "min" "$1" "${LIBRARY_DESCRIPTION_MIN}" || exit 1 + +# MIN-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_MAIN_OPTIONS} ${GPL_PACKAGES} || exit 1 +create_package "min-gpl" "$1" "${LIBRARY_DESCRIPTION_MIN_GPL}" || exit 1 + +# HTTPS RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_MAIN_OPTIONS} ${HTTPS_PACKAGES} || exit 1 +create_package "https" "$1" "${LIBRARY_DESCRIPTION_HTTPS}" || exit 1 + +# HTTPS-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_MAIN_OPTIONS} ${HTTPS_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "https-gpl" "$1" "${LIBRARY_DESCRIPTION_HTTPS_GPL}" || exit 1 + +# AUDIO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_MAIN_OPTIONS} ${AUDIO_PACKAGES} || exit 1 +create_package "audio" "$1" "${LIBRARY_DESCRIPTION_AUDIO}" || exit 1 + +# VIDEO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_MAIN_OPTIONS} ${VIDEO_PACKAGES} || exit 1 +create_package "video" "$1" "${LIBRARY_DESCRIPTION_VIDEO}" || exit 1 + +# FULL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_MAIN_OPTIONS} ${FULL_PACKAGES} || exit 1 +create_package "full" "$1" "${LIBRARY_DESCRIPTION_FULL}" || exit 1 + +# FULL-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./ios.sh ${IOS_MAIN_OPTIONS} ${FULL_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "full-gpl" "$1" "${LIBRARY_DESCRIPTION_FULL_GPL}" || exit 1 diff --git a/tools/release/macos.lts.sh b/tools/release/macos.lts.sh new file mode 100755 index 0000000..0f7cf91 --- /dev/null +++ b/tools/release/macos.lts.sh @@ -0,0 +1,120 @@ +#!/bin/bash +# +# Creates a new macos lts release from the current branch +# + +source ./common.sh +export SOURCE_PACKAGE="${BASEDIR}/../../prebuilt/bundle-apple-framework-macos-lts" +export COCOAPODS_DIRECTORY="${BASEDIR}/../../prebuilt/bundle-apple-cocoapods-macos-lts" +export SOURCE_UNIVERSAL_PACKAGE="${BASEDIR}/../../prebuilt/bundle-apple-universal-macos-lts" +export ALL_UNIVERSAL_DIRECTORY="${BASEDIR}/../../prebuilt/bundle-apple-all-universal-macos-lts" + +create_package() { + local PACKAGE_NAME="ffmpeg-kit-macos-$1" + local PACKAGE_VERSION="$2" + local PACKAGE_DESCRIPTION="$3" + + local CURRENT_PACKAGE="${COCOAPODS_DIRECTORY}/${PACKAGE_NAME}" + rm -rf "${CURRENT_PACKAGE}" + mkdir -p "${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 + + # COPY PODSPEC AS THE LAST ITEM + cp "${BASEDIR}"/apple/"${PACKAGE_NAME}".podspec "${CURRENT_PACKAGE}" || exit 1 + sed -i '' "s/VERSION/${PACKAGE_VERSION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/DESCRIPTION/${PACKAGE_DESCRIPTION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/\,\'AVFoundation\'//g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + + mkdir -p "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 + local CURRENT_UNIVERSAL_PACKAGE="${ALL_UNIVERSAL_DIRECTORY}/${PACKAGE_NAME}-universal" + rm -rf "${CURRENT_UNIVERSAL_PACKAGE}" + mkdir -p "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 + mkdir -p "${CURRENT_UNIVERSAL_PACKAGE}"/lib || exit 1 + + cd "${SOURCE_UNIVERSAL_PACKAGE}" || exit 1 + find . -name "*.a" -exec cp {} "${CURRENT_UNIVERSAL_PACKAGE}"/lib \; || exit 1 + + # COPY THE LICENSE FILE OF EACH LIBRARY + LICENSE_FILES=$(find . -name LICENSE | grep -vi ffmpeg) + + for LICENSE_FILE in ${LICENSE_FILES[@]} + do + LIBRARY_NAME=$(echo "${LICENSE_FILE}" | sed 's/\.\///g;s/\/LICENSE//g') + 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 "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/LICENSE "${CURRENT_UNIVERSAL_PACKAGE}"/LICENSE || exit 1 + + cd "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 + zip -r "${PACKAGE_NAME}-${PACKAGE_VERSION}-macos-static-universal.zip" "${PACKAGE_NAME}"-universal || exit 1 +} + +if [[ $# -ne 1 ]]; +then + echo "Usage: macos.lts.sh " + exit 1 +fi + +# VALIDATE VERSIONS +if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then + echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again." + echo "1. Update docs" + echo "2. Update gradle files under the tools/release/android folder" + echo "3. Update the versions in tools/release/common.sh" + echo "4. Update podspec links" + echo "5. Update ffmpegkit.h versions for both android and apple" + echo "6. Update versions in Doxyfile" + exit 1 +fi + +# CREATE COCOAPODS DIRECTORY +rm -rf "${COCOAPODS_DIRECTORY}" +mkdir -p "${COCOAPODS_DIRECTORY}" || exit 1 + +rm -rf "${ALL_UNIVERSAL_DIRECTORY}" +mkdir -p "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 + +# MIN RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_LTS_OPTIONS} || exit 1 +create_package "min" "$1.LTS" "${LIBRARY_DESCRIPTION_MIN}" || exit 1 + +# MIN-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_LTS_OPTIONS} ${GPL_PACKAGES} || exit 1 +create_package "min-gpl" "$1.LTS" "${LIBRARY_DESCRIPTION_MIN_GPL}" || exit 1 + +# HTTPS RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_LTS_OPTIONS} ${HTTPS_PACKAGES} || exit 1 +create_package "https" "$1.LTS" "${LIBRARY_DESCRIPTION_HTTPS}" || exit 1 + +# HTTPS-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_LTS_OPTIONS} ${HTTPS_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "https-gpl" "$1.LTS" "${LIBRARY_DESCRIPTION_HTTPS_GPL}" || exit 1 + +# AUDIO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_LTS_OPTIONS} ${AUDIO_PACKAGES} || exit 1 +create_package "audio" "$1.LTS" "${LIBRARY_DESCRIPTION_AUDIO}" || exit 1 + +# VIDEO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_LTS_OPTIONS} ${VIDEO_PACKAGES} || exit 1 +create_package "video" "$1.LTS" "${LIBRARY_DESCRIPTION_VIDEO}" || exit 1 + +# FULL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_LTS_OPTIONS} ${FULL_PACKAGES} || exit 1 +create_package "full" "$1.LTS" "${LIBRARY_DESCRIPTION_FULL}" || exit 1 + +# FULL-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_LTS_OPTIONS} ${FULL_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "full-gpl" "$1.LTS" "${LIBRARY_DESCRIPTION_FULL_GPL}" || exit 1 diff --git a/tools/release/macos.sh b/tools/release/macos.sh new file mode 100755 index 0000000..0ac29c0 --- /dev/null +++ b/tools/release/macos.sh @@ -0,0 +1,94 @@ +#!/bin/bash +# +# Creates a new macos release from the current branch +# + +source ./common.sh +export SOURCE_PACKAGE="${BASEDIR}/../../prebuilt/bundle-apple-xcframework-macos" +export COCOAPODS_DIRECTORY="${BASEDIR}/../../prebuilt/bundle-apple-cocoapods-macos" + +create_package() { + local PACKAGE_NAME="ffmpeg-kit-macos-$1" + local PACKAGE_VERSION="$2" + local PACKAGE_DESCRIPTION="$3" + + local CURRENT_PACKAGE="${COCOAPODS_DIRECTORY}/${PACKAGE_NAME}" + rm -rf "${CURRENT_PACKAGE}" + mkdir -p "${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 + + # COPY PODSPEC AS THE LAST ITEM + cp "${BASEDIR}"/apple/"${PACKAGE_NAME}".podspec "${CURRENT_PACKAGE}" || exit 1 + sed -i '' "s/VERSION/${PACKAGE_VERSION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/DESCRIPTION/${PACKAGE_DESCRIPTION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/\.framework/\.xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/-framework/-xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/macos\.xcframeworks/macos\.frameworks/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/10\.11/10\.15/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/ffmpegkit\.xcframework\/LICENSE/ffmpegkit\.xcframework\/macos-arm64\/ffmpegkit\.framework\/LICENSE/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 +} + +if [[ $# -ne 1 ]]; +then + echo "Usage: macos.sh " + exit 1 +fi + +# VALIDATE VERSIONS +if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then + echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again." + echo "1. Update docs" + echo "2. Update gradle files under the tools/release/android folder" + echo "3. Update the versions in tools/release/common.sh" + echo "4. Update podspec links" + echo "5. Update ffmpegkit.h versions for both android and apple" + echo "6. Update versions in Doxyfile" + exit 1 +fi + +# CREATE COCOAPODS DIRECTORY +rm -rf "${COCOAPODS_DIRECTORY}" +mkdir -p "${COCOAPODS_DIRECTORY}" || exit 1 + +# MIN RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_MAIN_OPTIONS} || exit 1 +create_package "min" "$1" "${LIBRARY_DESCRIPTION_MIN}" || exit 1 + +# MIN-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_MAIN_OPTIONS} ${GPL_PACKAGES} || exit 1 +create_package "min-gpl" "$1" "${LIBRARY_DESCRIPTION_MIN_GPL}" || exit 1 + +# HTTPS RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_MAIN_OPTIONS} ${HTTPS_PACKAGES} || exit 1 +create_package "https" "$1" "${LIBRARY_DESCRIPTION_HTTPS}" || exit 1 + +# HTTPS-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_MAIN_OPTIONS} ${HTTPS_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "https-gpl" "$1" "${LIBRARY_DESCRIPTION_HTTPS_GPL}" || exit 1 + +# AUDIO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_MAIN_OPTIONS} ${AUDIO_PACKAGES} || exit 1 +create_package "audio" "$1" "${LIBRARY_DESCRIPTION_AUDIO}" || exit 1 + +# VIDEO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_MAIN_OPTIONS} ${VIDEO_PACKAGES} || exit 1 +create_package "video" "$1" "${LIBRARY_DESCRIPTION_VIDEO}" || exit 1 + +# FULL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_MAIN_OPTIONS} ${FULL_PACKAGES} || exit 1 +create_package "full" "$1" "${LIBRARY_DESCRIPTION_FULL}" || exit 1 + +# FULL-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./macos.sh ${MACOS_MAIN_OPTIONS} ${FULL_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "full-gpl" "$1" "${LIBRARY_DESCRIPTION_FULL_GPL}" || exit 1 diff --git a/tools/release/tvos.lts.sh b/tools/release/tvos.lts.sh new file mode 100755 index 0000000..a71f472 --- /dev/null +++ b/tools/release/tvos.lts.sh @@ -0,0 +1,120 @@ +#!/bin/bash +# +# Creates a new tvos lts release from the current branch +# + +source ./common.sh +export SOURCE_PACKAGE="${BASEDIR}/../../prebuilt/bundle-apple-framework-tvos-lts" +export COCOAPODS_DIRECTORY="${BASEDIR}/../../prebuilt/bundle-apple-cocoapods-tvos-lts" +export SOURCE_UNIVERSAL_PACKAGE="${BASEDIR}/../../prebuilt/bundle-apple-universal-tvos-lts" +export ALL_UNIVERSAL_DIRECTORY="${BASEDIR}/../../prebuilt/bundle-apple-all-universal-tvos-lts" + +create_package() { + local PACKAGE_NAME="ffmpeg-kit-tvos-$1" + local PACKAGE_VERSION="$2" + local PACKAGE_DESCRIPTION="$3" + + local CURRENT_PACKAGE="${COCOAPODS_DIRECTORY}/${PACKAGE_NAME}" + rm -rf "${CURRENT_PACKAGE}" + mkdir -p "${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 + + # COPY PODSPEC AS THE LAST ITEM + cp "${BASEDIR}"/apple/"${PACKAGE_NAME}".podspec "${CURRENT_PACKAGE}" || exit 1 + sed -i '' "s/VERSION/${PACKAGE_VERSION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/DESCRIPTION/${PACKAGE_DESCRIPTION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/\,\'VideoToolbox\'//g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + + mkdir -p "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 + local CURRENT_UNIVERSAL_PACKAGE="${ALL_UNIVERSAL_DIRECTORY}/${PACKAGE_NAME}-universal" + rm -rf "${CURRENT_UNIVERSAL_PACKAGE}" + mkdir -p "${CURRENT_UNIVERSAL_PACKAGE}"/include || exit 1 + mkdir -p "${CURRENT_UNIVERSAL_PACKAGE}"/lib || exit 1 + + cd "${SOURCE_UNIVERSAL_PACKAGE}" || exit 1 + find . -name "*.a" -exec cp {} "${CURRENT_UNIVERSAL_PACKAGE}"/lib \; || exit 1 + + # COPY LICENSE FILE OF EACH LIBRARY + LICENSE_FILES=$(find . -name LICENSE | grep -vi ffmpeg) + + for LICENSE_FILE in ${LICENSE_FILES[@]} + do + LIBRARY_NAME=$(echo "${LICENSE_FILE}" | sed 's/\.\///g;s/\/LICENSE//g') + 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 "${SOURCE_UNIVERSAL_PACKAGE}"/ffmpeg/LICENSE "${CURRENT_UNIVERSAL_PACKAGE}"/LICENSE || exit 1 + + cd "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 + zip -r "ffmpeg-kit-$1-${PACKAGE_VERSION}-tvos-static-universal.zip" "${PACKAGE_NAME}"-universal || exit 1 +} + +if [[ $# -ne 1 ]]; +then + echo "Usage: tvos.lts.sh " + exit 1 +fi + +# VALIDATE VERSIONS +if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then + echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again." + echo "1. Update docs" + echo "2. Update gradle files under the tools/release/android folder" + echo "3. Update the versions in tools/release/common.sh" + echo "4. Update podspec links" + echo "5. Update ffmpegkit.h versions for both android and apple" + echo "6. Update versions in Doxyfile" + exit 1 +fi + +# CREATE COCOAPODS DIRECTORY +rm -rf "${COCOAPODS_DIRECTORY}" +mkdir -p "${COCOAPODS_DIRECTORY}" || exit 1 + +rm -rf "${ALL_UNIVERSAL_DIRECTORY}" +mkdir -p "${ALL_UNIVERSAL_DIRECTORY}" || exit 1 + +# MIN RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_LTS_OPTIONS} || exit 1 +create_package "min" "$1.LTS" "${LIBRARY_DESCRIPTION_MIN}" || exit 1 + +# MIN-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_LTS_OPTIONS} ${GPL_PACKAGES} || exit 1 +create_package "min-gpl" "$1.LTS" "${LIBRARY_DESCRIPTION_MIN_GPL}" || exit 1 + +# HTTPS RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_LTS_OPTIONS} ${HTTPS_PACKAGES} || exit 1 +create_package "https" "$1.LTS" "${LIBRARY_DESCRIPTION_HTTPS}" || exit 1 + +# HTTPS-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_LTS_OPTIONS} ${HTTPS_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "https-gpl" "$1.LTS" "${LIBRARY_DESCRIPTION_HTTPS_GPL}" || exit 1 + +# AUDIO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_LTS_OPTIONS} ${AUDIO_PACKAGES} || exit 1 +create_package "audio" "$1.LTS" "${LIBRARY_DESCRIPTION_AUDIO}" || exit 1 + +# VIDEO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_LTS_OPTIONS} ${VIDEO_PACKAGES} || exit 1 +create_package "video" "$1.LTS" "${LIBRARY_DESCRIPTION_VIDEO}" || exit 1 + +# FULL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_LTS_OPTIONS} ${FULL_PACKAGES} || exit 1 +create_package "full" "$1.LTS" "${LIBRARY_DESCRIPTION_FULL}" || exit 1 + +# FULL-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_LTS_OPTIONS} ${FULL_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "full-gpl" "$1.LTS" "${LIBRARY_DESCRIPTION_FULL_GPL}" || exit 1 diff --git a/tools/release/tvos.sh b/tools/release/tvos.sh new file mode 100755 index 0000000..5c35b70 --- /dev/null +++ b/tools/release/tvos.sh @@ -0,0 +1,94 @@ +#!/bin/bash +# +# Creates a new tvos release from the current branch +# + +source ./common.sh +export SOURCE_PACKAGE="${BASEDIR}/../../prebuilt/bundle-apple-xcframework-tvos" +export COCOAPODS_DIRECTORY="${BASEDIR}/../../prebuilt/bundle-apple-cocoapods-tvos" + +create_package() { + local PACKAGE_NAME="ffmpeg-kit-tvos-$1" + local PACKAGE_VERSION="$2" + local PACKAGE_DESCRIPTION="$3" + + local CURRENT_PACKAGE="${COCOAPODS_DIRECTORY}/${PACKAGE_NAME}" + rm -rf "${CURRENT_PACKAGE}" + mkdir -p "${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 + + # COPY PODSPEC AS THE LAST ITEM + cp "${BASEDIR}"/apple/"${PACKAGE_NAME}".podspec "${CURRENT_PACKAGE}" || exit 1 + sed -i '' "s/VERSION/${PACKAGE_VERSION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/DESCRIPTION/${PACKAGE_DESCRIPTION}/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/\.framework/\.xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/-framework/-xcframework/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/tvos\.xcframeworks/tvos\.frameworks/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/9\.2/10\.2/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 + sed -i '' "s/ffmpegkit\.xcframework\/LICENSE/ffmpegkit\.xcframework\/tvos-arm64\/ffmpegkit\.framework\/LICENSE/g" "${CURRENT_PACKAGE}"/"${PACKAGE_NAME}".podspec || exit 1 +} + +if [[ $# -ne 1 ]]; +then + echo "Usage: tvos.sh " + exit 1 +fi + +# VALIDATE VERSIONS +if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then + echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again." + echo "1. Update docs" + echo "2. Update gradle files under the tools/release/android folder" + echo "3. Update the versions in tools/release/common.sh" + echo "4. Update podspec links" + echo "5. Update ffmpegkit.h versions for both android and apple" + echo "6. Update versions in Doxyfile" + exit 1 +fi + +# CREATE COCOAPODS DIRECTORY +rm -rf "${COCOAPODS_DIRECTORY}" +mkdir -p "${COCOAPODS_DIRECTORY}" || exit 1 + +# MIN RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_MAIN_OPTIONS} || exit 1 +create_package "min" "$1" "${LIBRARY_DESCRIPTION_MIN}" || exit 1 + +# MIN-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_MAIN_OPTIONS} ${GPL_PACKAGES} || exit 1 +create_package "min-gpl" "$1" "${LIBRARY_DESCRIPTION_MIN_GPL}" || exit 1 + +# HTTPS RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_MAIN_OPTIONS} ${HTTPS_PACKAGES} || exit 1 +create_package "https" "$1" "${LIBRARY_DESCRIPTION_HTTPS}" || exit 1 + +# HTTPS-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_MAIN_OPTIONS} ${HTTPS_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "https-gpl" "$1" "${LIBRARY_DESCRIPTION_HTTPS_GPL}" || exit 1 + +# AUDIO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_MAIN_OPTIONS} ${AUDIO_PACKAGES} || exit 1 +create_package "audio" "$1" "${LIBRARY_DESCRIPTION_AUDIO}" || exit 1 + +# VIDEO RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_MAIN_OPTIONS} ${VIDEO_PACKAGES} || exit 1 +create_package "video" "$1" "${LIBRARY_DESCRIPTION_VIDEO}" || exit 1 + +# FULL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_MAIN_OPTIONS} ${FULL_PACKAGES} || exit 1 +create_package "full" "$1" "${LIBRARY_DESCRIPTION_FULL}" || exit 1 + +# FULL-GPL RELEASE +cd "${BASEDIR}/../.." || exit 1 +./tvos.sh ${TVOS_MAIN_OPTIONS} ${FULL_PACKAGES} ${GPL_PACKAGES} || exit 1 +create_package "full-gpl" "$1" "${LIBRARY_DESCRIPTION_FULL_GPL}" || exit 1 diff --git a/tvos.sh b/tvos.sh index e9f6701..b32b923 100755 --- a/tvos.sh +++ b/tvos.sh @@ -168,6 +168,14 @@ if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]] && [[ -n ${FFMPEG_KIT_LTS_BUILD} ]]; then exit 1 fi +# 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 + disable_arch "arm64-simulator" +fi + echo -e "\nBuilding ffmpeg-kit ${BUILD_TYPE_ID}static library for tvOS\n" echo -e -n "INFO: Building ffmpeg-kit ${BUILD_VERSION} ${BUILD_TYPE_ID}for tvOS: " 1>>"${BASEDIR}"/build.log 2>&1 echo -e "$(date)\n" 1>>"${BASEDIR}"/build.log 2>&1