代码拉取完成,页面将自动刷新
#!/bin/bash
dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# Common configure settings for all architectures
common_settings=" \
--toolchain=msvc \
--target-os=win32 \
--disable-programs \
--disable-d3d11va \
--disable-dxva2 \
--enable-shared \
--enable-cross-compile \
--extra-cflags=\"-MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00 -GUARD:CF\" \
--extra-ldflags=\"-APPCONTAINER WindowsApp.lib -PROFILE -GUARD:CF -DYNAMICBASE\" \
"
# Architecture specific configure settings
arch="${1,,}"
if [ -z $arch ]; then
echo "ERROR: No architecture set" 1>&2
exit 1
elif [ $arch == "x86" ]; then
arch_settings="
--arch=x86 \
--prefix=../../Build/$arch \
"
elif [ $arch == "x64" ]; then
arch_settings="
--arch=x86_64 \
--prefix=../../Build/$arch \
"
elif [ $arch == "arm" ]; then
arch_settings="
--arch=arm \
--as=armasm \
--cpu=armv7 \
--enable-thumb \
--extra-cflags=\"-D__ARM_PCS_VFP\" \
--prefix=../../Build/$arch \
"
elif [ $arch == "arm64" ]; then
arch_settings="
--arch=arm64 \
--as=armasm64 \
--cpu=armv7 \
--enable-thumb \
--extra-cflags=\"-D__ARM_PCS_VFP\" \
--prefix=../../Build/$arch \
"
else
echo "ERROR: $arch is not a valid architecture" 1>&2
exit 1
fi
# Extra configure settings supplied by user
extra_settings="${2:-""}"
# Build FFmpeg
pushd $dir/ffmpeg > /dev/null
rm -rf Output/$arch
mkdir -p Output/$arch
cd Output/$arch
eval ../../configure $common_settings $arch_settings $extra_settings &&
make -j`nproc` &&
make install
result=$?
popd > /dev/null
if [ $result -ne 0 ]; then
echo "ERROR: FFmpeg build for $arch failed with exit code $result" 1>&2
fi
exit $result
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。