add no-archive/no-framework option in top level build scripts

This commit is contained in:
Taner Sener 2021-01-26 23:34:56 +00:00
parent c0be432062
commit d94bd1b873
9 changed files with 135 additions and 73 deletions

View File

@ -61,6 +61,9 @@ while [ ! $# -eq 0 ]; do
skip_library "${SKIP_LIBRARY}" skip_library "${SKIP_LIBRARY}"
;; ;;
--no-archive)
NO_ARCHIVE="1"
;;
--no-output-redirection) --no-output-redirection)
no_output_redirection no_output_redirection
;; ;;
@ -270,7 +273,12 @@ if [[ -n ${ANDROID_ARCHITECTURES} ]]; then
echo "skipped" echo "skipped"
fi fi
echo -e -n "\n\nCreating Android archive under prebuilt: " echo -e -n "\n"
# DO NOT BUILD ANDROID ARCHIVE
if [[ ${NO_ARCHIVE} -ne 1 ]]; then
echo -e -n "\nCreating Android archive under prebuilt: "
# BUILD ANDROID ARCHIVE # BUILD ANDROID ARCHIVE
./gradlew ffmpeg-kit-android-lib:clean ffmpeg-kit-android-lib:assembleRelease ffmpeg-kit-android-lib:testReleaseUnitTest 1>>"${BASEDIR}"/build.log 2>&1 ./gradlew ffmpeg-kit-android-lib:clean ffmpeg-kit-android-lib:assembleRelease ffmpeg-kit-android-lib:testReleaseUnitTest 1>>"${BASEDIR}"/build.log 2>&1
@ -289,6 +297,9 @@ if [[ -n ${ANDROID_ARCHITECTURES} ]]; then
exit 1 exit 1
fi fi
echo -e "Created ffmpeg-kit Android archive successfully.\n" 1>>"${BASEDIR}"/build.log 2>&1 echo -e "INFO: Created ffmpeg-kit Android archive successfully.\n" 1>>"${BASEDIR}"/build.log 2>&1
echo -e "ok\n" echo -e "ok\n"
else
echo -e "INFO: Skipped creating Android archive.\n" 1>>"${BASEDIR}"/build.log 2>&1
fi
fi fi

16
ios.sh
View File

@ -68,6 +68,9 @@ while [ ! $# -eq 0 ]; do
skip_library "${SKIP_LIBRARY}" skip_library "${SKIP_LIBRARY}"
;; ;;
--no-framework)
NO_FRAMEWORK="1"
;;
--no-output-redirection) --no-output-redirection)
no_output_redirection no_output_redirection
;; ;;
@ -249,6 +252,11 @@ for run_arch in {0..12}; do
fi fi
done done
echo -e -n "\n"
# DO NOT BUILD FRAMEWORKS
if [[ ${NO_FRAMEWORK} -ne 1 ]]; then
# BUILD FFMPEG-KIT # BUILD FFMPEG-KIT
if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
@ -259,7 +267,7 @@ if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
build_apple_architecture_variant_strings build_apple_architecture_variant_strings
if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]]; then if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]]; then
echo -e -n "\n\nCreating universal libraries and xcframeworks under prebuilt: " echo -e -n "\nCreating universal libraries and xcframeworks under prebuilt: "
create_universal_libraries_for_ios_xcframeworks create_universal_libraries_for_ios_xcframeworks
@ -267,7 +275,7 @@ if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
create_ios_xcframeworks create_ios_xcframeworks
else else
echo -e -n "\n\nCreating universal libraries and frameworks under prebuilt: " echo -e -n "\nCreating universal libraries and frameworks under prebuilt: "
create_universal_libraries_for_ios_default_frameworks create_universal_libraries_for_ios_default_frameworks
@ -276,3 +284,7 @@ if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
echo -e "ok\n" echo -e "ok\n"
fi fi
else
echo -e "INFO: Skipped creating iOS frameworks.\n" 1>>"${BASEDIR}"/build.log 2>&1
fi

View File

@ -68,6 +68,9 @@ while [ ! $# -eq 0 ]; do
skip_library "${SKIP_LIBRARY}" skip_library "${SKIP_LIBRARY}"
;; ;;
--no-framework)
NO_FRAMEWORK="1"
;;
--no-output-redirection) --no-output-redirection)
no_output_redirection no_output_redirection
;; ;;
@ -223,6 +226,11 @@ for run_arch in {0..12}; do
fi fi
done done
echo -e -n "\n"
# DO NOT BUILD FRAMEWORKS
if [[ ${NO_FRAMEWORK} -ne 1 ]]; then
# BUILD FFMPEG-KIT # BUILD FFMPEG-KIT
if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
@ -233,7 +241,7 @@ if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
build_apple_architecture_variant_strings build_apple_architecture_variant_strings
if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]]; then if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]]; then
echo -e -n "\n\nCreating universal libraries and xcframeworks under prebuilt: " echo -e -n "\nCreating universal libraries and xcframeworks under prebuilt: "
create_universal_libraries_for_macos_xcframeworks create_universal_libraries_for_macos_xcframeworks
@ -241,7 +249,7 @@ if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
create_macos_xcframeworks create_macos_xcframeworks
else else
echo -e -n "\n\nCreating universal libraries and frameworks under prebuilt: " echo -e -n "\nCreating universal libraries and frameworks under prebuilt: "
create_universal_libraries_for_macos_default_frameworks create_universal_libraries_for_macos_default_frameworks
@ -250,3 +258,7 @@ if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
echo -e "ok\n" echo -e "ok\n"
fi fi
else
echo -e "INFO: Skipped creating macOS frameworks.\n" 1>>"${BASEDIR}"/build.log 2>&1
fi

