forked from microsoft/FFmpegInterop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FFmpegConfig.sh
197 lines (182 loc) · 6.04 KB
/
FFmpegConfig.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
#!/bin/bash
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
if [ "$1" == "Win10" ]; then
echo "Make Win10"
if [ "$2" == "x86" ]; then
echo "Make Win10 x86"
pushd $DIR/ffmpeg
rm -rf Output/Windows10/x86
mkdir -p Output/Windows10/x86
cd Output/Windows10/x86
../../../configure \
--toolchain=msvc \
--disable-programs \
--disable-d3d11va \
--disable-dxva2 \
--arch=x86 \
--enable-shared \
--enable-cross-compile \
--target-os=win32 \
--extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00" \
--extra-ldflags="-APPCONTAINER WindowsApp.lib" \
--prefix=../../../Build/Windows10/x86
make install
popd
elif [ "$2" == "x64" ]; then
echo "Make Win10 x64"
pushd $DIR/ffmpeg
rm -rf Output/Windows10/x64
mkdir -p Output/Windows10/x64
cd Output/Windows10/x64
../../../configure \
--toolchain=msvc \
--disable-programs \
--disable-d3d11va \
--disable-dxva2 \
--arch=x86_64 \
--enable-shared \
--enable-cross-compile \
--target-os=win32 \
--extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00" \
--extra-ldflags="-APPCONTAINER WindowsApp.lib" \
--prefix=../../../Build/Windows10/x64
make install
popd
elif [ "$2" == "ARM" ]; then
echo "Make Win10 ARM"
pushd $DIR/ffmpeg
rm -rf Output/Windows10/ARM
mkdir -p Output/Windows10/ARM
cd Output/Windows10/ARM
../../../configure \
--toolchain=msvc \
--disable-programs \
--disable-d3d11va \
--disable-dxva2 \
--arch=arm \
--as=armasm \
--cpu=armv7 \
--enable-thumb \
--enable-shared \
--enable-cross-compile \
--target-os=win32 \
--extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00 -D__ARM_PCS_VFP" \
--extra-ldflags="-APPCONTAINER WindowsApp.lib" \
--prefix=../../../Build/Windows10/ARM
make install
popd
fi
elif [ "$1" == "Win8.1" ]; then
echo "Make Win8.1"
if [ "$2" == "x86" ]; then
echo "Make Win8.1 x86"
pushd $DIR/ffmpeg
rm -rf Output/Windows8.1/x86
mkdir -p Output/Windows8.1/x86
cd Output/Windows8.1/x86
../../../configure \
--toolchain=msvc \
--disable-programs \
--disable-d3d11va \
--disable-dxva2 \
--arch=x86 \
--enable-shared \
--enable-cross-compile \
--target-os=win32 \
--extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603" \
--extra-ldflags="-APPCONTAINER" \
--prefix=../../../Build/Windows8.1/x86
make install
popd
elif [ "$2" == "x64" ]; then
echo "Make Win8.1 x64"
pushd $DIR/ffmpeg
rm -rf Output/Windows8.1/x64
mkdir -p Output/Windows8.1/x64
cd Output/Windows8.1/x64
../../../configure \
--toolchain=msvc \
--disable-programs \
--disable-d3d11va \
--disable-dxva2 \
--arch=x86_64 \
--enable-shared \
--enable-cross-compile \
--target-os=win32 \
--extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603" \
--extra-ldflags="-APPCONTAINER" \
--prefix=../../../Build/Windows8.1/x64
make install
popd
elif [ "$2" == "ARM" ]; then
echo "Make Win8.1 ARM"
pushd $DIR/ffmpeg
rm -rf Output/Windows8.1/ARM
mkdir -p Output/Windows8.1/ARM
cd Output/Windows8.1/ARM
../../../configure \
--toolchain=msvc \
--disable-programs \
--disable-d3d11va \
--disable-dxva2 \
--arch=arm \
--as=armasm \
--cpu=armv7 \
--enable-thumb \
--enable-shared \
--enable-cross-compile \
--target-os=win32 \
--extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603 -D__ARM_PCS_VFP" \
--extra-ldflags="-APPCONTAINER -MACHINE:ARM" \
--prefix=../../../Build/Windows8.1/ARM
make install
popd
fi
elif [ "$1" == "Phone8.1" ]; then
echo "Make Phone8.1"
if [ "$2" == "ARM" ]; then
echo "Make Phone8.1 ARM"
pushd $DIR/ffmpeg
rm -rf Output/WindowsPhone8.1/ARM
mkdir -p Output/WindowsPhone8.1/ARM
cd Output/WindowsPhone8.1/ARM
../../../configure \
--toolchain=msvc \
--disable-programs \
--disable-d3d11va \
--disable-dxva2 \
--arch=arm \
--as=armasm \
--cpu=armv7 \
--enable-thumb \
--enable-shared \
--enable-cross-compile \
--target-os=win32 \
--extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -D_WIN32_WINNT=0x0603 -D__ARM_PCS_VFP" \
--extra-ldflags="-APPCONTAINER -MACHINE:ARM -subsystem:console -opt:ref WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib -NODEFAULTLIB:kernel32.lib -NODEFAULTLIB:ole32.lib" \
--prefix=../../../Build/WindowsPhone8.1/ARM
make install
popd
elif [ "$2" == "x86" ]; then
echo "Make Phone8.1 x86"
pushd $DIR/ffmpeg
rm -rf Output/WindowsPhone8.1/x86
mkdir -p Output/WindowsPhone8.1/x86
cd Output/WindowsPhone8.1/x86
../../../configure \
--toolchain=msvc \
--disable-programs \
--disable-d3d11va \
--disable-dxva2 \
--arch=x86 \
--enable-shared \
--enable-cross-compile \
--target-os=win32 \
--extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -D_WIN32_WINNT=0x0603" \
--extra-ldflags="-APPCONTAINER -subsystem:console -opt:ref WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib -NODEFAULTLIB:kernel32.lib -NODEFAULTLIB:ole32.lib" \
--prefix=../../../Build/WindowsPhone8.1/x86
make install
popd
fi
fi
exit 0