Update build.sh
This commit is contained in:
parent
1203e68ec6
commit
bfd09062e4
55
build.sh
55
build.sh
@ -14,7 +14,7 @@ else
|
||||
fi
|
||||
|
||||
function build {
|
||||
cd repos/$1
|
||||
cd $repos/$1
|
||||
#if [ -f autogen.sh ]; then
|
||||
# ./autogen.sh
|
||||
#fi
|
||||
@ -28,17 +28,16 @@ function build_nvenc {
|
||||
echo "################################################################################"
|
||||
echo "## NVENC ##"
|
||||
echo "################################################################################"
|
||||
cd repos/ffnvcodec
|
||||
cd $repos/ffnvcodec
|
||||
make PREFIX=$BUILD install
|
||||
add_comp nvenc
|
||||
cd -
|
||||
}
|
||||
|
||||
function build_amf {
|
||||
echo "################################################################################"
|
||||
echo "## AMF ##"
|
||||
echo "################################################################################"
|
||||
cp -a repos/amf/amf/public/include $BUILD/include/AMF
|
||||
cp -a $repos/amf/amf/public/include $BUILD/include/AMF
|
||||
add_comp amf
|
||||
}
|
||||
|
||||
@ -57,7 +56,6 @@ function build_mfx {
|
||||
#fi
|
||||
#build libmfx
|
||||
#sed -i 's/-lstdc++/-ladvapi32/g' $BUILD/lib/pkgconfig/libmfx.pc
|
||||
|
||||
add_comp libmfx
|
||||
}
|
||||
|
||||
@ -75,7 +73,7 @@ function build_svt {
|
||||
#
|
||||
# AV1
|
||||
#git clone -q --depth 1 https://github.com/AOMediaCodec/SVT-AV1 $SRC/svt-av1
|
||||
cd repos/svt-av1/Build/windows
|
||||
cd $repos/svt-av1/Build/windows
|
||||
./build.bat 2017 $MODE static
|
||||
cp -r ../../Source/API $BUILD/include/svt-av1 ; cp ../../Bin/$MSBUILD_CONFIG/SvtAv1Enc.lib $BUILD/lib/ ; cp SvtAv1Enc.pc $BUILD/lib/pkgconfig/
|
||||
add_comp libsvtav1
|
||||
@ -96,20 +94,18 @@ function build_ogg {
|
||||
echo "################################################################################"
|
||||
echo "## LIBOGG ##"
|
||||
echo "################################################################################"
|
||||
cd repos/libogg
|
||||
cd $repos/libogg
|
||||
build libogg "--disable-shared"
|
||||
cd -
|
||||
}
|
||||
|
||||
function build_vorbis {
|
||||
echo "################################################################################"
|
||||
echo "## LIBVORBIS ##"
|
||||
echo "################################################################################"
|
||||
cd repos/libvorbis
|
||||
cd $repos/libvorbis
|
||||
build libvorbis "--disable-shared"
|
||||
sed -i '/^Libs\.private.*/d' $BUILD/lib/pkgconfig/vorbis.pc # don't need m.lib on windows
|
||||
add_comp libvorbis
|
||||
cd -
|
||||
}
|
||||
|
||||
function build_snappy {
|
||||
@ -117,7 +113,7 @@ function build_snappy {
|
||||
echo "## LIBSNAPPY ##"
|
||||
echo "################################################################################"
|
||||
#git clone -q -b 1.1.8 https://github.com/google/snappy.git $SRC/snappy
|
||||
cd repos/snappy
|
||||
cd $repos/snappy
|
||||
rm -rf work
|
||||
mkdir work
|
||||
cd work
|
||||
@ -126,68 +122,63 @@ function build_snappy {
|
||||
cp $MSBUILD_CONFIG/snappy.lib $BUILD/lib/snappy.lib
|
||||
cp ../snappy.h ../snappy-c.h $BUILD/include/
|
||||
add_comp libsnappy
|
||||
cd ../../..
|
||||
}
|
||||
|
||||
function build_libvpx {
|
||||
echo "################################################################################"
|
||||
echo "## LIBVPX ##"
|
||||
echo "################################################################################"
|
||||
cd repos/libvpx
|
||||
cd $repos/libvpx
|
||||
./configure --prefix=$BUILD --target=x86_64-win64-vs15 --enable-vp9-highbitdepth --disable-shared --disable-examples --disable-tools --disable-docs --disable-libyuv --disable-unit_tests --disable-postproc
|
||||
make -j $NUMBER_OF_PROCESSORS
|
||||
make install
|
||||
mv $BUILD/lib/x64/vpxmd.lib $BUILD/lib/vpx.lib
|
||||
rm -rf $BUILD/lib/x64
|
||||
add_comp libvpx
|
||||
cd -
|
||||
}
|
||||
|
||||
function build_libfdkaac {
|
||||
echo "################################################################################"
|
||||
echo "## LIBFDK_AAC ##"
|
||||
echo "################################################################################"
|
||||
cd repos/fdk-aac
|
||||
cd $repos/fdk-aac
|
||||
build fdk-aac "--disable-static --disable-shared"
|
||||
add_comp libfdk-aac
|
||||
cd - ; cd repos/ffmpeg
|
||||
cd $repos/ffmpeg
|
||||
patch -N -p1 -i ../../patches/0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch
|
||||
cd -
|
||||
}
|
||||
|
||||
function build_lame {
|
||||
echo "################################################################################"
|
||||
echo "## LIBLAME ##"
|
||||
echo "################################################################################"
|
||||
svn co svn://svn.code.sf.net/p/lame/svn/trunk/lame@6474 repos/lame
|
||||
cd repos/lame
|
||||
svn co svn://svn.code.sf.net/p/lame/svn/trunk/lame@6474 $repos/lame
|
||||
cd $repos/lame
|
||||
build lame "--enable-nasm --disable-frontend --disable-shared --enable-static"
|
||||
add_comp libmp3lame
|
||||
cd -
|
||||
}
|
||||
|
||||
function build_zimg {
|
||||
echo "################################################################################"
|
||||
echo "## ZIMG ##"
|
||||
echo "################################################################################"
|
||||
cd repos/zimg
|
||||
cd $repos/zimg
|
||||
./autogen.sh
|
||||
./configure --prefix=$BUILD
|
||||
cd _msvc/zimg
|
||||
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" /property:ConfigurationType=StaticLibrary /property:WindowsTargetPlatformVersion=10.0.17134.0 /property:PlatformToolset=v141 /property:Platform=x64 /property:WholeProgramOptimization=false zimg.vcxproj
|
||||
cp x64/$MSBUILD_CONFIG/z.lib $BUILD/lib/zimg.lib
|
||||
cd ../..
|
||||
cp repos/zimg/src/zimg/api/zimg.h $BUILD/include/zimg.h
|
||||
cp $repos/zimg/src/zimg/api/zimg.h $BUILD/include/zimg.h
|
||||
cp zimg.pc $BUILD/lib/pkgconfig/zimg.pc
|
||||
add_comp libzimg
|
||||
cd ../..
|
||||
}
|
||||
|
||||
function build_x264 {
|
||||
echo "################################################################################"
|
||||
echo "## LIBX264 ##"
|
||||
echo "################################################################################"
|
||||
cd repos/x264
|
||||
cd $repos/x264
|
||||
sed -i 's/#define X264_API_IMPORTS 1/\/\/#define X264_API_IMPORTS 1/g' ../ffmpeg/libavcodec/libx264.c
|
||||
#git checkout b5bc5d69c580429ff716bafcd43655e855c31b02
|
||||
#f9af2a0f71d0fca7c1cafa7657f03a302da0ca1c
|
||||
@ -195,22 +186,21 @@ function build_x264 {
|
||||
make -j $NUMBER_OF_PROCESSORS
|
||||
make install-lib-static
|
||||
add_comp libx264
|
||||
cd -
|
||||
}
|
||||
|
||||
function build_opus {
|
||||
echo "################################################################################"
|
||||
echo "## LIBOPUS ##"
|
||||
echo "################################################################################"
|
||||
cd repos/opus/win32/VS2015
|
||||
cd $repos/opus/win32/VS2015
|
||||
echo \nConverting project file ...
|
||||
sed -i 's/v140/v141/g' opus.vcxproj
|
||||
echo Building project 'opus' ...
|
||||
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" /property:Platform=x64 opus.vcxproj
|
||||
echo Done.
|
||||
cp x64/$MSBUILD_CONFIG/opus.lib $BUILD/lib/opus.lib
|
||||
cp -r repos/opus/include $BUILD/include/opus
|
||||
cp repos/opus/opus.pc.in $BUILD/lib/pkgconfig/opus.pc
|
||||
cp -r $repos/opus/include $BUILD/include/opus
|
||||
cp $repos/opus/opus.pc.in $BUILD/lib/pkgconfig/opus.pc
|
||||
sed -i "s#@prefix@#$BUILD#g" $BUILD/lib/pkgconfig/opus.pc
|
||||
sed -i "s/@exec_prefix@/\$\{prefix\}/g" $BUILD/lib/pkgconfig/opus.pc
|
||||
sed -i "s/@libdir@/\$\{prefix\}\/lib/g" $BUILD/lib/pkgconfig/opus.pc
|
||||
@ -218,14 +208,13 @@ function build_opus {
|
||||
sed -i "s/@LIBM@//g" $BUILD/lib/pkgconfig/opus.pc
|
||||
sed -i "s/@VERSION@/2.0.0/g" $BUILD/lib/pkgconfig/opus.pc
|
||||
add_comp libopus
|
||||
cd -
|
||||
}
|
||||
|
||||
function build_x265 {
|
||||
echo "################################################################################"
|
||||
echo "## LIBX265 ##"
|
||||
echo "################################################################################"
|
||||
cd repos/x265/build/vc15-x86_64
|
||||
cd $repos/x265/build/vc15-x86_64
|
||||
rm -rf work*
|
||||
mkdir work work10 work12
|
||||
# 12bit
|
||||
@ -264,6 +253,7 @@ mkdir src build build/include build/lib build/lib/pkgconfig
|
||||
|
||||
BUILD=`realpath build`
|
||||
SRC=`realpath src`
|
||||
repos=$(realpath repo)
|
||||
|
||||
build_nvenc
|
||||
build_amf
|
||||
@ -280,7 +270,10 @@ build_zimg
|
||||
#build_x264
|
||||
#build_x265
|
||||
|
||||
cd repos/ffmpeg
|
||||
echo "################################################################################"
|
||||
echo "## FFMPEG ##"
|
||||
echo "################################################################################"
|
||||
cd $repos/ffmpeg
|
||||
PKG_CONFIG_PATH=$BUILD/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --toolchain=msvc --extra-cflags="$CFLAGS -I$BUILD/include" --extra-ldflags="-LIBPATH:$BUILD/lib" --prefix=$BUILD --pkg-config-flags="--static" --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --disable-devices --disable-demuxers --disable-decoders --disable-network --enable-w32threads --enable-gpl $COMPONENTS
|
||||
sed -i 's/\x81/ue/g' config.h
|
||||
make -j $NUMBER_OF_PROCESSORS
|
||||
|
Loading…
x
Reference in New Issue
Block a user