forked from bobwolff68/webrtc_plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrebuild_plugin.sh
executable file
·84 lines (66 loc) · 1.75 KB
/
rebuild_plugin.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
#!/bin/sh
echo Resetting/Rebuilding project files...
# The linux build
mkdir -p src/js_api/build
rm -f src/js_api/build/CMakeCache.txt
if [ `uname` = "Linux" ]
then
third_party/FireBreath/prepmake.sh src/js_api/projects src/js_api/build
# TODO - make in release mode.
cd src/js_api/build
if [ "$1" = "clean" ]
then
make clean
fi
make WebrtcPlugin
if [ $? != 0 ]
then
echo ; echo 'make (Debug) WebrtcPlugin' failed. Exiting early.
echo
exit 1
fi
# make BUILDTYPE=Release cmdline_audio_peer
# if [ $? != 0 ]
# then
# echo ; echo 'make (Release) cmdline_audio_peer' failed. Exiting early.
# echo
# exit 1
# fi
cd ../../..
echo
echo Place symlink to src/js_api/build/bin/WebrtcPlugin/npWebrtcPlugin.so
echo output in ~/.mozilla/plugins
echo
fi
# Now for Darwin's build.
if [ `uname` = "Darwin" ]
then
echo "Rebuilding webrtc (via cmdline_audio_peer dependencies)"
third_party/FireBreath/prepmac_GoCast.sh src/js_api/projects src/js_api/build
cd src/js_api/build
if [ "$1" = "clean" ]
then
xcodebuild -project FireBreath.xcodeproj -target WebrtcPlugin -configuration Debug clean
xcodebuild -project FireBreath.xcodeproj -target WebrtcPlugin -configuration Release clean
fi
# Now do the build for Debug and release.
xcodebuild -project FireBreath.xcodeproj -target WebrtcPlugin -configuration Debug
if [ $? != 0 ]
then
echo ; echo 'xcodebuild (Debug) WebrtcPlugin' failed. Exiting early.
echo
exit 1
fi
xcodebuild -project FireBreath.xcodeproj -target WebrtcPlugin -configuration Release
if [ $? != 0 ]
then
echo ; echo 'xcodebuild (Release) WebrtcPlugin' failed. Exiting early.
echo
exit 1
fi
cd ../../..
echo
echo "Place symlink to src/js_api/build/[Debug|Release]/WebrtcPlugin.plugin"
echo output in ~/Library/Internet Plug-Ins/
echo
fi