Skip to content

Instantly share code, notes, and snippets.

@SunXiaoShan
Last active May 6, 2020 09:27
Show Gist options
  • Save SunXiaoShan/d9637603f96e4276dfb141e100c831c6 to your computer and use it in GitHub Desktop.
Save SunXiaoShan/d9637603f96e4276dfb141e100c831c6 to your computer and use it in GitHub Desktop.
#!/bin/sh
# reference
# https://www.twblogs.net/a/5b8c3b1a2b71771883317c2c
BUILD_RESULT_PATH=build_output
if [ -x nasm ]; then
wget "https://www.nasm.us/pub/nasm/releasebuilds/2.14.03rc2/macosx/nasm-2.14.03rc2-macosx.zip"
unzip nasm-2.14.03rc2-macosx.zip
mkdir -p ~/app/nasm; mv nasm-2.14.03rc2/* $_
echo 'export PATH="~/app/nasm:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
fi
rm -rf ./openh264
git clone https://github.com/cisco/openh264.git
cd openh264/
git checkout origin/openh264v2.1.1
mkdir ../$BUILD_RESULT_PATH
# arm64
make OS=ios ARCH=arm64 SDK_MIN=7.1 clean
make OS=ios ARCH=arm64 SDK_MIN=7.1
mv ./libcommon.a ../$BUILD_RESULT_PATH
mv ./libdecoder.a ../$BUILD_RESULT_PATH
mv ./libencoder.a ../$BUILD_RESULT_PATH
mv ./libopenh264.a ../$BUILD_RESULT_PATH
mv ./libprocessing.a ../$BUILD_RESULT_PATH
mv ./codec/api/svc/codec_api.h ../$BUILD_RESULT_PATH
mv ./codec/api/svc/codec_app_def.h ../$BUILD_RESULT_PATH
mv ./codec/api/svc/codec_def.h ../$BUILD_RESULT_PATH
mv ./codec/api/svc/codec_ver.h ../$BUILD_RESULT_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment