webrtc build.sh

#!/bin/bash

function build_xcode() {

echo "*** building WebRTC for the ia32 iOS simulator";

export GYP_GENERATORS="xcode";

export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=ios target_arch=ia32 clang_xcode=1";

export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios_ia32";

export GYP_CROSSCOMPILE=1;

gclient runhooks;

ninja -C out_ios_ia32/Release-iphonesimulator iossim AppRTCDemo;

}

function build_iossim_ia32() {

echo "*** building WebRTC for the ia32 iOS simulator";

export GYP_GENERATORS="ninja";

export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=ios target_arch=ia32 clang_xcode=1";

export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios_ia32";

export GYP_CROSSCOMPILE=1;

pushd src;

gclient runhooks;

ninja -C out_ios_ia32/Release-iphonesimulator iossim AppRTCDemo;

echo "*** creating iOS ia32 libraries";

pushd out_ios_ia32/Release-iphonesimulator/;

rm -f  libapprtc_signaling.a;

popd;

mkdir -p out_ios_ia32/libs;

libtool -static -o out_ios_ia32/libs/libWebRTC-ia32.a out_ios_ia32/Release-iphonesimulator/lib*.a;

strip -S -x -o out_ios_ia32/libs/libWebRTC.a -r out_ios_ia32/libs/libWebRTC-ia32.a;

rm -f out_ios_ia32/libs/libWebRTC-ia32.a;

echo "*** result: $PWD/out_ios_ia32/libs/libWebRTC.a";

popd;

}

function build_iossim_x86_64() {

echo "*** building WebRTC for the x86_64 iOS simulator";

export GYP_GENERATORS="ninja";

export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=ios target_arch=x64 target_subarch=arm64 clang_xcode=1";

export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios_x86_64";

export GYP_CROSSCOMPILE=1;

pushd src;

gclient runhooks;

ninja -C out_ios_x86_64/Release-iphonesimulator iossim AppRTCDemo;

echo "*** creating iOS x86_64 libraries";

pushd out_ios_x86_64/Release-iphonesimulator/;

rm -f  libapprtc_signaling.a;

popd;

mkdir -p out_ios_x86_64/libs;

libtool -static -o out_ios_x86_64/libs/libWebRTC-x86_64.a out_ios_x86_64/Release-iphonesimulator/lib*.a;

strip -S -x -o out_ios_x86_64/libs/libWebRTC.a -r out_ios_x86_64/libs/libWebRTC-x86_64.a;

echo "*** result: $PWD/out_ios_x86_64/libs/libWebRTC.a";

popd;

}

function build_iosdevice_armv7() {

echo "*** building WebRTC for armv7 iOS devices";

export GYP_GENERATORS="ninja";

export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=ios target_arch=armv7 clang_xcode=1";

export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios_armv7";

export GYP_CROSSCOMPILE=1;

pushd src;

gclient runhooks;

ninja -C out_ios_armv7/Release-iphoneos AppRTCDemo;

echo "*** creating iOS armv7 libraries";

pushd out_ios_armv7/Release-iphoneos/;

rm -f  libapprtc_signaling.a;

popd;

mkdir -p out_ios_armv7/libs;

libtool -static -o out_ios_armv7/libs/libWebRTC-armv7.a out_ios_armv7/Release-iphoneos/lib*.a;

strip -S -x -o out_ios_armv7/libs/libWebRTC.a -r out_ios_armv7/libs/libWebRTC-armv7.a;

echo "*** result: $PWD/out_ios_armv7/libs/libWebRTC.a";

popd;

}

