From 8593cf9ac053592cab4d46c1e90dd35833d6a926 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Thu, 18 Mar 2021 23:09:34 +0000 Subject: [PATCH] add macos script to create a universal binary test package --- tools/create_macos_universal_test_package.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tools/create_macos_universal_test_package.sh diff --git a/tools/create_macos_universal_test_package.sh b/tools/create_macos_universal_test_package.sh new file mode 100755 index 0000000..5742d4a --- /dev/null +++ b/tools/create_macos_universal_test_package.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +cd ../prebuilt/bundle-apple-universal-macos || exit 1 +find . -name "*.a" -not -path "./ffmpeg-kit/*" -exec cp {} ./ffmpeg-kit/lib \; || exit 1 +cp -r ffmpeg/include/* ffmpeg-kit/include || 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} ffmpeg-kit/LICENSE.${LIBRARY_NAME} || exit 1 +done + +zip -r "../ffmpeg-kit-macos-universal.zip" ffmpeg-kit || exit 1 \ No newline at end of file