您的位置:首页 > 产品设计 > UI/UE

openwebrtc build framework (Building OpenWebRTC with Cerbero)

2015-11-13 11:29 513 查看
有时第三方库更改, 或者 添加一些新的支持时, 需要运行如下:

cd /mnt/cerbero \
&& ./cerbero-uninstalled -c config/osx-x86-64.cbc wipe --build-tools \
&& ./cerbero-uninstalled -c config/cross-ios-universal.cbc wipe --build-tools


然后再执行下面的一些步骤!!!

详细参加: https://github.com/EricssonResearch/openwebrtc/issues/523 https://github.com/EricssonResearch/openwebrtc/issues/509
git pull --rebase

build one package:

cd /mnt/cerbero \
&& ./cerbero-uninstalled -c config/osx-x86-64.cbc buildone openwebrtc \
&& ./cerbero-uninstalled -c config/osx-x86-64.cbc package -f openwebrtc\
&&./cerbero-uninstalled -c config/cross-ios-universal.cbc buildone openwebrtc \
&& ./cerbero-uninstalled -c config/cross-ios-universal.cbc package -f openwebrtc



cerbero

A build system written for GStreamer. We have made a few changes to existing recipes and added some more that we need for OpenWebRTC.


Clone cerbero code and recipes

Make sure you checkout the repo in your home directory to avoid issues down the road. (I have done it on /mnt)
cd  /mnt/
git clone https://github.com/EricssonResearch/cerbero.git[/code] 


Platform specific bits


Mac
OS X host

sudo mkdir -p /Library/Frameworks/OpenWebRTC.framework
sudo chown -R $UID /Library/Frameworks/OpenWebRTC.framework/


In
~/cerbero
: (for me, in /mnt )
mkdir -p dist
mkdir -p /Library/Frameworks/OpenWebRTC.framework/Versions/0.3
ln -sf /Library/Frameworks/OpenWebRTC.framework/Versions/0.3 dist/darwin_x86_64


Linux
host

sudo mkdir -p /opt/openwebrtc-0.3
sudo chown -R $UID /opt/openwebrtc-0.3



Bootstrap

Bootstrapping is required for building anything with a particular config (-c argument). For example, to build using the default config: (for me, in /mnt/cerbero)
cd cerbero


Linux
host bootstrap

./cerbero-uninstalled -c config/linux.cbc bootstrap


Mac
OS X host bootstrap

./cerbero-uninstalled -c config/osx-x86-64.cbc bootstrap


iOS
cross-compile bootstrap

./cerbero-uninstalled -c config/cross-ios-universal.cbc bootstrap


Android
cross-compile bootstrap

./cerbero-uninstalled -c config/cross-android-armv7.cbc bootstrap


And so on. Note that as the name suggests, bootstrap only needs to be run once to prepare the build environment.


Build

cd cerbero


Linux
host build

./cerbero-uninstalled -c config/linux.cbc package -f openwebrtc


Mac
OS X host build

./cerbero-uninstalled -c config/osx-x86-64.cbc package -f openwebrtc


iOS
cross-compile build

./cerbero-uninstalled -c config/cross-ios-universal.cbc package -f openwebrtc


Android
cross-compile build

./cerbero-uninstalled -c config/cross-android-armv7.cbc package -f openwebrtc


And so on. Note that as the name suggests, bootstrap only needs to be run once to prepare the build environment.

refetch and clean cache:


Mac OS X host target

./cerbero-uninstalled -c config/osx-x86-64.cbc fetch-package --full-reset --reset-rdeps openwebrtc


iOS
Universal cross-compile (armv7, armv7s, arm64, x86) target

./cerbero-uninstalled -c config/cross-ios-universal.cbc fetch-package --full-reset --reset-rdeps openwebrtc

Android cross-compile target


NOTE: You MUST build for your host first before cross-compiling for Android. This is because some of the build results are re-used for cross-compiling.
./cerbero-uninstalled -c config/cross-android-armv7.cbc fetch-package --full-reset --reset-rdeps openwebrtc


Linux
target

