-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildversiondebug64.sh
executable file
·304 lines (260 loc) · 9.02 KB
/
buildversiondebug64.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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
#!/bin/bash
source common.sh
#here we can set what versions we want to clone
#sh ./$1
#sh ./buildclone-estos6.3.sh
echo "3.1 kms-cmake-utils"
mkdir kms-cmake-utils-build
cd kms-cmake-utils-build/
mingw64-cmake -DCMAKE_BUILD_TYPE=Debug ../kms-cmake-utils/
mingw64-make
pause
sudo mingw64-make install
cd ..
# getcmakemodules needs 'cd kms-cmake-utils'
getcmakemodules
pwd
pause
echo "3.20 glib"
cd glib/
./autogen.sh
mingw64-configure \
--disable-directsound --disable-direct3d --enable-debug \
--disable-examples --disable-gtk-doc --disable-winscreencap \
--disable-winks --disable-wasapi --disable-opencv
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.2 kurento-module-creator"
cd kurento-module-creator/
make
pause
sudo make install
cd ..
echo "3.3 gstreamer-1.7.x/1.8.1 (Fork of github/kurento/gstreamer 06.06.2017"
cd gstreamer/
./autogen.sh ## Ignore configuration errors
mingw64-configure --disable-tools --disable-tests --disable-benchmarks --disable-examples --enable-debug --libexec=/usr/x86_64-w64-mingw32/sys-root/mingw/libexec
make
pause
sudo make install
cd ..
echo "3.4 gst-plugins-base-1.5"
cd gst-plugins-base/
./autogen.sh ## Ignore configuration errors
mingw64-configure --enable-debug
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.5 jsoncpp"
mkdir jsoncpp-build
cd jsoncpp-build/
mingw64-cmake -DCMAKE_BUILD_TYPE=Debug ../jsoncpp
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.6 kms-jsonrpc"
mkdir kms-jsonrpc-build
cd kms-jsonrpc-build/
mingw64-cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MODULE_PATH=$cmakemodules ../kms-jsonrpc
pause
sudo mingw64-make install
cd ..
echo "3.7 libvpx"
cd libvpx/
eval `rpm --eval %{mingw64_env}`
export AS=yasm
./configure --target=x86_64-win64-gcc --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw/ --enable-debug --enable-debug-libs
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.8 kms-core"
# if this is executed using root, cmake will not find the kurentocreator
if [[ $EUID == 0 ]]; then
echo "Build this step as root will lead to troubles later! (e.g. kurentocreator will not be found) Stop here now."
exit
fi
mkdir kms-core-build
cd kms-core-build/
mingw64-cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MODULE_PATH=$cmakemodules -DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw -DKURENTO_MODULES_DIR=/usr/x86_64-w64-mingw32/sys-root/mingw/share/kurento/modules/ ../kms-core
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.9 libevent"
cd libevent/
./autogen.sh ## However, you should not build using configured Makefile
mingw64-configure --enable-debug
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.10 kurento-media-server"
mkdir kurento-media-server-build
cd kurento-media-server-build/
#problem mit mingw -> too many sections (40348)... Fatal error: can't write 97 bytes to section .text of CMakeFiles/websocketTransport.dir/WebSocketTransport.cpp.obj because: 'File too big'
#nur bei 64 bit -> 32 bit ok
#mingw64-cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MODULE_PATH=$cmakemodules ../kurento-media-server
mingw64-cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MODULE_PATH=$cmakemodules ../kurento-media-server
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.11 usersctp"
cd usrsctp/
./bootstrap
mingw64-configure --enable-debug
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.12 openwebrtc-gst-plugins"
cd openwebrtc-gst-plugins/
./autogen.sh ## Ignore configuration errors
mingw64-configure --enable-debug
mingw64-make
pause
sudo mingw64-make install
sudo rm /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgstsctp-1.5.dll
sudo ln -s /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libgstsctp-1.5.dll /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgstsctp-1.5.dll
cd ..
echo "3.13 libnice"
cd libnice/
./autogen.sh ## Ignore configuration errors
mingw64-configure --enable-debug
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.14 kms-elements"
mkdir kms-elements-build
cd kms-elements-build/
mingw64-cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MODULE_PATH=$cmakemodules -DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw -DKURENTO_MODULES_DIR=/usr/x86_64-w64-mingw32/sys-root/mingw/share/kurento/modules/ ../kms-elements
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.15 opencv"
cd opencv
mkdir ../opencv-build
cd ../opencv-build
mingw64-cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_PERF_TESTS=false \
-DBUILD_TESTS=false \
-DWITH_DSHOW=false \
-DWITH_WIN32UI=false \
-DWITH_OPENCL=false \
-DWITH_VFW=false \
-DBUILD_ZLIB=false \
-DBUILD_TIFF=false \
-DBUILD_JASPER=false \
-DBUILD_JPEG=false \
-DBUILD_PNG=false \
-DBUILD_OPENEXR=false \
-DWITH_FFMPEG=false \
-DBUILD_opencv_flann=OFF \
-DBUILD_opencv_photo=OFF \
-DBUILD_opencv_video=OFF \
-DBUILD_opencv_ml=OFF \
../opencv
sed -i 's/-isystem\ \/usr\/x86_64-w64-mingw32\/sys-root\/mingw\/include/ /g' \
modules/core/CMakeFiles/opencv_core.dir/includes_CXX.rsp
sed -i 's/-isystem\ \/usr\/x86_64-w64-mingw32\/sys-root\/mingw\/include\ / /g' ./modules/highgui/CMakeFiles/opencv_highgui.dir/includes_CXX.rsp
mingw64-make
sudo mingw64-make install
sudo cp unix-install/opencv.pc /usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig/
sudo rm /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libopencv_core.a
sudo ln -s /usr/x86_64-w64-mingw32/sys-root/mingw/x64/mingw/lib/libopencv_core2413d.dll.a \
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/libopencv_core.a
sudo rm /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libopencv_highgui.a
sudo ln -s /usr/x86_64-w64-mingw32/sys-root/mingw/x64/mingw/lib/libopencv_highgui2413d.dll.a \
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/libopencv_highgui.a
sudo rm /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libopencv_imgproc.a
sudo ln -s /usr/x86_64-w64-mingw32/sys-root/mingw/x64/mingw/lib/libopencv_imgproc2413d.dll.a \
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/libopencv_imgproc.a
sudo rm /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libopencv_objdetect.a
sudo ln -s /usr/x86_64-w64-mingw32/sys-root/mingw/x64/mingw/lib/libopencv_objdetect2413d.dll.a \
/usr/x86_64-w64-mingw32/sys-root/mingw/lib/libopencv_objdetect.a
sudo rm /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libopencv_core2413.dll
sudo rm /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libopencv_highgui2413.dll
sudo rm /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libopencv_imgproc2413.dll
sudo rm /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libopencv_objdetect2413.dll
sudo ln -s /usr/x86_64-w64-mingw32/sys-root/mingw/x64/mingw/bin/libopencv_core2413d.dll /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libopencv_core2413.dll
sudo ln -s /usr/x86_64-w64-mingw32/sys-root/mingw/x64/mingw/bin/libopencv_highgui2413d.dll /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libopencv_highgui2413.dll
sudo ln -s /usr/x86_64-w64-mingw32/sys-root/mingw/x64/mingw/bin/libopencv_imgproc2413d.dll /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libopencv_imgproc2413.dll
sudo ln -s /usr/x86_64-w64-mingw32/sys-root/mingw/x64/mingw/bin/libopencv_objdetect2413d.dll /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libopencv_objdetect2413.dll
cd ..
echo "3.16 kms-filters"
mkdir kms-filters-build
cd kms-filters-build/
mingw64-cmake -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_MODULE_PATH=$cmakemodules \
-DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/sys-root/mingw \
-DKURENTO_MODULES_DIR=/usr/x86_64-w64-mingw32/sys-root/mingw/share/kurento/modules/ \
-DCMAKE_C_FLAGS="-Wno-error=deprecated-declarations" \
../kms-filters
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.17 gst-plugins-good"
cd gst-plugins-good/
./autogen.sh
mingw64-configure \
--disable-wavpack --disable-valgrind --disable-directsound \
--disable-libcaca --disable-waveform \
--libexec=/usr/x86_64-w64-mingw32/sys-root/mingw/libexec \
--enable-debug --disable-gtk-doc --disable-examples
printf "all:\ninstall:\nclean:\nuninstall:\n" > tests/Makefile
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.18 libsrtp"
cd libsrtp/
mingw64-configure --enable-debug-logging
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.19 gst-plugins-bad"
cd gst-plugins-bad/
./autogen.sh
mingw64-configure \
--disable-directsound --disable-direct3d --enable-debug \
--disable-examples --disable-gtk-doc --disable-winscreencap \
--disable-winks --disable-wasapi --disable-opencv
sed -i 's/\buint\b/unsigned/g' ext/opencv/gstmotioncells.cpp ## We may need this later
printf "all:\ninstall:\nclean:\nuninstall:\n" > tests/Makefile
mingw64-make
pause
sudo mingw64-make install
cd ..
echo "3.21 gst-libav"
cd gst-libav/
./autogen.sh
mingw64-configure \
--disable-directsound --disable-direct3d --enable-debug \
--disable-examples --disable-gtk-doc --disable-winscreencap \
--disable-winks --disable-wasapi --disable-opencv
printf "all:\ninstall:\nclean:\nuninstall:\n" > tests/Makefile
mingw64-make
pause
#sudo mingw64-make install
cd ..
#echo "3.22 openssl" dont call it here in this script because the environment dont fits
#cd openssl/
#./Configure shared --cross-compile-prefix=x86_64-w64-mingw32- --debug mingw64
#mingw64-make depend
#mingw64-make
#cp libeay32.dll libcrypto-10.dll
#cp ssleay32.dll libssl-10.dll
#pause
##sudo mingw64-make install
#cd ..
echo "BUILD DONE."