function build_iosdevice_arm64() {

echo "*** building WebRTC for arm64 iOS devices";

export GYP_GENERATORS="ninja";

export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=ios target_arch=arm64 target_subarch=arm64 clang_xcode=1";

export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios_arm64";

export GYP_CROSSCOMPILE=1;

echo "src/webrtc/build/gyp_webrtc  -Dclang_xcode=1"

pushd src;

gclient runhooks;

ninja -C out_ios_arm64/Release-iphoneos AppRTCDemo;

echo "*** creating iOS arm64 libraries";

pushd out_ios_arm64/Release-iphoneos/;

rm -f  libapprtc_signaling.a;

popd;

mkdir -p out_ios_arm64/libs;

libtool -static -o out_ios_arm64/libs/libWebRTC-arm64.a out_ios_arm64/Release-iphoneos/lib*.a;

strip -S -x -o out_ios_arm64/libs/libWebRTC.a -r out_ios_arm64/libs/libWebRTC-arm64.a;

echo "*** result: $PWD/out_ios_arm64/libs/libWebRTC.a";

popd;

}

function combine_libs()

{

echo "*** combining libraries";

lipo  -create  src/out_ios_armv7/libs/libWebRTC.a \

src/out_ios_arm64/libs/libWebRTC.a \

-output libWebRTC.a;

echo "The public headers are located in $PWD/src/talk/app/webrtc/objc/public/*.h";

}

function combine_libs_sim()

{

echo "*** combining libraries";

lipo  -create   src/out_ios_ia32/libs/libWebRTC.a \

src/out_ios_x86_64/libs/libWebRTC.a \

-output libWebRTC_sim.a;

echo "The public headers are located in $PWD/src/talk/app/webrtc/objc/public/*.h";

}

