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