zoukankan      html  css  js  c++  java
  • 下载编译webrtc for ios

    【官网】

    http://www.webrtc.org/reference/getting-started

    【步骤】

    参照官网的步骤,要下载和编译源码,需要安装两个工具 depot_tools 和 git

    1. 安装git

    http://www.cnblogs.com/ccdev/archive/2012/09/12/2682098.html

    2.安装depot_tools

    a 启动终端,当前路径为:/Users/xxx : 

    b git 命令获取depot_tools:git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

    c 把depot_tools 设置到PATH中

       vi ~/.bash_profile

       export PATH="$PATH":`pwd`/depot_tools

     按“ESC”,输入 ":wq!" 保存退出;

      source ~/.bash_profile   使PATH设置生效

      echo $PATH 查看设置是否生效。

    c可以简化为export PATH="$PATH":`pwd`/depot_tools

    echo $PATH 查看设置是否生效。

    3. 获取WebRTC 源码。

    a 新建WebRTC文件夹,并在终端进入该文件夹

    b 执行命令 : 

      gclient config http://webrtc.googlecode.com/svn/trunk

    我们在当前目录下可以看到.gclient文件,若看不到这个文件则运行以下命令:(显示Mac隐藏文件的命令)

    defaults write com.apple.finder AppleShowAllFiles  YES

    在.gclient文件中添加以下内容:
    target_os = ['ios']
    target_os_only = True

    gclient sync --force

    gclient runhooks --force

    gclient sync过程中可能遇到错误:

    Error: Command download_from_google_storage --directory --recursive --num_threads=10 --no_auth --bucket chromium-webrtc-resources trunk/resources returned non-zero exit status 1

    解决方法:

    注释掉

    trunk/DEPS文件里

    {
    # Download test resources, i.e. video and audio files from Google Storage.
    "pattern": "\.sha1",
    "action": ["download_from_google_storage",
    "--directory",
    "--recursive",
    "--num_threads=10",
    "--no_auth",
    "--bucket", "chromium-webrtc-resources",
    Var("root_dir") + "/resources"],
    },

    以上可以编译成功MAC的,ios的不行。

    运行:

    ./build/gyp_chromium --depth=.  -DOS=ios -Dinclude_tests=0 -Denable_protobuf=0 -Denable_video=0 webrtcjingle.gyp
    可以生成ios的,但是编译还有一个错误未解决,待续...
  • 相关阅读:
    Windows XP中万能断点
    c#运算符 ?
    转神秘的程序员
    经典解决“线程间操作无效
    文件上传
    dowload.aspx
    mail
    js 正则
    新年快乐
    DataTable Compute
  • 原文地址:https://www.cnblogs.com/tkppain/p/3616660.html
Copyright © 2011-2022 走看看