diff options
author | Rechi <Rechi@users.noreply.github.com> | 2018-11-02 23:03:15 +0100 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2018-11-02 23:03:15 +0100 |
commit | f712d24821a26ecc522beae58b70cba93103cbcb (patch) | |
tree | c7bd67d8d8878748f2505099185257dc92359769 /tools/buildsteps/windows | |
parent | ed5af9b8547e29e498949547798b06a2460036e3 (diff) |
[windows] build FFmpeg static
Diffstat (limited to 'tools/buildsteps/windows')
-rw-r--r-- | tools/buildsteps/windows/buildffmpeg.sh | 2 | ||||
-rw-r--r-- | tools/buildsteps/windows/ffmpeg_options.txt | 4 | ||||
-rw-r--r-- | tools/buildsteps/windows/make-mingwlibs.sh | 6 | ||||
-rw-r--r-- | tools/buildsteps/windows/patches/0003-ffmpeg-static.patch | 20 |
4 files changed, 26 insertions, 6 deletions
diff --git a/tools/buildsteps/windows/buildffmpeg.sh b/tools/buildsteps/windows/buildffmpeg.sh index cd3bae5272..14e48c850a 100644 --- a/tools/buildsteps/windows/buildffmpeg.sh +++ b/tools/buildsteps/windows/buildffmpeg.sh @@ -121,7 +121,7 @@ do_print_status "$LIBNAME-$VERSION (${TRIPLET})" "$blue_color" "Configuring" [[ -z "$extra_ldflags" ]] && extra_ldflags=-static-libgcc $LOCALSRCDIR/configure --target-os=$FFMPEG_TARGET_OS --prefix=$FFMPEGDESTDIR --arch=$ARCH \ - --disable-static --enable-shared $FFMPEG_OPTS_SHARED \ + $FFMPEG_OPTS_SHARED \ --extra-cflags="$extra_cflags" --extra-ldflags="$extra_ldflags" do_makelib diff --git a/tools/buildsteps/windows/ffmpeg_options.txt b/tools/buildsteps/windows/ffmpeg_options.txt index 84b44c3012..30de94404b 100644 --- a/tools/buildsteps/windows/ffmpeg_options.txt +++ b/tools/buildsteps/windows/ffmpeg_options.txt @@ -8,11 +8,11 @@ --disable-nvenc --disable-openssl --disable-programs ---disable-static +--disable-shared --enable-encoder=ac3,aac,wmav2,png,mjpeg --enable-muxer=spdif,adts,asf,ipod --enable-postproc --enable-protocol=http --enable-runtime-cpudetect ---enable-shared +--enable-static --enable-zlib diff --git a/tools/buildsteps/windows/make-mingwlibs.sh b/tools/buildsteps/windows/make-mingwlibs.sh index 8aad81f1bb..e5a3594cd9 100644 --- a/tools/buildsteps/windows/make-mingwlibs.sh +++ b/tools/buildsteps/windows/make-mingwlibs.sh @@ -64,8 +64,8 @@ throwerror() { checkfiles() { for i in $@; do - if [ ! -f "$PREFIX/bin/$i" ]; then - throwerror "$PREFIX/bin/$i" + if [ ! -f "$PREFIX/$i" ]; then + throwerror "$PREFIX/$i" exit 1 fi done @@ -98,7 +98,7 @@ echo "-------------------------------------------------" echo " building FFmpeg $TRIPLET" echo "-------------------------------------------------" ./buildffmpeg.sh $MAKECLEAN -checkfiles avcodec-58.dll avformat-58.dll avutil-56.dll postproc-55.dll swscale-5.dll avfilter-7.dll swresample-3.dll +checkfiles lib/avcodec.lib lib/avformat.lib lib/avutil.lib lib/postproc.lib lib/swscale.lib lib/avfilter.lib lib/swresample.lib echo "-------------------------------------------------" echo " building of FFmpeg $TRIPLET done..." echo "-------------------------------------------------" diff --git a/tools/buildsteps/windows/patches/0003-ffmpeg-static.patch b/tools/buildsteps/windows/patches/0003-ffmpeg-static.patch new file mode 100644 index 0000000000..48938d43f1 --- /dev/null +++ b/tools/buildsteps/windows/patches/0003-ffmpeg-static.patch @@ -0,0 +1,20 @@ +--- a/configure ++++ b/configure +@@ -5109,6 +5109,8 @@ + enabled shared && ! enabled small && test_cmd $windres --version && enable gnu_windres + enabled x86_32 && check_ldflags -Wl,--large-address-aware + shlibdir_default="$bindir_default" ++ LIBPREF="" ++ LIBSUF=".lib" + SLIBPREF="" + SLIBSUF=".dll" + SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' +@@ -5158,6 +5160,8 @@ + fi + enabled x86_32 && check_ldflags -LARGEADDRESSAWARE + shlibdir_default="$bindir_default" ++ LIBPREF="" ++ LIBSUF=".lib" + SLIBPREF="" + SLIBSUF=".dll" + SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' |