function create_framework() {

echo "*** creating WebRTC.framework";

rm -rf WebRTC.framework;

mkdir -p WebRTC.framework/Versions/A/Headers;

cp ./src/talk/app/webrtc/objc/public/*.h WebRTC.framework/Versions/A/Headers;

cp libWebRTC.a WebRTC.framework/Versions/A/WebRTC;

pushd WebRTC.framework/Versions;

ln -sfh A Current;

popd;

pushd WebRTC.framework;

ln -sfh Versions/Current/Headers Headers;

ln -sfh Versions/Current/WebRTC WebRTC;

popd;

}

function clean()

{

echo "*** cleaning";

pushd src;

rm -rf out_ios_arm64;

rm -rf out_ios_armv7;

rm -rf out_ios_ia32;

rm -rf out_ios_x86_64;

popd;

echo "*** all cleaned";

}

function update()

{

gclient sync --force

pushd src

svn info | grep Revision > ../svn_rev.txt

popd

}

function build_all() {

build_iossim_ia32 && build_iossim_x86_64 && \

build_iosdevice_armv7 && build_iosdevice_arm64 && \

combine_libs && combine_libs_sim;

}

function build_os() {

build_iosdevice_armv7 combine_libs;

}

function run_simulator_ia32() {

echo "*** running webrtc appdemo on ia32 iOS simulator";

src/out_ios_ia32/Release-iphonesimulator/iossim src/out_ios_ia32/Release-iphonesimulator/AppRTCDemo.app;

}

function run_simulator_x86_64() {

echo "*** running webrtc appdemo on x86_64 iOS simulator";

src/out_ios_x86_64/Release-iphonesimulator/iossim -d ‘iPhone 6‘ -s ‘8.4‘  src/out_ios_x86_64/Release-iphonesimulator/AppRTCDemo.app;

}

function run_on_device_armv7() {

echo "*** launching on armv7 iOS device";

ideviceinstaller -i src/out_ios_armv7/Release-iphoneos/AppRTCDemo.app;

echo "*** launch complete";

}

function run_on_device_arm64() {

echo "*** launching on arm64 iOS device";

ideviceinstaller -i src/out_ios_arm64/Release-iphoneos/AppRTCDemo.app;

echo "*** launch complete";

}

#运行命令行参数中第一个参数所指定的Shell函数

[email protected]

时间: 2024-11-10 03:54:20

webrtc build.sh的相关文章

Build Android Webrtc Libjingle Library On Ubuntu

Recently, our team is developing an app to help people solve problem face to face. We choose webrtc protocol as our bridge among different platform(Android, iOS, browser etc). But there is a hole in Android 6.0 system, the protocol can not support An

webrtc学习(一): webrtc开始

一. 编译webrtc 1. 预先准备 1)  vpn. 用于同步代码. 这里给一个大概的估计吧. windows端包含vs2013 win8sdk wdk chromium源码等等, 总共需要至少8G. android端还需要android ndk sdk以及大量的依赖库, 大致也是10G往上. 所以需要网速不好的话, 同步一天也是很正常. 2. 同步代码及编译 http://www.webrtc.org/reference/getting-started 参考这个链接, 很详细, 需要认真看

webrtc教程

cdsn博客不支持word文件,所以这里显示不完全.可到本人资源中下载word文档: v0.3:http://download.csdn.net/detail/kl222/6961491 v0.1:http://download.csdn.net/detail/kl222/6677635  下载完后评论,可以返还你的积分.此文档还在完善中,欢迎大家交流,共同完善.    Webrtc  教程 版本0.3(2014年2月) 康林 ([email protected]) 本文博客地址:http://

webrtc在ubuntu14.04上的编译过程(12.04亦可)

转自:http://blog.csdn.net/xiangjai/article/details/44409751 一.虚拟机环境搭建 1.安装ubuntu 14.04虚拟机: 因为可以屏蔽svn版本问题,如果使用14以下版本svn版本是1.7以下的,在不能下载代码而是使用代码包的情况下会遇到因为svn版本不能同步的问题.这个时候需要手动升级svn版本到1.8+ 2.开启root登陆: 为了启用root 帐号(也就是设置一个口令)使用: sudo passwd root 当你使用完毕后屏蔽roo

How to build .apk file from command line(转)

How to build .apk file from command line Created on Wednesday, 29 June 2011 14:32 If you don’t want to install a number of programs for building your Android project, this article is for you. You will need only JDK, the Android SDK platform tools and

翻译 - 【Dojo Tutorials】Part 5 - Build FlickrView for production

原文:Part 5 - Build FlickrView for production 在前面的几篇文章中,我们通过编写HTML, CSS和JavaScript实现了这个FlickrView移动应用.本片文章将专注于为部署更新代码,利用Dojo的构建系统让生产环境应用保持紧凑,并回顾了整个Dojo Mobile驱动的应用. Dojo Mobile与构建 为Dojo Mobile应用创建一个构建版本是很重的,因为我们想要我们的应用尽可能的小.让我们看逐步了解一下如何创建我们Dojo Mobile应

WebRTC编译系统之gn files

在"WebRTC 构建系统介绍之gn和ninja"中,大概介绍了 gn 和 ninja 的简单用法,这次来看看 gn 用到的项目文件 .gn . .gni 和 DEPS ,它们指导了如何生成 ninja 构建文件. 借用 C++ 的概念,如果把 gn 看成一个编译系统, .gn 就是源文件, .gni 就是头文件.我们姑且这么理解就好了(其实 gni 里做的事情, gn 都可以做).DEPS 主要用来设定包含路径. gn 和 gni 文件都在源码树中,比如 src 目录.当执行 gn

build.xml配置编译打包过程(转)

工程目录如下,使用eclipse中的ant对此工程进行编译打包: MonServer | --------src |            |--------com |            |--------log4j.properties | | --------config | --------lib | --------log | --------sh | --------startMon.sh [xhtml] view plaincopyprint?<?xml version="

.NET Core竟然无法在Mac下进行build

KRuntime 改为 XRE 之后(详见从 KRE 到 XRE :ASP.NET 5 中正在消失的那些K),昨天在 mac 用 git 签出 XRE 的代码库,直接执行其中的 build 命令 sh build.sh ,一次build成功. 今天,在 mac 下签出 .NET Core 的代码库,却发现无法在 mac 下编译(代码库中没有 mac 下的 build 命令). .NET Core 是 .NET 跨平台的基石,如果 .NET Core 的开发人员在开发时都没有跨平台的意识,何谈做好