From 47a96a5f06c945f4338cd07b274bcf257aaee851 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Fri, 21 Oct 2022 22:40:54 +0100 Subject: [PATCH 1/6] decommission macos 10-15 in github workflows --- .github/workflows/android-build-scripts.yml | 4 +-- .github/workflows/ios-build-scripts.yml | 29 +++------------------ .github/workflows/macos-build-scripts.yml | 29 +++------------------ .github/workflows/periodic-builds-apple.yml | 18 ++++++------- .github/workflows/tvos-build-scripts.yml | 29 +++------------------ 5 files changed, 20 insertions(+), 89 deletions(-) diff --git a/.github/workflows/android-build-scripts.yml b/.github/workflows/android-build-scripts.yml index e91cd46..b60e25a 100644 --- a/.github/workflows/android-build-scripts.yml +++ b/.github/workflows/android-build-scripts.yml @@ -85,7 +85,7 @@ jobs: run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' build-main-on-macos: name: android main on macos - runs-on: macos-10.15 + runs-on: macos-12 strategy: matrix: ndk-version: [ 'r22b-darwin-x86_64', 'r23b-darwin', 'r24-darwin', 'r25b-darwin' ] @@ -114,7 +114,7 @@ jobs: run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' build-lts-on-macos: name: android lts on macos - runs-on: macos-10.15 + runs-on: macos-11 strategy: matrix: ndk-version: [ 'r22b-darwin-x86_64', 'r23b-darwin' ] diff --git a/.github/workflows/ios-build-scripts.yml b/.github/workflows/ios-build-scripts.yml index 729f983..29d8978 100644 --- a/.github/workflows/ios-build-scripts.yml +++ b/.github/workflows/ios-build-scripts.yml @@ -73,38 +73,15 @@ jobs: - name: print ffbuild logs if: ${{ failure() }} run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-main-on-macos-catalina: - name: ios main on catalina - runs-on: macos-10.15 + build-lts-on-macos-bigsur: + name: ios lts on big sur + runs-on: macos-11 strategy: matrix: xcode: [ '11.7', '12.4' ] defaults: run: shell: bash - steps: - - uses: actions/checkout@v2 - - name: prerequisites - run: brew install autoconf automake libtool pkg-config curl git cmake nasm - - name: set up xcode - run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh - - name: run the build script - run: ./ios.sh --xcframework --enable-ios-audiotoolbox --enable-ios-avfoundation --enable-ios-bzip2 --enable-ios-libiconv --enable-ios-videotoolbox --enable-ios-zlib - - name: print build logs - if: ${{ always() }} - run: cat build.log - - name: print ffbuild logs - if: ${{ failure() }} - run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-lts-on-macos: - name: ios lts - runs-on: macos-10.15 - strategy: - matrix: - xcode: [ '10.3', '11.7' ] - defaults: - run: - shell: bash steps: - uses: actions/checkout@v2 - name: prerequisites diff --git a/.github/workflows/macos-build-scripts.yml b/.github/workflows/macos-build-scripts.yml index cfca086..fb2d35b 100644 --- a/.github/workflows/macos-build-scripts.yml +++ b/.github/workflows/macos-build-scripts.yml @@ -73,38 +73,15 @@ jobs: - name: print ffbuild logs if: ${{ failure() }} run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-main-on-macos-catalina: - name: macos main on catalina - runs-on: macos-10.15 + build-lts-on-macos-bigsur: + name: macos lts on big sur + runs-on: macos-11 strategy: matrix: xcode: [ '11.7', '12.4' ] defaults: run: shell: bash - steps: - - uses: actions/checkout@v2 - - name: prerequisites - run: brew install autoconf automake libtool pkg-config curl git cmake nasm - - name: set up xcode - run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh - - name: run the build script - run: ./macos.sh --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 - - name: print build logs - if: ${{ always() }} - run: cat build.log - - name: print ffbuild logs - if: ${{ failure() }} - run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-lts-on-macos: - name: macos lts - runs-on: macos-10.15 - strategy: - matrix: - xcode: [ '10.3', '11.7' ] - defaults: - run: - shell: bash steps: - uses: actions/checkout@v2 - name: prerequisites diff --git a/.github/workflows/periodic-builds-apple.yml b/.github/workflows/periodic-builds-apple.yml index 6099d07..d9d480b 100644 --- a/.github/workflows/periodic-builds-apple.yml +++ b/.github/workflows/periodic-builds-apple.yml @@ -31,9 +31,9 @@ jobs: - name: print ffbuild logs if: ${{ failure() }} run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-ios-lts-on-macos-catalina: - name: ios lts on catalina - runs-on: macos-10.15 + build-ios-lts-on-macos-bigsur: + name: ios lts on big sur + runs-on: macos-11 strategy: matrix: xcode: [ '12.4' ] @@ -83,9 +83,9 @@ jobs: - name: print ffbuild logs if: ${{ failure() }} run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-macos-lts-on-macos-catalina: - name: macos lts on catalina - runs-on: macos-10.15 + build-macos-lts-on-macos-bigsur: + name: macos lts on big sur + runs-on: macos-11 strategy: matrix: xcode: [ '12.4' ] @@ -135,9 +135,9 @@ jobs: - name: print ffbuild logs if: ${{ failure() }} run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-tvos-lts-on-macos-catalina: - name: tvos lts on catalina - runs-on: macos-10.15 + build-tvos-lts-on-macos-bigsur: + name: tvos lts on big sur + runs-on: macos-11 strategy: matrix: xcode: [ '12.4' ] diff --git a/.github/workflows/tvos-build-scripts.yml b/.github/workflows/tvos-build-scripts.yml index c5e3c0a..1169942 100644 --- a/.github/workflows/tvos-build-scripts.yml +++ b/.github/workflows/tvos-build-scripts.yml @@ -73,38 +73,15 @@ jobs: - name: print ffbuild logs if: ${{ failure() }} run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-main-on-macos-catalina: - name: tvos main on catalina - runs-on: macos-10.15 + build-lts-on-macos-bigsur: + name: tvos lts on big sur + runs-on: macos-11 strategy: matrix: xcode: [ '11.7', '12.4' ] defaults: run: shell: bash - steps: - - uses: actions/checkout@v2 - - name: prerequisites - run: brew install autoconf automake libtool pkg-config curl git cmake nasm - - name: set up xcode - run: echo "export DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" > ~/.xcode.for.ffmpeg.kit.sh - - name: run the build script - run: ./tvos.sh --xcframework --enable-tvos-bzip2 --enable-tvos-audiotoolbox --enable-tvos-libiconv --enable-tvos-videotoolbox --enable-tvos-zlib - - name: print build logs - if: ${{ always() }} - run: cat build.log - - name: print ffbuild logs - if: ${{ failure() }} - run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log' - build-lts-on-macos: - name: tvos lts - runs-on: macos-10.15 - strategy: - matrix: - xcode: [ '10.3', '11.7' ] - defaults: - run: - shell: bash steps: - uses: actions/checkout@v2 - name: prerequisites From fd719cd36a2013599a82c003e0d104c2e2138fac Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Fri, 21 Oct 2022 21:04:58 +0100 Subject: [PATCH 2/6] make build scripts more tolerant against the space character in path --- apple.sh | 8 ++++---- scripts/function.sh | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apple.sh b/apple.sh index fe3b21f..38c21c8 100755 --- a/apple.sh +++ b/apple.sh @@ -56,14 +56,14 @@ create_umbrella_xcframework() { local BUILD_COMMAND="xcodebuild -create-xcframework " for ARCHITECTURE_VARIANT_INDEX in "${TARGET_ARCHITECTURE_VARIANT_INDEX_ARRAY[@]}"; do - local FRAMEWORK_PATH=${BASEDIR}/prebuilt/$(get_framework_directory "${ARCHITECTURE_VARIANT_INDEX}")/${FRAMEWORK_NAME}.framework - BUILD_COMMAND+=" -framework ${FRAMEWORK_PATH}" + local FRAMEWORK_PATH="${BASEDIR}"/prebuilt/$(get_framework_directory "${ARCHITECTURE_VARIANT_INDEX}")/${FRAMEWORK_NAME}.framework + BUILD_COMMAND+=" -framework \"${FRAMEWORK_PATH}\"" done - BUILD_COMMAND+=" -output ${XCFRAMEWORK_PATH}" + BUILD_COMMAND+=" -output \"${XCFRAMEWORK_PATH}\"" # EXECUTE CREATE FRAMEWORK COMMAND - COMMAND_OUTPUT=$(${BUILD_COMMAND} 2>&1) + COMMAND_OUTPUT=$(eval ${BUILD_COMMAND} 2>&1) RC=$? echo -e "DEBUG: ${COMMAND_OUTPUT}\n" 1>>"${BASEDIR}"/build.log 2>&1 diff --git a/scripts/function.sh b/scripts/function.sh index a3dedf6..6595a7e 100755 --- a/scripts/function.sh +++ b/scripts/function.sh @@ -1921,53 +1921,53 @@ autoreconf_library() { clone_git_repository_with_commit_id() { local RC - (mkdir -p $2 1>>"${BASEDIR}"/build.log 2>&1) + (mkdir -p "$2" 1>>"${BASEDIR}"/build.log 2>&1) RC=$? if [ ${RC} -ne 0 ]; then echo -e "\nINFO: Failed to create local directory $2\n" 1>>"${BASEDIR}"/build.log 2>&1 - rm -rf $2 1>>"${BASEDIR}"/build.log 2>&1 + rm -rf "$2" 1>>"${BASEDIR}"/build.log 2>&1 echo ${RC} return fi echo -e "INFO: Cloning commit id $3 from repository $1 into local directory $2\n" 1>>"${BASEDIR}"/build.log 2>&1 - (git clone $1 $2 --depth 1 1>>"${BASEDIR}"/build.log 2>&1) + (git clone "$1" "$2" --depth 1 1>>"${BASEDIR}"/build.log 2>&1) RC=$? if [ ${RC} -ne 0 ]; then echo -e "\nINFO: Failed to clone $1\n" 1>>"${BASEDIR}"/build.log 2>&1 - rm -rf $2 1>>"${BASEDIR}"/build.log 2>&1 + rm -rf "$2" 1>>"${BASEDIR}"/build.log 2>&1 echo ${RC} return fi - cd $2 1>>"${BASEDIR}"/build.log 2>&1 + cd "$2" 1>>"${BASEDIR}"/build.log 2>&1 RC=$? if [ ${RC} -ne 0 ]; then echo -e "\nINFO: Failed to cd into $2\n" 1>>"${BASEDIR}"/build.log 2>&1 - rm -rf $2 1>>"${BASEDIR}"/build.log 2>&1 + rm -rf "$2" 1>>"${BASEDIR}"/build.log 2>&1 echo ${RC} return fi - (git fetch --depth 1 origin $3 1>>"${BASEDIR}"/build.log 2>&1) + (git fetch --depth 1 origin "$3" 1>>"${BASEDIR}"/build.log 2>&1) RC=$? if [ ${RC} -ne 0 ]; then echo -e "\nINFO: Failed to fetch commit id $3 from $1\n" 1>>"${BASEDIR}"/build.log 2>&1 - rm -rf $2 1>>"${BASEDIR}"/build.log 2>&1 + rm -rf "$2" 1>>"${BASEDIR}"/build.log 2>&1 echo ${RC} return fi - (git checkout $3 1>>"${BASEDIR}"/build.log 2>&1) + (git checkout "$3" 1>>"${BASEDIR}"/build.log 2>&1) RC=$? @@ -1988,26 +1988,26 @@ clone_git_repository_with_commit_id() { clone_git_repository_with_tag() { local RC - (mkdir -p $3 1>>"${BASEDIR}"/build.log 2>&1) + (mkdir -p "$3" 1>>"${BASEDIR}"/build.log 2>&1) RC=$? if [ ${RC} -ne 0 ]; then echo -e "\nINFO: Failed to create local directory $3\n" 1>>"${BASEDIR}"/build.log 2>&1 - rm -rf $3 1>>"${BASEDIR}"/build.log 2>&1 + rm -rf "$3" 1>>"${BASEDIR}"/build.log 2>&1 echo ${RC} return fi echo -e "INFO: Cloning tag $2 from repository $1 into local directory $3\n" 1>>"${BASEDIR}"/build.log 2>&1 - (git clone --depth 1 --branch $2 $1 $3 1>>"${BASEDIR}"/build.log 2>&1) + (git clone --depth 1 --branch "$2" "$1" "$3" 1>>"${BASEDIR}"/build.log 2>&1) RC=$? if [ ${RC} -ne 0 ]; then echo -e "\nINFO: Failed to clone $1 -> $2\n" 1>>"${BASEDIR}"/build.log 2>&1 - rm -rf $3 1>>"${BASEDIR}"/build.log 2>&1 + rm -rf "$3" 1>>"${BASEDIR}"/build.log 2>&1 echo ${RC} return fi From e0eb57befcfeada63e8ebf14b03144719add7412 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Sun, 6 Nov 2022 20:33:01 +0000 Subject: [PATCH 3/6] allow disabling bitcode in ios and tvos, fixes #614 --- ios.sh | 3 +++ scripts/apple/ffmpeg.sh | 4 ++++ scripts/function-ios.sh | 20 ++++++++++++++------ scripts/function-tvos.sh | 24 ++++++++++++++++++------ scripts/function.sh | 3 +++ tvos.sh | 3 +++ 6 files changed, 45 insertions(+), 12 deletions(-) diff --git a/ios.sh b/ios.sh index 0f28538..17ed291 100755 --- a/ios.sh +++ b/ios.sh @@ -71,6 +71,9 @@ while [ ! $# -eq 0 ]; do skip_library "${SKIP_LIBRARY}" ;; + --no-bitcode) + export NO_BITCODE="1" + ;; --no-framework) NO_FRAMEWORK="1" ;; diff --git a/scripts/apple/ffmpeg.sh b/scripts/apple/ffmpeg.sh index 8d3c052..45feb2c 100755 --- a/scripts/apple/ffmpeg.sh +++ b/scripts/apple/ffmpeg.sh @@ -98,6 +98,10 @@ x86-64-mac-catalyst) ;; esac +if [ ! -z $NO_BITCODE ]; then + BITCODE_FLAGS="" +fi + CONFIGURE_POSTFIX="" HIGH_PRIORITY_LDFLAGS="" diff --git a/scripts/function-ios.sh b/scripts/function-ios.sh index 2853c96..02ae7c3 100755 --- a/scripts/function-ios.sh +++ b/scripts/function-ios.sh @@ -55,9 +55,9 @@ libraries are created under the prebuilt folder.\n" display_help_gpl_libraries display_help_custom_libraries if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]]; then - display_help_advanced_options " --no-framework\t\tdo not build xcframework bundles [no]" + display_help_advanced_options " --no-framework\t\tdo not build xcframework bundles [no]" " --no-bitcode\t\t\tdo not enable bitcode in bundles [no]" else - display_help_advanced_options " --no-framework\t\tdo not build framework bundles [no]" + display_help_advanced_options " --no-framework\t\tdo not build framework bundles [no]" " --no-bitcode\t\t\tdo not enable bitcode in bundles [no]" fi } @@ -105,16 +105,19 @@ get_common_cflags() { fi local BUILD_DATE="-DFFMPEG_KIT_BUILD_DATE=$(date +%Y%m%d 2>>"${BASEDIR}"/build.log)" + if [ -z $NO_BITCODE ]; then + local BITCODE_FLAGS="-fembed-bitcode" + fi case ${ARCH} in i386 | x86-64 | arm64-simulator) echo "-fstrict-aliasing -DIOS ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}" ;; *-mac-catalyst) - echo "-fstrict-aliasing -fembed-bitcode -DMACOSX ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}" + echo "-fstrict-aliasing ${BITCODE_FLAGS} -DMACOSX ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}" ;; *) - echo "-fstrict-aliasing -fembed-bitcode -DIOS ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}" + echo "-fstrict-aliasing ${BITCODE_FLAGS} -DIOS ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}" ;; esac } @@ -278,7 +281,9 @@ get_cxxflags() { local BITCODE_FLAGS="" case ${ARCH} in armv7 | armv7s | arm64 | arm64e | *-mac-catalyst) - local BITCODE_FLAGS="-fembed-bitcode" + if [ -z $NO_BITCODE ]; then + local BITCODE_FLAGS="-fembed-bitcode" + fi ;; esac @@ -384,12 +389,15 @@ get_ldflags() { local OPTIMIZATION_FLAGS="${FFMPEG_KIT_DEBUG}" fi local COMMON_FLAGS=$(get_common_ldflags) + if [ -z $NO_BITCODE ]; then + local BITCODE_FLAGS="-fembed-bitcode -Wc,-fembed-bitcode" + fi case $1 in ffmpeg-kit) case ${ARCH} in armv7 | armv7s | arm64 | arm64e | *-mac-catalyst) - echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} -fembed-bitcode -Wc,-fembed-bitcode ${OPTIMIZATION_FLAGS}" + echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} ${BITCODE_FLAGS} ${OPTIMIZATION_FLAGS}" ;; *) echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS}" diff --git a/scripts/function-tvos.sh b/scripts/function-tvos.sh index 98dc5b6..f36f0f6 100755 --- a/scripts/function-tvos.sh +++ b/scripts/function-tvos.sh @@ -43,9 +43,9 @@ set explicitly. When compilation ends, libraries are created under the prebuilt display_help_gpl_libraries display_help_custom_libraries if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]]; then - display_help_advanced_options " --no-framework\t\tdo not build xcframework bundles [no]" + display_help_advanced_options " --no-framework\t\tdo not build xcframework bundles [no]" " --no-bitcode\t\t\tdo not enable bitcode in bundles [no]" else - display_help_advanced_options " --no-framework\t\tdo not build framework bundles [no]" + display_help_advanced_options " --no-framework\t\tdo not build framework bundles [no]" " --no-bitcode\t\t\tdo not enable bitcode in bundles [no]" fi } @@ -79,10 +79,13 @@ get_common_cflags() { fi local BUILD_DATE="-DFFMPEG_KIT_BUILD_DATE=$(date +%Y%m%d 2>>"${BASEDIR}"/build.log)" + if [ -z $NO_BITCODE ]; then + local BITCODE_FLAGS="-fembed-bitcode" + fi case ${ARCH} in arm64) - echo "-fstrict-aliasing -fembed-bitcode -DTVOS ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}" + echo "-fstrict-aliasing ${BITCODE_FLAGS} -DTVOS ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}" ;; x86-64 | arm64-simulator) echo "-fstrict-aliasing -DTVOS ${LTS_BUILD_FLAG}${BUILD_DATE} -isysroot ${SDK_PATH}" @@ -254,7 +257,9 @@ get_cxxflags() { local BITCODE_FLAGS="" case ${ARCH} in arm64) - local BITCODE_FLAGS="-fembed-bitcode" + if [ -z $NO_BITCODE ]; then + local BITCODE_FLAGS="-fembed-bitcode" + fi ;; esac @@ -320,9 +325,13 @@ get_size_optimization_ldflags() { } get_arch_specific_ldflags() { + if [ -z $NO_BITCODE ]; then + local BITCODE_FLAGS="-fembed-bitcode" + fi + case ${ARCH} in arm64) - echo "-arch arm64 -march=armv8-a+crc+crypto -fembed-bitcode" + echo "-arch arm64 -march=armv8-a+crc+crypto ${BITCODE_FLAGS}" ;; arm64-simulator) echo "-arch arm64 -march=armv8-a+crc+crypto" @@ -342,12 +351,15 @@ get_ldflags() { local OPTIMIZATION_FLAGS="${FFMPEG_KIT_DEBUG}" fi local COMMON_FLAGS=$(get_common_ldflags) + if [ -z $NO_BITCODE ]; then + local BITCODE_FLAGS="-fembed-bitcode -Wc,-fembed-bitcode" + fi case $1 in ffmpeg-kit) case ${ARCH} in arm64) - echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} -fembed-bitcode -Wc,-fembed-bitcode ${OPTIMIZATION_FLAGS}" + echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} ${BITCODE_FLAGS} ${OPTIMIZATION_FLAGS}" ;; *) echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS}" diff --git a/scripts/function.sh b/scripts/function.sh index 6595a7e..421cb80 100755 --- a/scripts/function.sh +++ b/scripts/function.sh @@ -927,6 +927,9 @@ display_help_advanced_options() { if [ -n "$1" ]; then echo -e "$1" fi + if [ -n "$2" ]; then + echo -e "$2" + fi echo -e "" } diff --git a/tvos.sh b/tvos.sh index ac097a8..1165963 100755 --- a/tvos.sh +++ b/tvos.sh @@ -71,6 +71,9 @@ while [ ! $# -eq 0 ]; do skip_library "${SKIP_LIBRARY}" ;; + --no-bitcode) + export NO_BITCODE="1" + ;; --no-framework) NO_FRAMEWORK="1" ;; From c3877ef35f11f0935178ead8e61fa98b1a8cc1bc Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Sat, 19 Nov 2022 13:20:10 +0000 Subject: [PATCH 4/6] remove android release template --- android/ffmpeg-kit-android-lib/build.gradle | 4 - tools/android/build.gradle | 4 - tools/android/build.lts.gradle | 4 - tools/android/release.template.gradle | 114 -------------------- 4 files changed, 126 deletions(-) delete mode 100644 tools/android/release.template.gradle diff --git a/android/ffmpeg-kit-android-lib/build.gradle b/android/ffmpeg-kit-android-lib/build.gradle index 43c84dd..cf35c13 100644 --- a/android/ffmpeg-kit-android-lib/build.gradle +++ b/android/ffmpeg-kit-android-lib/build.gradle @@ -54,7 +54,3 @@ dependencies { testImplementation "androidx.test.ext:junit:1.1.3" testImplementation 'org.json:json:20220320' } - -if (System.properties.containsKey('releaseFFmpegKit')) { - apply from: "${rootProject.projectDir}/../tools/android/release.template.gradle" -} diff --git a/tools/android/build.gradle b/tools/android/build.gradle index 43c84dd..cf35c13 100644 --- a/tools/android/build.gradle +++ b/tools/android/build.gradle @@ -54,7 +54,3 @@ dependencies { testImplementation "androidx.test.ext:junit:1.1.3" testImplementation 'org.json:json:20220320' } - -if (System.properties.containsKey('releaseFFmpegKit')) { - apply from: "${rootProject.projectDir}/../tools/android/release.template.gradle" -} diff --git a/tools/android/build.lts.gradle b/tools/android/build.lts.gradle index 869072b..4bf3b86 100644 --- a/tools/android/build.lts.gradle +++ b/tools/android/build.lts.gradle @@ -54,7 +54,3 @@ dependencies { testImplementation "androidx.test.ext:junit:1.1.3" testImplementation 'org.json:json:20220320' } - -if (System.properties.containsKey('releaseFFmpegKit')) { - apply from: "${rootProject.projectDir}/../tools/android/release.template.gradle" -} diff --git a/tools/android/release.template.gradle b/tools/android/release.template.gradle deleted file mode 100644 index 61da992..0000000 --- a/tools/android/release.template.gradle +++ /dev/null @@ -1,114 +0,0 @@ -task sourcesJar(type: Jar) { - archiveClassifier.set('sources') - from android.sourceSets.main.java.srcDirs -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - archiveClassifier.set('javadoc') - from javadoc.destinationDir -} - -artifacts { - archives javadocJar - archives sourcesJar -} - -apply plugin: 'maven-publish' -apply plugin: 'signing' - -group = 'com.arthenica' -archivesBaseName = releaseProject -version = releaseVersionName - -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 { - publishedGroupId = group - artifact = releaseProject - libraryName = releaseProject - libraryVersion = version - libraryDescription = releaseProjectDescription - - siteUrl = 'https://github.com/arthenica/ffmpeg-kit' - gitUrl = 'https://github.com/arthenica/ffmpeg-kit.git' - - developerId = 'arthenica' - developerName = 'ARTHENICA' - developerEmail = 'open-source@arthenica.com' - - if (Project.hasProperty('releaseGPL')) { - licenseName = 'GNU General Public License version 3' - licenseUrl = 'https://www.gnu.org/licenses/gpl-3.0.txt' - } else { - licenseName = 'GNU Lesser General Public License, Version 3' - licenseUrl = 'https://www.gnu.org/licenses/lgpl-3.0.txt' - } -} - -afterEvaluate { - publishing { - publications { - release(MavenPublication) { - - groupId group - artifactId = libraryName - version = version - - from components.release - - artifact sourcesJar - artifact javadocJar - - pom { - packaging 'aar' - name = libraryName - description = libraryDescription - url = siteUrl - - licenses { - license { - name = licenseName - url = licenseUrl - } - } - developers { - developer { - id = developerId - name = developerName - email = developerEmail - } - } - - scm { - connection = gitUrl - developerConnection = gitUrl - url = siteUrl - } - } - } - } - repositories { - maven { - var releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" - var snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - credentials { - username ossrhUsername - password ossrhPassword - } - } - } - } -} - - -signing { - sign publishing.publications -} From cfffccaf44da2fad7ee375b3f9cbc9c154d1c576 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Sun, 16 Jul 2023 12:42:05 +0100 Subject: [PATCH 5/6] remove funding options --- .github/FUNDING.yml | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 0c08990..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -patreon: tanersener -open_collective: ffmpeg-kit -custom: [ 'https://buymeacoff.ee/tanersener' ] \ No newline at end of file From 90063c96edfbb5d25937aec64f1ddc17dbf491c4 Mon Sep 17 00:00:00 2001 From: "Sue N. Cooper" Date: Sun, 27 Aug 2023 18:28:14 +0300 Subject: [PATCH 6/6] release react-native v6.0.0 --- README.md | 2 ++ docs/index.md | 3 ++ react-native/README.md | 2 +- react-native/android/build.gradle | 14 +++++--- react-native/android/gradle.properties | 4 +-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- react-native/ffmpeg-kit-react-native.podspec | 32 +++++++++---------- react-native/ios/FFmpegKitReactNativeModule.m | 2 +- react-native/package.json | 24 +++++++------- react-native/src/index.js | 2 +- 10 files changed, 48 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index dae7c37..dcffc03 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,8 @@ the exact version number of `FFmpeg` is obtained using the `git describe --tags` | Platforms | FFmpegKit Version | FFmpeg Version | Release Date | |:----------------:|:-----------------------------------------------------------------------------------:|:--------------:|:------------:| +| React Native | [6.0.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v6.0.0) | 6.0.0 | Aug 27, 2023 | +| Flutter | [6.0.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v6.0.0) | 6.0.0 | Aug 27, 2023 | | Android
Apple | [6.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/v6.0) | 6.0 | Aug 21, 2023 | | React Native | [5.1.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v5.1.0) | 5.1.2 | Oct 02, 2022 | | Flutter | [5.1.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v5.1.0) | 5.1.2 | Oct 02, 2022 | diff --git a/docs/index.md b/docs/index.md index b7b2af6..26f674f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -114,6 +114,8 @@ the exact version number of `FFmpeg` is obtained using the `git describe --tags` | Platforms | FFmpegKit Version | FFmpeg Version | Release Date | |:----------------:|:-----------------------------------------------------------------------------------:|:--------------:|:------------:| +| React Native | [6.0.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v6.0.0) | 6.0.0 | Aug 27, 2023 | +| Flutter | [6.0.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v6.0.0) | 6.0.0 | Aug 27, 2023 | | Android
Apple | [6.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/v6.0) | 6.0 | Aug 21, 2023 | | React Native | [5.1.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v5.1.0) | 5.1.2 | Oct 02, 2022 | | Flutter | [5.1.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v5.1.0) | 5.1.2 | Oct 02, 2022 | @@ -126,6 +128,7 @@ the exact version number of `FFmpeg` is obtained using the `git describe --tags` | Flutter | [4.5.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/flutter.v4.5.0) | 4.5-dev-2008 | Oct 05, 2021 | | React Native | [4.5.0](https://github.com/arthenica/ffmpeg-kit/releases/tag/react.native.v4.5.0) | 4.5-dev-2008 | Oct 01, 2021 | | Android
Apple | [4.5](https://github.com/arthenica/ffmpeg-kit/releases/tag/v4.5) | 4.5-dev-2008 | Sep 18, 2021 | +| Android
Apple | [4.4](https://github.com/arthenica/ffmpeg-kit/releases/tag/v4.4) | 4.4-dev-3015 | Mar 03, 2021 | ### 11. LTS Releases diff --git a/react-native/README.md b/react-native/README.md index fd1a2f1..049a6fa 100644 --- a/react-native/README.md +++ b/react-native/README.md @@ -4,7 +4,7 @@ - Includes both `FFmpeg` and `FFprobe` - Supports - Both `Android` and `iOS` - - FFmpeg `v5.1.2` + - FFmpeg `v6.0` - `arm-v7a`, `arm-v7a-neon`, `arm64-v8a`, `x86` and `x86_64` architectures on Android - `Android API Level 24` or later - `API Level 16` on LTS releases diff --git a/react-native/android/build.gradle b/react-native/android/build.gradle index dcb21f2..97f6a36 100644 --- a/react-native/android/build.gradle +++ b/react-native/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:8.1.0' } } @@ -26,13 +26,17 @@ def safeExtGet(String prop, String fallback) { } android { - compileSdkVersion 31 + if (project.android.hasProperty("namespace")) { + namespace 'com.arthenica.ffmpegkit.reactnative' + } + + compileSdkVersion 33 defaultConfig { minSdkVersion safeExtGet('ffmpegKitPackage', 'https').contains("-lts") ? 16 : 24 - targetSdkVersion 31 - versionCode 510 - versionName "5.1.0" + targetSdkVersion 33 + versionCode 600 + versionName "6.0.0" } buildTypes { diff --git a/react-native/android/gradle.properties b/react-native/android/gradle.properties index e1fff5b..06db369 100644 --- a/react-native/android/gradle.properties +++ b/react-native/android/gradle.properties @@ -1,3 +1,3 @@ android.useAndroidX=true -ffmpegKit.android.main.version=5.1 -ffmpegKit.android.lts.version=5.1 +ffmpegKit.android.main.version=6.0 +ffmpegKit.android.lts.version=6.0 diff --git a/react-native/android/gradle/wrapper/gradle-wrapper.properties b/react-native/android/gradle/wrapper/gradle-wrapper.properties index ae04661..84a0b92 100644 --- a/react-native/android/gradle/wrapper/gradle-wrapper.properties +++ b/react-native/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/react-native/ffmpeg-kit-react-native.podspec b/react-native/ffmpeg-kit-react-native.podspec index 653bcf0..889d3e8 100644 --- a/react-native/ffmpeg-kit-react-native.podspec +++ b/react-native/ffmpeg-kit-react-native.podspec @@ -23,112 +23,112 @@ Pod::Spec.new do |s| s.subspec 'min' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-min', "5.1" + ss.dependency 'ffmpeg-kit-ios-min', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'min-lts' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-min', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-min', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'min-gpl' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-min-gpl', "5.1" + ss.dependency 'ffmpeg-kit-ios-min-gpl', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'min-gpl-lts' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-min-gpl', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-min-gpl', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'https' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-https', "5.1" + ss.dependency 'ffmpeg-kit-ios-https', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'https-lts' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-https', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-https', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'https-gpl' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-https-gpl', "5.1" + ss.dependency 'ffmpeg-kit-ios-https-gpl', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'https-gpl-lts' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-https-gpl', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-https-gpl', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'audio' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-audio', "5.1" + ss.dependency 'ffmpeg-kit-ios-audio', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'audio-lts' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-audio', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-audio', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'video' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-video', "5.1" + ss.dependency 'ffmpeg-kit-ios-video', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'video-lts' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-video', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-video', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'full' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-full', "5.1" + ss.dependency 'ffmpeg-kit-ios-full', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'full-lts' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-full', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-full', "6.0.LTS" ss.ios.deployment_target = '10' end s.subspec 'full-gpl' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-full-gpl', "5.1" + ss.dependency 'ffmpeg-kit-ios-full-gpl', "6.0" ss.ios.deployment_target = '12.1' end s.subspec 'full-gpl-lts' do |ss| ss.source_files = '**/FFmpegKitReactNativeModule.m', '**/FFmpegKitReactNativeModule.h' - ss.dependency 'ffmpeg-kit-ios-full-gpl', "5.1.LTS" + ss.dependency 'ffmpeg-kit-ios-full-gpl', "6.0.LTS" ss.ios.deployment_target = '10' end diff --git a/react-native/ios/FFmpegKitReactNativeModule.m b/react-native/ios/FFmpegKitReactNativeModule.m index 04a03b6..6b3895b 100644 --- a/react-native/ios/FFmpegKitReactNativeModule.m +++ b/react-native/ios/FFmpegKitReactNativeModule.m @@ -765,7 +765,7 @@ RCT_EXPORT_METHOD(uninit:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRej dictionary[KEY_STATISTICS_VIDEO_FPS] = [NSNumber numberWithFloat: [statistics getVideoFps]]; dictionary[KEY_STATISTICS_VIDEO_QUALITY] = [NSNumber numberWithFloat: [statistics getVideoQuality]]; dictionary[KEY_STATISTICS_SIZE] = [NSNumber numberWithLong: [statistics getSize]]; - dictionary[KEY_STATISTICS_TIME] = [NSNumber numberWithInt: [statistics getTime]]; + dictionary[KEY_STATISTICS_TIME] = [NSNumber numberWithDouble: [statistics getTime]]; dictionary[KEY_STATISTICS_BITRATE] = [NSNumber numberWithDouble: [statistics getBitrate]]; dictionary[KEY_STATISTICS_SPEED] = [NSNumber numberWithDouble: [statistics getSpeed]]; diff --git a/react-native/package.json b/react-native/package.json index 42194bd..b39a4f9 100644 --- a/react-native/package.json +++ b/react-native/package.json @@ -1,6 +1,6 @@ { "name": "ffmpeg-kit-react-native", - "version": "5.1.0", + "version": "6.0.0", "description": "FFmpeg Kit for React Native", "main": "src/index", "types": "src/index.d.ts", @@ -29,22 +29,22 @@ "registry": "https://registry.npmjs.org/" }, "devDependencies": { - "@commitlint/config-conventional": "^11.0.0", + "@commitlint/config-conventional": "^17.7.0", "@react-native-community/eslint-config": "^2.0.0", - "@release-it/conventional-changelog": "^2.0.0", - "@types/jest": "^26.0.0", + "@release-it/conventional-changelog": "^7.0.0", + "@types/jest": "^29.5.4", "@types/react": "^16.9.19", "@types/react-native": "^0.62.13", - "commitlint": "^11.0.0", - "eslint": "^7.2.0", - "eslint-config-prettier": "^7.0.0", - "eslint-plugin-prettier": "^3.1.3", - "jest": "^26.0.1", - "pod-install": "^0.1.0", - "prettier": "^2.0.5", + "commitlint": "^17.7.1", + "eslint": "^8.48.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "jest": "^29.6.4", + "pod-install": "^0.1.39", + "prettier": "^3.0.2", "react": "^16.13.1", "react-native": "^0.63.4", - "release-it": "^14.2.2" + "release-it": "^16.1.5" }, "peerDependencies": { "react": "*", diff --git a/react-native/src/index.js b/react-native/src/index.js index 8e167d1..3144750 100644 --- a/react-native/src/index.js +++ b/react-native/src/index.js @@ -1611,7 +1611,7 @@ class FFmpegKitFactory { } static getVersion() { - return "5.1.0"; + return "6.0.0"; } static getLogRedirectionStrategy(sessionId) {