-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdolphin-build-x64.sh
58 lines (50 loc) · 1.3 KB
/
dolphin-build-x64.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
#!/bin/bash
# the following must be executed in env targeting amd64 (e.g. `vcvarsall x64`)
PREFIX=`realpath ./x64`
SOURCE=$1
if [[ ! -f "$SOURCE/libavcodec/avcodec.c" ]]; then
echo "need path to ffmpeg sources"
exit 1
fi
pushd $SOURCE > /dev/null
# workaround for wsl issue - the *.d files wind up with windows
# drive prefix in paths (unless patch is made to ffmpeg)
git clean -fX > /dev/null
if [[ -d $PREFIX ]]; then
rm -rf $PREFIX
fi
./configure --extra-cflags='-MD -GS-' \
--enable-gpl \
--enable-version3 \
--prefix=$PREFIX \
--toolchain=msvc \
--target-os=win64 \
--arch=x86_64 \
--disable-avdevice \
--disable-programs \
--disable-avfilter \
--disable-postproc \
--disable-doc \
--disable-pthreads \
--enable-w32threads \
--disable-network \
--disable-everything \
--disable-encoders \
--disable-muxers \
--disable-hwaccels \
--disable-parsers \
--disable-protocols \
--enable-static \
--disable-shared \
--enable-muxer=avi \
--enable-encoder=ffv1 \
--enable-encoder=mpeg4 \
--enable-encoder=utvideo \
--enable-protocol=file
make install
rm -rf $PREFIX/share
rm -rf $PREFIX/lib/pkgconfig
pushd $PREFIX/lib > /dev/null
for f in lib*\.a; do
mv $f $(echo "$f" | sed -E 's/^lib(.*).a$/\1.lib/')
done