./cerbero-uninstalled -c config/linux.cbc fetch-package --full-reset --reset-rdeps openwebrtc



Update cerbero and the recipes

cd ~/cerbero
git checkout master
git pull --rebase


清理资源:

cd /mnt/cerbero \
&& ./cerbero-uninstalled -c config/osx-x86-64.cbc wipe --build-tools \
&& ./cerbero-uninstalled -c config/cross-ios-universal.cbc wipe --build-tools


leodeMac-mini:cerbero_1109 leo$ ./cerbero-uninstalled -c config/osx-x86-64.cbc wipe --build-tools \

> && ./cerbero-uninstalled -c config/cross-ios-universal.cbc wipe --build-tools

WARNING: Using default configuration because /Users/leo/.cerbero/cerbero.cbc is missing

WARNING!!!

This command will delete cerbero's build cache, the sources directory, and the builds directory to reset the build system to its initial state.

The following paths will be removed:

/Users/leo/cerbero/darwin_x86_64.cache

/Library/Frameworks/OpenWebRTC.framework/Versions/0.3

/Users/leo/cerbero/logs/darwin_x86_64

/Users/leo/cerbero/sources/darwin_x86_64

/Users/leo/cerbero/build-tools.cache

/Users/leo/cerbero/build-tools

/Users/leo/cerbero/sources/build-tools

Do you want to continue? [yes/no] yes

Are you sure? [yes/no] yes

-----> Removing path: /Users/leo/cerbero/darwin_x86_64.cache

-----> Removing path: /Library/Frameworks/OpenWebRTC.framework/Versions/0.3

Running command 'rm -rf /Library/Frameworks/OpenWebRTC.framework/Versions/0.3'

-----> Removing path: /Users/leo/cerbero/logs/darwin_x86_64

Running command 'rm -rf /Users/leo/cerbero/logs/darwin_x86_64'

-----> Removing path: /Users/leo/cerbero/sources/darwin_x86_64

Running command 'rm -rf /Users/leo/cerbero/sources/darwin_x86_64'

-----> Removing path: /Users/leo/cerbero/build-tools.cache

-----> Removing path: /Users/leo/cerbero/build-tools

Running command 'rm -rf /Users/leo/cerbero/build-tools'

-----> Removing path: /Users/leo/cerbero/sources/build-tools

Running command 'rm -rf /Users/leo/cerbero/sources/build-tools'

WARNING: Using default configuration because /Users/leo/.cerbero/cerbero.cbc is missing

WARNING!!!

This command will delete cerbero's build cache, the sources directory, and the builds directory to reset the build system to its initial state.

The following paths will be removed:

/Users/leo/cerbero/ios_universal.cache

/Users/leo/cerbero/dist/ios_universal

/Users/leo/cerbero/logs/ios_universal

/Users/leo/cerbero/sources/ios_universal

/Users/leo/cerbero/build-tools.cache

/Users/leo/cerbero/build-tools

/Users/leo/cerbero/sources/build-tools

Do you want to continue? [yes/no] yes

Are you sure? [yes/no] yes

-----> Removing path: /Users/leo/cerbero/ios_universal.cache

-----> Removing path: /Users/leo/cerbero/dist/ios_universal

Running command 'rm -rf /Users/leo/cerbero/dist/ios_universal'

-----> Removing path: /Users/leo/cerbero/logs/ios_universal

-----> Removing path: /Users/leo/cerbero/sources/ios_universal

Running command 'rm -rf /Users/leo/cerbero/sources/ios_universal'

-----> Removing path: /Users/leo/cerbero/build-tools.cache

-----> Removing path: /Users/leo/cerbero/build-tools

Running command 'rm -rf /Users/leo/cerbero/build-tools'

-----> Removing path: /Users/leo/cerbero/sources/build-tools

tools: bootstrap

leo$ ./cerbero-uninstalled -c config/osx-x86-64.cbc bootstrap
WARNING: Using default configuration because /Users/leo/.cerbero/cerbero.cbc is missing

WARNING: No bootstrapper for the distro version osx_yosemite

File /var/folders/rx/ypcyq6bx1qd_xmmdwsf4df700000gn/T/tmpBt45j8 already downloaded.

