feat: windows build script
parent
98706c4f1f
commit
c92dc234b9
|
@ -0,0 +1,3 @@
|
||||||
|
TOOLCHAIN=x86_64-w64-mingw32
|
||||||
|
|
||||||
|
FFMPEG_OS=win64 OPENH264_ARCH=x86_64 OPENH264_OS=mingw_nt CC=$TOOLCHAIN-gcc CXX=$TOOLCHAIN-g++ AR=$TOOLCHAIN-ar bash build.sh --arch x86_64
|
1
build.sh
1
build.sh
|
@ -1,4 +1,5 @@
|
||||||
export ARCH=$(uname -m)
|
export ARCH=$(uname -m)
|
||||||
|
export JOBS=$(awk -v count=$(nproc) 'BEGIN { print ( int( count / 2 ) ) }')
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
|
@ -9,9 +9,10 @@ make distclean
|
||||||
./configure --disable-gpl --disable-nonfree --disable-doc --disable-network \
|
./configure --disable-gpl --disable-nonfree --disable-doc --disable-network \
|
||||||
--disable-ffprobe --disable-ffplay --enable-static --disable-shared \
|
--disable-ffprobe --disable-ffplay --enable-static --disable-shared \
|
||||||
--enable-libopenh264 \
|
--enable-libopenh264 \
|
||||||
--prefix=$PREFIX --enable-cross-compile --arch=$ARCH --cc="clang -arch $ARCH" \
|
--prefix=$PREFIX --enable-cross-compile --arch=$ARCH \
|
||||||
--pkg-config-flags="--static"
|
--cc="$CC" --cxx="$CXX" \
|
||||||
|
--pkg-config-flags="--static" --target-os=$FFMPEG_OS
|
||||||
|
|
||||||
make -j
|
make -j$JOBS
|
||||||
|
|
||||||
cp ffmpeg $outDir
|
cp ffmpeg* $outDir
|
||||||
|
|
|
@ -16,11 +16,11 @@ git clone https://github.com/cisco/openh264 $projectDir -b v$OPENH264_VERSION --
|
||||||
|
|
||||||
cd $projectDir
|
cd $projectDir
|
||||||
|
|
||||||
args="PREFIX=$PREFIX ARCH=$ARCH"
|
args="PREFIX=$PREFIX OS=$OPENH264_OS ARCH=$OPENH264_ARCH CC=$CC CXX=$CXX AR=$AR"
|
||||||
|
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
make -j $args
|
make -j$JOBS $args
|
||||||
|
|
||||||
make install-static $args
|
make install-static $args
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue