@@ -53,7 +53,15 @@ ffmbcver="FFmbc-0.7-rc8"
53
53
fflight=false
54
54
# Ask me questions and show the intro or run only with options configured above! (default: true)
55
55
askmequestions=true
56
-
56
+ # ##
57
+ if ${ffmbc}
58
+ then
59
+ ffvanilla=true
60
+ ffnonfree=false
61
+ askmequestions=false
62
+ ffmpeg=false
63
+ fflight=false
64
+ fi
57
65
# ###############################################################################
58
66
59
67
type -p lib.exe > /dev/null 2>&1 && libexeok=true || libexeok=false
@@ -194,7 +202,7 @@ install_cross_compiler() {
194
202
195
203
wget http://zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-3.1.0 -O mingw-w64-build-3.1.0
196
204
chmod u+x mingw-w64-build-3.1.0
197
- ./mingw-w64-build-3.1.0 --mingw-w64-ver=2.0.7 --disable-nls --disable-shared --default-configure --clean-build || exit 1
205
+ ./mingw-w64-build-3.1.0 --mingw-w64-ver=2.0.7 --disable-nls --disable-shared --default-configure --clean-build --threads=pthreads-w32 || exit 1
198
206
if [ -d mingw-w64-x86_64 ]
199
207
then
200
208
touch mingw-w64-x86_64/compiler.done
@@ -331,11 +339,13 @@ do_make_install() {
331
339
download_and_unpack_file () {
332
340
url=" $1 "
333
341
output_name=$( basename $url )
342
+ echo $output_name
334
343
output_dir=" $2 "
335
344
if [ ! -f " $output_dir /unpacked.successfully" ]
336
345
then
337
- if [ ! -f " $output_name " ]
346
+ if [ ! -s " $output_name " ]
338
347
then
348
+ rm $output_name
339
349
wget " $url " -O " $output_name " || exit 1
340
350
fi
341
351
tar -xf " $output_name " || unzip $output_name || exit 1
@@ -370,12 +380,14 @@ build_librtmp() {
370
380
local localdir=" rtmpdump_git"
371
381
do_git_checkout " http://repo.or.cz/r/rtmpdump.git" ${localdir}
372
382
cd ${archdir} /${localdir} /librtmp
373
- if [ ! -f " already_gnutls" ]
374
- then
375
- make install CRYPTO=GNUTLS OPT=' -O2 -g' " CROSS_COMPILE=$cross_prefix " SHARED=no " prefix=$mingwprefix " && touch already_gnutls || exit 1
376
- fi
377
- touch already_ran_make_install
378
- echo -e " ${PASS} Successfully did make and install librtmp ${RST} \n"
383
+ if [ ! -f " already_ran_make_install" ]
384
+ then
385
+ # do_make_install "CRYPTO=GNUTLS OPT=-O2 CROSS_COMPILE=$cross_prefix SHARED=no prefix=$mingwprefix"
386
+ make install CRYPTO=GNUTLS OPT=' -O2 -g' " CROSS_COMPILE=$cross_prefix " SHARED=no " prefix=$mingwprefix " || exit 1
387
+ # sed -i 's/-lrtmp -lz/-lrtmp -lwinmm -lz/' "$PKG_CONFIG_PATH/librtmp.pc"
388
+ fi
389
+ touch already_ran_make_install
390
+ echo -e " ${PASS} Successfully did make and install librtmp ${RST} \n"
379
391
cd ${archdir}
380
392
}
381
393
@@ -499,8 +511,10 @@ build_libfribidi() {
499
511
cd ${archdir} /${localdir}
500
512
if [[ ! -f already_ran_make ]]
501
513
then
502
- sed -i -e ' /(defined(_WIN32_WCE))/,+2d' lib/fribidi-common.h
503
- sed -i -e ' /!WIN32/,d' lib/fribidi-common.h
514
+ # sed -i -e '/(defined(_WIN32_WCE))/,+2d' lib/fribidi-common.h
515
+ # sed -i -e '/!WIN32/,d' lib/fribidi-common.h
516
+ sed -i -e ' /#ifndef\sFRIBIDI_ENTRY/,+3d' lib/fribidi-common.h
517
+ sed -i -e ' /!WIN32/,+1d' lib/fribidi-common.h
504
518
fi
505
519
generic_configure
506
520
do_make_install
@@ -624,15 +638,15 @@ build_fdk_aac() {
624
638
}
625
639
626
640
build_libexpat () {
627
- generic_download_and_install http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz/download expat-2.1.0 --with-gnu-ld
641
+ generic_download_and_install http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz expat-2.1.0 --with-gnu-ld
628
642
}
629
643
630
644
build_freetype () {
631
645
generic_download_and_install http://download.savannah.gnu.org/releases/freetype/freetype-2.4.10.tar.gz freetype-2.4.10
632
646
}
633
647
634
648
build_vo_aacenc () {
635
- generic_download_and_install http://sourceforge.net/projects/opencore-amr/files/vo-aacenc/vo-aacenc-0.1.2.tar.gz/download vo-aacenc-0.1.2
649
+ generic_download_and_install http://sourceforge.net/projects/opencore-amr/files/vo-aacenc/vo-aacenc-0.1.2.tar.gz vo-aacenc-0.1.2
636
650
}
637
651
638
652
build_sdl () {
@@ -667,7 +681,7 @@ build_faac() {
667
681
}
668
682
669
683
build_lame () {
670
- generic_download_and_install http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.5.tar.gz/download lame-3.99.5
684
+ generic_download_and_install http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.5.tar.gz lame-3.99.5
671
685
}
672
686
673
687
build_bz2 () {
@@ -747,23 +761,23 @@ build_ffmbc() {
747
761
echo -e " ${PASS} Already patched ${file2patch} ${RST} "
748
762
else
749
763
echo -e " ${INFO} Patching ${file2patch} ${RST} "
750
- sed -i ' 28 i#include \"dxva.h\"' $file2patch
764
+ # sed -i '28 i#include \"dxva.h\"' $file2patch
751
765
fi
752
766
file2patch=" libavdevice/dshow_filter.c"
753
767
if grep -Fxq " #define NO_DSHOW_STRSAFE" $file2patch
754
768
then
755
769
echo -e " ${PASS} Already patched ${file2patch} ${RST} "
756
770
else
757
771
echo -e " ${INFO} Patching ${file2patch} ${RST} "
758
- sed -i ' 22 i#define NO_DSHOW_STRSAFE' $file2patch
772
+ # sed -i '22 i#define NO_DSHOW_STRSAFE' $file2patch
759
773
fi
760
774
local file2patch=" libavdevice/dshow_pin.c"
761
775
if grep -Fxq " #define NO_DSHOW_STRSAFE" $file2patch
762
776
then
763
777
echo -e " ${PASS} Already patched ${file2patch} ${RST} "
764
778
else
765
779
echo -e " ${INFO} Patching ${file2patch} ${RST} "
766
- sed -i ' 22 i#define NO_DSHOW_STRSAFE' $file2patch
780
+ # sed -i '22 i#define NO_DSHOW_STRSAFE' $file2patch
767
781
fi
768
782
769
783
if [[ " $1 " = " shared" ]]
@@ -794,7 +808,12 @@ build_ffmbc() {
794
808
fi
795
809
796
810
config_options=" --prefix=$ffinstallpath --enable-memalign-hack --arch=$arch --enable-gpl --enable-avisynth --target-os=mingw32 --cross-prefix=$cross_prefix "
797
- config_options=" $config_options --pkg-config=pkg-config --enable-runtime-cpudetect --enable-cross-compile --disable-w32threads --extra-cflags=-DPTW32_STATIC_LIB"
811
+ config_options=" $config_options --pkg-config=pkg-config --enable-runtime-cpudetect --enable-cross-compile --enable-pthreads --extra-cflags=-DPTW32_STATIC_LIB"
812
+ # ## nothing -> won't build (pthread linker error)
813
+ # ## --disable-w32threads --extra-cflags=-DPTW32_STATIC_LIB" -> only 1 CPU used
814
+ # ## --disable-pthreads -> only 1 CPU used
815
+ # ## --disable-pthreads --enable-w32threads -> The requested thread algorithm is not supported with this thread library. only one CPU used
816
+ # ## --enable-pthreads --disable-w32threads -> won't build (pthreads linker error)
798
817
if ! $ffvanilla
799
818
then
800
819
config_options=" $config_options --enable-zlib --enable-bzlib --enable-libx264 --enable-libmp3lame --enable-libvpx --extra-libs=-lws2_32 --extra-libs=-lpthread"
1083
1102
1084
1103
export PATH=" ${original_path} "
1085
1104
cd ${basedir}
1086
- echo -e " ${PASS} \n All complete. Ending ffmpeg cross compiler script.\n${PASS} Bye. ;-) ${RST} \n "
1105
+ echo -e " ${PASS} \n All complete. Ending ffmpeg cross compiler script.\n${PASS} Bye.${RST} \n "
1087
1106
1088
1107
exit 0
1089
1108
0 commit comments