Running command 'chmod +x /var/folders/rx/ypcyq6bx1qd_xmmdwsf4df700000gn/T/tmpBt45j8'

Running command 'sudo /var/folders/rx/ypcyq6bx1qd_xmmdwsf4df700000gn/T/tmpBt45j8 XML::Parser'

Password:

WARNING: Using default configuration because /Users/leo/.cerbero/cerbero.cbc is missing

Building the following recipes: gettext xz m4 autoconf sed gettext-tools gettext-m4 automake tar libtool pkg-config orc-tool libffi zlib glib gobject-introspection gnome-common gtk-doc-lite gperf intltool yasm bison flex

[(1/23) gettext -> already built ]

[(2/23) xz -> already built ]

[(3/23) m4 -> already built ]

[(4/23) autoconf -> already built ]

[(5/23) sed -> already built ]

[(6/23) gettext-tools -> already built ]

[(7/23) gettext-m4 -> already built ]

[(8/23) automake -> already built ]

[(9/23) tar -> already built ]

[(10/23) libtool -> already built ]

[(11/23) pkg-config -> already built ]

[(12/23) orc-tool -> already built ]

[(13/23) libffi -> already built ]

[(14/23) zlib -> already built ]

[(15/23) glib -> already built ]

[(16/23) gobject-introspection -> already built ]

[(17/23) gnome-common -> already built ]

[(18/23) gtk-doc-lite -> already built ]

[(19/23) gperf -> already built ]

[(20/23) intltool -> already built ]

[(21/23) yasm -> already built ]

[(22/23) bison -> already built ]

[(23/23) flex -> already built ]

leo$ ./cerbero-uninstalled -c config/cross-ios-universal.cbc bootstrap
WARNING: Using default configuration because /Users/leo/.cerbero/cerbero.cbc is missing

WARNING: No bootstrapper for the distro version ios_8_4

WARNING: No bootstrapper for the distro version osx_yosemite

File /var/folders/rx/ypcyq6bx1qd_xmmdwsf4df700000gn/T/tmp42SUR2 already downloaded.

Running command 'chmod +x /var/folders/rx/ypcyq6bx1qd_xmmdwsf4df700000gn/T/tmp42SUR2'

Running command 'sudo /var/folders/rx/ypcyq6bx1qd_xmmdwsf4df700000gn/T/tmp42SUR2 XML::Parser'

WARNING: Using default configuration because /Users/leo/.cerbero/cerbero.cbc is missing

Building the following recipes: gettext xz m4 autoconf sed gettext-tools gettext-m4 automake tar libtool pkg-config orc-tool libffi zlib glib gobject-introspection gnome-common gtk-doc-lite gperf gas-preprocessor glib-tools intltool yasm bison flex

[(1/25) gettext -> already built ]

[(2/25) xz -> already built ]

[(3/25) m4 -> already built ]

[(4/25) autoconf -> already built ]

[(5/25) sed -> already built ]

[(6/25) gettext-tools -> already built ]

[(7/25) gettext-m4 -> already built ]

[(8/25) automake -> already built ]

[(9/25) tar -> already built ]

[(10/25) libtool -> already built ]

[(11/25) pkg-config -> already built ]

[(12/25) orc-tool -> already built ]

[(13/25) libffi -> already built ]

[(14/25) zlib -> already built ]

[(15/25) glib -> already built ]

[(16/25) gobject-introspection -> already built ]

[(17/25) gnome-common -> already built ]

[(18/25) gtk-doc-lite -> already built ]

[(19/25) gperf -> already built ]

[(20/25) gas-preprocessor -> already built ]

[(21/25) glib-tools -> already built ]

[(22/25) intltool -> already built ]

[(23/25) yasm -> already built ]

[(24/25) bison -> already built ]

[(25/25) flex -> already built ]

build framework:

leo$ ./cerbero-uninstalled -c config/osx-x86-64.cbc package -f openwebrtc
WARNING: Using default configuration because /Users/leo/.cerbero/cerbero.cbc is missing

