-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-windows.sh
executable file
·70 lines (53 loc) · 1.88 KB
/
build-windows.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
set -e
ARCHIVE="ffmpeg-2.6.3"
DESTROOT="${HOME}/Development/FFmpeg/destroot"
TLCHROOT="${HOME}/Development" # location of 'mingw{32,64}'
TLCHXTRA="${HOME}/Development/FFmpeg/tools/Windows"
for BITS in 32 64 ; do
rm -rf "${ARCHIVE}"
tar xf "tar/${ARCHIVE}.tar.bz2"
pushd "${ARCHIVE}" ; ( set -e
echo ""
echo "--- CONFIGURATION LOG ---"
echo ""
TOOLCHAIN="${TLCHROOT}/mingw${BITS}"
case "${BITS}" in
32 )
TCHPREFIX="i686-w64-mingw32"
;;
64 )
TCHPREFIX="x86_64-w64-mingw32"
;;
* )
echo "error: unknown '${BITS}' bits"
exit 1
;;
esac
export PATH="${TLCHXTRA}:${TLCHROOT}/mingw${BITS}/bin:${PATH}"
./configure \
--disable-gpl --disable-version3 --disable-nonfree \
--enable-static --disable-shared --enable-pic \
--disable-small --enable-runtime-cpudetect \
--disable-debug --enable-stripping \
--disable-all --disable-pthreads --disable-w32threads \
--enable-avutil --enable-avcodec \
--enable-fft --enable-rdft --enable-hardcoded-tables \
--enable-asm --enable-inline-asm \
--enable-cross-compile \
"--prefix=${DESTROOT}/windows${BITS}" --arch=x86_${BITS} \
"--cross-prefix=${TCHPREFIX}-" --target-os=win${BITS} \
"--sysroot=${TOOLCHAIN}"
echo ""
echo "--- BUILD LOG ---"
echo ""
make V=1
make V=1 install
for LIB in ${DESTROOT}/windows${BITS}/lib/*.a ; do
echo ANONYMIZE "${LIB}"
LANG=C LC_CTYPE=C sed -i -e 's@/andrew/@/------/@g' "${LIB}"
done
rm -rfv "${DESTROOT}/windows${BITS}/lib/pkgconfig"
) ; popd
rm -rf "${ARCHIVE}"
done