-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
82 lines (67 loc) · 1.85 KB
/
build.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
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/env bash
set -e
THIS_SCRIPT_DIR=$( cd "$( dirname "$0" )" && pwd )
export PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 14.0/VC/bin/amd64/:$PATH
/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 14.0/VC/bin/amd64/vcvars64.bat
echo ""
echo "Removing old output..."
rm -rf include/
rm -rf lib/
rm -rf libav-source/
rm -rf temp/
echo ""
echo "Cloning libav from master..."
mkdir -p libav-source
cd libav-source
git init
git config core.autocrlf false
git remote add origin git://git.libav.org/libav.git
git pull origin master
echo ""
echo "Patching with xma fix..."
patch -p1 < $THIS_SCRIPT_DIR/xma-patch.diff
echo ""
echo "Running ./configure (debug)..."
./configure \
--toolchain=msvc \
--arch=x86_64 \
--extra-cflags="-MDd" \
--extra-ldflags="user32.lib" \
--disable-everything \
--disable-programs \
--disable-all \
--enable-avcodec \
--enable-avutil \
--enable-decoder=wmapro \
--prefix=$THIS_SCRIPT_DIR/temp/
echo ""
echo "Running make install (debug)..."
make install-headers install-libs
mkdir -p $THIS_SCRIPT_DIR/lib/Debug/
mv $THIS_SCRIPT_DIR/temp/lib/* $THIS_SCRIPT_DIR/lib/Debug/
echo ""
echo "Running ./configure (release)..."
./configure \
--toolchain=msvc \
--arch=x86_64 \
--extra-cflags="-MD" \
--extra-ldflags="user32.lib" \
--disable-everything \
--disable-programs \
--disable-all \
--enable-avcodec \
--enable-avutil \
--enable-decoder=wmapro \
--prefix=$THIS_SCRIPT_DIR/temp/
echo ""
echo "Running make install (release)..."
make install-headers install-libs
mkdir -p $THIS_SCRIPT_DIR/lib/Release/
mv $THIS_SCRIPT_DIR/temp/lib/* $THIS_SCRIPT_DIR/lib/Release/
mkdir -p $THIS_SCRIPT_DIR/
mv $THIS_SCRIPT_DIR/temp/include/ $THIS_SCRIPT_DIR/include/
rm -rf $THIS_SCRIPT_DIR/temp
cd ..
echo ""
echo "Cleaning up build temp"
#rm -rf libav-source