Building the following recipes: gettext libffi zlib glib orc bzip2 openssl gobject-introspection bionic-fixup gtk-doc-lite gstreamer-1.0 gst-plugins-base-1.0 libvpx gst-plugins-good-1.0 openh264 opus libsrtp gst-plugins-bad-1.0 libnice gstreamer-1.0-static
gst-plugins-base-1.0-static gst-plugins-good-1.0-static gst-plugins-bad-1.0-static libnice-static libusrsctp openwebrtc-gst-plugins intltool gnome-js-common seed json-glib libxml2 libsoup libxslt docbook-xsl docbook-xml gtk-osx-docbook itstool gtk-doc openwebrtc
pygobject gst-python-1.0 openwebrtc-osx-framework openwebrtc-gst-plugins-static

[(1/43) gettext -> already built ]

[(2/43) libffi -> already built ]

[(3/43) zlib -> already built ]

[(4/43) glib -> already built ]

[(5/43) orc -> already built ]

[(6/43) bzip2 -> already built ]

[(7/43) openssl -> already built ]

[(8/43) gobject-introspection -> already built ]

[(9/43) bionic-fixup -> already built ]

[(10/43) gtk-doc-lite -> already built ]

[(11/43) gstreamer-1.0 -> already built ]

[(12/43) gst-plugins-base-1.0 -> already built ]

[(13/43) libvpx -> already built ]

[(14/43) gst-plugins-good-1.0 -> already built ]

[(15/43) openh264 -> already built ]

[(16/43) opus -> already built ]

[(17/43) libsrtp -> already built ]

[(18/43) gst-plugins-bad-1.0 -> already built ]

[(19/43) libnice -> already built ]

[(20/43) gstreamer-1.0-static -> already built ]

[(21/43) gst-plugins-base-1.0-static -> already built ]

[(22/43) gst-plugins-good-1.0-static -> already built ]

[(23/43) gst-plugins-bad-1.0-static -> already built ]

[(24/43) libnice-static -> already built ]

[(25/43) libusrsctp -> already built ]

[(26/43) openwebrtc-gst-plugins -> already built ]

[(27/43) intltool -> already built ]

[(28/43) gnome-js-common -> already built ]

[(29/43) seed -> already built ]

[(30/43) json-glib -> already built ]

[(31/43) libxml2 -> already built ]

[(32/43) libsoup -> already built ]

[(33/43) libxslt -> already built ]

[(34/43) docbook-xsl -> already built ]

[(35/43) docbook-xml -> already built ]

[(36/43) gtk-osx-docbook -> already built ]

[(37/43) itstool -> already built ]

[(38/43) gtk-doc -> already built ]

[(39/43) openwebrtc -> already built ]

[(40/43) pygobject -> already built ]

[(41/43) gst-python-1.0 -> already built ]

[(42/43) openwebrtc-osx-framework -> already built ]

[(43/43) openwebrtc-gst-plugins-static -> already built ]

WARNING: No specific packager available for the distro version osx_yosemite, using generic packager for distro osx

-----> Creating package for openwebrtc

-----> Creating framework package

leo$ ./cerbero-uninstalled -c config/cross-ios-universal.cbc package -f openwebrtc
WARNING: Using default configuration because /Users/leo/.cerbero/cerbero.cbc is missing

Building the following recipes: gettext libffi zlib glib orc bzip2 openssl bionic-fixup gtk-doc-lite gstreamer-1.0 gst-plugins-base-1.0 libvpx gst-plugins-good-1.0 openh264 opus libsrtp gst-plugins-bad-1.0 libnice gstreamer-1.0-static gst-plugins-base-1.0-static
gst-plugins-good-1.0-static gst-plugins-bad-1.0-static libnice-static libusrsctp openwebrtc-gst-plugins intltool gnome-js-common openwebrtc-girepository seed openwebrtc-gst-plugins-static openwebrtc

[(1/31) gettext -> already built ]

[(2/31) libffi -> already built ]

[(3/31) zlib -> already built ]

[(4/31) glib -> already built ]

[(5/31) orc -> already built ]

[(6/31) bzip2 -> fetch ]