View File

@ -48,7 +48,7 @@ under the prebuilt folder.\n"
display_help_common_libraries display_help_common_libraries
display_help_gpl_libraries display_help_gpl_libraries
display_help_advanced_options display_help_advanced_options " --no-archive\t\t\tdo not build Android archive [no]"
} }
enable_main_build() { enable_main_build() {

View File

@ -51,7 +51,11 @@ libraries are created under the prebuilt folder.\n"
display_help_common_libraries display_help_common_libraries
display_help_gpl_libraries display_help_gpl_libraries
display_help_advanced_options if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]]; then
display_help_advanced_options " --no-framework\t\tdo not build xcframework bundles [no]"
else
display_help_advanced_options " --no-framework\t\tdo not build framework bundles and universal libraries [no]"
fi
} }
enable_main_build() { enable_main_build() {

View File

@ -39,7 +39,11 @@ When compilation ends, libraries are created under the prebuilt folder.\n"
display_help_common_libraries display_help_common_libraries
display_help_gpl_libraries display_help_gpl_libraries
display_help_advanced_options if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]]; then
display_help_advanced_options " --no-framework\t\tdo not build xcframework bundles [no]"
else
display_help_advanced_options " --no-framework\t\tdo not build framework bundles and universal libraries [no]"
fi
} }
enable_main_build() { enable_main_build() {

View File

@ -37,7 +37,11 @@ When compilation ends, libraries are created under the prebuilt folder.\n"
display_help_common_libraries display_help_common_libraries
display_help_gpl_libraries display_help_gpl_libraries
display_help_advanced_options if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]]; then
display_help_advanced_options " --no-framework\t\tdo not build xcframework bundles [no]"
else
display_help_advanced_options " --no-framework\t\tdo not build framework bundles and universal libraries [no]"
fi
} }
enable_main_build() { enable_main_build() {

View File

@ -595,7 +595,11 @@ display_help_advanced_options() {
echo -e "Advanced options:" echo -e "Advanced options:"
echo -e " --reconf-LIBRARY\t\trun autoreconf before building LIBRARY [no]" echo -e " --reconf-LIBRARY\t\trun autoreconf before building LIBRARY [no]"
echo -e " --redownload-LIBRARY\t\tdownload LIBRARY even if it is detected as already downloaded [no]" echo -e " --redownload-LIBRARY\t\tdownload LIBRARY even if it is detected as already downloaded [no]"
echo -e " --rebuild-LIBRARY\t\tbuild LIBRARY even if it is detected as already built [no]\n" echo -e " --rebuild-LIBRARY\t\tbuild LIBRARY even if it is detected as already built [no]"
if [ -n "$1" ]; then
echo -e "$1"
fi
echo -e ""
} }
# #

15
tvos.sh
View File

@ -68,6 +68,9 @@ while [ ! $# -eq 0 ]; do
skip_library "${SKIP_LIBRARY}" skip_library "${SKIP_LIBRARY}"
;; ;;
--no-framework)
NO_FRAMEWORK="1"
;;
--no-output-redirection) --no-output-redirection)
no_output_redirection no_output_redirection
;; ;;
@ -220,6 +223,11 @@ for run_arch in {0..12}; do
fi fi
done done
echo -e -n "\n"
# DO NOT BUILD FRAMEWORKS
if [[ ${NO_FRAMEWORK} -ne 1 ]]; then
# BUILD FFMPEG-KIT # BUILD FFMPEG-KIT
if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
@ -230,7 +238,7 @@ if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
build_apple_architecture_variant_strings build_apple_architecture_variant_strings
if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]]; then if [[ -n ${FFMPEG_KIT_XCF_BUILD} ]]; then
echo -e -n "\n\nCreating universal libraries and xcframeworks under prebuilt: " echo -e -n "\nCreating universal libraries and xcframeworks under prebuilt: "
create_universal_libraries_for_tvos_xcframeworks create_universal_libraries_for_tvos_xcframeworks
@ -238,7 +246,7 @@ if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
create_tvos_xcframeworks create_tvos_xcframeworks
else else
echo -e -n "\n\nCreating universal libraries and frameworks under prebuilt: " echo -e -n "\nCreating universal libraries and frameworks under prebuilt: "
create_universal_libraries_for_tvos_default_frameworks create_universal_libraries_for_tvos_default_frameworks
@ -247,3 +255,6 @@ if [[ -n ${TARGET_ARCH_LIST[0]} ]]; then
echo -e "ok\n" echo -e "ok\n"
fi fi
else
echo -e "INFO: Skipped creating tvOS frameworks.\n" 1>>"${BASEDIR}"/build.log 2>&1
fi