feat: windows build script

main
paring 2023-05-03 15:18:43 +09:00
parent 98706c4f1f
commit c92dc234b9
4 changed files with 11 additions and 6 deletions

3
build-win64.sh Executable file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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