-----> Step done

[(6/31) bzip2 -> extract ]

-----> Step done

[(6/31) bzip2 -> compile ]

[(7/31) openssl -> already built ]

[(8/31) bionic-fixup -> already built ]

[(9/31) gtk-doc-lite -> already built ]

[(10/31) gstreamer-1.0 -> already built ]

[(11/31) gst-plugins-base-1.0 -> already built ]

[(12/31) libvpx -> already built ]

[(13/31) gst-plugins-good-1.0 -> already built ]

[(14/31) openh264 -> already built ]

[(15/31) opus -> already built ]

[(16/31) libsrtp -> already built ]

[(17/31) gst-plugins-bad-1.0 -> already built ]

[(18/31) libnice -> already built ]

[(19/31) gstreamer-1.0-static -> already built ]

[(20/31) gst-plugins-base-1.0-static -> already built ]

[(21/31) gst-plugins-good-1.0-static -> already built ]

[(22/31) gst-plugins-bad-1.0-static -> already built ]

[(23/31) libnice-static -> already built ]

[(24/31) libusrsctp -> already built ]

[(25/31) openwebrtc-gst-plugins -> already built ]

[(26/31) intltool -> already built ]

[(27/31) gnome-js-common -> already built ]

[(28/31) openwebrtc-girepository -> already built ]

[(29/31) seed -> already built ]

[(30/31) openwebrtc-gst-plugins-static -> already built ]

[(31/31) openwebrtc -> already built ]

build one package:

./cerbero-uninstalled -c config/osx-x86-64.cbc buildone openwebrtc

WARNING: Using default configuration because /Users/leo/.cerbero/cerbero.cbc is missing

Building the following recipes: openwebrtc

[(1/1) openwebrtc -> fetch ]

[(1/1) openwebrtc -> extract ]

[(1/1) openwebrtc -> configure ]

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.guess to /Users/leo/cerbero/sources/darwin_x86_64/openwebrtc-0.3.0/config.guess

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.sub to /Users/leo/cerbero/sources/darwin_x86_64/openwebrtc-0.3.0/config.sub

[(1/1) openwebrtc -> compile ]

[(1/1) openwebrtc -> install ]

[(1/1) openwebrtc -> post_install ]

repacakge framework again.

./cerbero-uninstalled -c config/osx-x86-64.cbc package -f openwebrtc


build one package:

./cerbero-uninstalled -c config/cross-ios-universal.cbc buildone openwebrtc


Building the following recipes: openwebrtc

[(1/1) openwebrtc -> fetch ]

[(1/1) openwebrtc -> extract ]

[(1/1) openwebrtc -> configure ]

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.guess to /Users/leo/cerbero/sources/ios_universal/x86_64/openwebrtc-0.3.0/config.guess

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.sub to /Users/leo/cerbero/sources/ios_universal/x86_64/openwebrtc-0.3.0/config.sub

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.guess to /Users/leo/cerbero/sources/ios_universal/armv7s/openwebrtc-0.3.0/config.guess

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.sub to /Users/leo/cerbero/sources/ios_universal/armv7s/openwebrtc-0.3.0/config.sub

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.guess to /Users/leo/cerbero/sources/ios_universal/x86/openwebrtc-0.3.0/config.guess

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.sub to /Users/leo/cerbero/sources/ios_universal/x86/openwebrtc-0.3.0/config.sub

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.guess to /Users/leo/cerbero/sources/ios_universal/armv7/openwebrtc-0.3.0/config.guess

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.sub to /Users/leo/cerbero/sources/ios_universal/armv7/openwebrtc-0.3.0/config.sub

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.guess to /Users/leo/cerbero/sources/ios_universal/arm64/openwebrtc-0.3.0/config.guess

-----> copying /mnt/cerbero__git_20151014/cerbero_1109/data/autotools/config.sub to /Users/leo/cerbero/sources/ios_universal/arm64/openwebrtc-0.3.0/config.sub

[(1/1) openwebrtc -> compile ]

./cerbero-uninstalled -c config/cross-ios-universal.cbc package -f openwebrtc
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: