日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網為廣大站長提供免費收錄網站服務,提交前請做好本站友鏈:【 網站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

前言

最近對 WebRTC IOS 端源碼進行了下載和編譯,網上針對 WebRTC iOS 端的編譯文章基本都是幾年前的,有些地方已經不適用于最新版的 WebRTC 的編譯,簡單記錄下載&編譯的過程,以 M93 版本為例。

編譯環境

硬件:macBook Pro (Retina, 15-inch, Mid 2015)

系統:macOS Big Sur 11.5

安裝 depot_tools

  • depot_tools 是一套 google 用來編譯 Chromium 或者 WebRTC 的構建工具,獲取 depot_tools 源碼前,需開啟 VPN 服務。

```

$ mkdir webrtc

$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

```

如果出現如下錯誤,首先檢查 VPN 是否連接成功,其次配置 macOS 終端代理

IOS技術分享|WebRTC iOS源碼下載&編譯

 

配置終端代理

在開啟的 VPN 客戶端偏好設置中配置信息如下:

IOS技術分享|WebRTC iOS源碼下載&編譯

 

注意:配置終端代理只對當前終端有用,重啟后需要重新配置

```

$ export http_proxy=http://127.0.0.1:10887

$ export https_proxy=http://127.0.0.1:10887

$ export all_proxy=http://127.0.0.1:10887

```

IOS技術分享|WebRTC iOS源碼下載&編譯

 

配置環境變量

```

$ echo "export PATH=$PWD/depot_tools:$PATH" > $HOME/.bash_profile

$ source $HOME/.bash_profile

```

檢查是否配置成功

```

$ echo $PATH

```

安裝 ninja

ninja 是 WebRTC 的編譯工具。

```

$ git clone git://github.com/martine/ninja.git

$ cd ninja/

$ ./bootstrap.py

```

復制到系統目錄(也可配置壞境變量)

```

$ sudo cp ninja /usr/local/bin/

$ sudo chmod a+rx /usr/local/bin/ninja

```

下載 WebRTC 源碼

設置要編譯的平臺到環境變量

```

$ export GYP_DEFINES="OS=ios"

```

下載源碼

```

$ fetch --nohooks webrtc_ios

```

指定分支(以 M93版本為例)

```

$ gclient sync -r 25e3fd53a79bfdb2bd647ee3a199eb9c3a71d271

```

分支版本可以在[Release Notes](
https://github.com/webrtc/webrtc-org/blob/gh-pages/release-notes/index.md)中查找,目前最新的是M95版本。

IOS技術分享|WebRTC iOS源碼下載&編譯

 

編譯 WebRTC 源碼

iOS 版本我們可以使用源碼中自帶的編譯腳本,目錄如下,不同的 WebRTC 版本路徑可能不一樣,腳本可根據需求自行配置。

IOS技術分享|WebRTC iOS源碼下載&編譯

 

```

$ cd /Users/a1/Desktop/webrtc/src

$ /Users/a1/Desktop/webrtc/src/tools_webrtc/ios/build_ios_libs.py

```

編譯完成后可在 src/out_ios_libs 目錄下找到WebRTC.framework

生成 Example 并運行

```

$ gn gen out/ios --args='target_os="ios" target_cpu="arm64" is_component_build=false ios_enable_code_signing=false' --ide=xcode

```

下載&編譯操作源碼

```

Last login: Tue Sep 14 12:49:30 on ttys001

The default interactive shell is now zsh.

To update your account to use zsh, please run `chsh -s /bin/zsh`.

For more details, please visit https://support.Apple.com/kb/HT208050.

yushengzhudeMacBook-Pro:~ a1$ cd /Users/a1/Desktop/webrtc

$ ls

depot_tools

$ export PATH=$PATH:"/Users/a1/Desktop/webrtc/depot_tools"

$ export http_proxy=http://127.0.0.1:10887

$ export https_proxy=http://127.0.0.1:10887

$ export all_proxy=http://127.0.0.1:10887

$ export GYP_DEFINES="OS=ios"

$ fetch --nohooks webrtc_ios

Running: gclient root

WARNING: Your metrics.cfg file was invalid or nonexistent. A new one will be created.

Running: gclient config --spec 'solutions = [

{

"name": "src",

"url": "https://webrtc.googlesource.com/src.git",

"deps_file": "DEPS",

"managed": False,

"custom_deps": {},

},

]

target_os = ["ios"]

'

Running: gclient sync --nohooks --with_branch_heads

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://webrtc.googlesource.com/src.git /Users/a1/Desktop/webrtc/_gclient_src_mgr39v0v' in '/Users/a1/Desktop/webrtc'

Cloning into '/Users/a1/Desktop/webrtc/_gclient_src_mgr39v0v'...

remote: Sending approximately 332.17 MiB ...

remote: Counting objects: 75, done

remote: Finding sources: 100% (75/75)

remote: Total 388264 (delta 284781), reused 388243 (delta 284781)

Receiving objects: 100% (388264/388264), 332.12 MiB | 5.96 MiB/s, done.

Resolving deltas: 100% (284781/284781), done.

[0:01:50] Still working on:

[0:01:50] src

1>Syncing projects: 0% ( 0/ 2)

[0:01:55] Still working on:

[0:01:55] src

Syncing projects: 26% (11/42) src/ios

[0:04:39] Still working on:

[0:04:39] src/third_party

[0:04:39] src/tools

[0:08:52] Still working on:

[0:08:52] src/third_party

[0:08:52] src/tools

Syncing projects: 38% (16/42) src/tools/luci-go:infra/tools/luci/swarming/${pla

[0:09:52] Still working on:

[0:09:52] src/third_party

...

[0:24:17] Still working on:

[0:24:17] src/third_party

Syncing projects: 100% (42/42), done.

Running: git submodule foreach 'git config -f $toplevel/.git/config submodule.$name.ignore all'

Running: git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'

Running: git config diff.ignoreSubmodules all

$ gclient sync

Syncing projects: 100% (42/42), done.

Running hooks: 41% (10/24) mac_toolchain

________ running 'vPython src/build/mac_toolchain.py' in '/Users/a1/Desktop/webrtc'

Skipping Mac toolchain installation for mac

Running hooks: 45% (11/24) clang

________ running 'vpython src/tools/clang/scripts/update.py' in '/Users/a1/Desktop/webrtc'

Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Mac/clang-llvmorg-14-init-2175-g945cde8b-1.tgz .......... Done.

Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Mac/clang-llvmorg-14-init-2175-g945cde8b-1.tgz .......... Done.

Hook 'vpython src/tools/clang/scripts/update.py' took 30.90 secs

Running hooks: 58% (14/24) clang_format_mac

________ running 'download_from_google_storage --no_resume --platform=darwin --no_auth --bucket chromium-clang-format -s src/buildtools/mac/clang-format.sha1' in '/Users/a1/Desktop/webrtc'

NOTICE: You have PROXY values set in your environment, but gsutilin depot_tools does not (yet) obey them.

Also, --no_auth prevents the normal BOTO_CONFIG environmentvariable from being used.

To use a proxy in this situation, please supply those settingsin a .boto file pointed to by the NO_AUTH_BOTO_CONFIG environmentvariable.

0> Downloading src/buildtools/mac/clang-format@5ba974b3b37f9f4e3b44fdde11d7ef2ab71619ab...

Downloading 1 files took 25.228423 second(s)

Hook 'download_from_google_storage --no_resume --platform=darwin --no_auth --bucket chromium-clang-format -s src/buildtools/mac/clang-format.sha1' took 25.33 secs

Running hooks: 79% (19/24) test_fonts

________ running 'download_from_google_storage --no_resume --extract --no_auth --bucket chromium-fonts -s src/third_party/test_fonts/test_fonts.tar.gz.sha1' in '/Users/a1/Desktop/webrtc'

NOTICE: You have PROXY values set in your environment, but gsutilin depot_tools does not (yet) obey them.

Also, --no_auth prevents the normal BOTO_CONFIG environmentvariable from being used.

To use a proxy in this situation, please supply those settingsin a .boto file pointed to by the NO_AUTH_BOTO_CONFIG environmentvariable.

0> Downloading src/third_party/test_fonts/test_fonts.tar.gz@cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb...

0> Extracting 33 entries from src/third_party/test_fonts/test_fonts.tar.gz to src/third_party/test_fonts/test_fonts

Downloading 1 files took 25.751998 second(s)

Hook 'download_from_google_storage --no_resume --extract --no_auth --bucket chromium-fonts -s src/third_party/test_fonts/test_fonts.tar.gz.sha1' took 25.84 secs

Running hooks: 91% (22/24)

________ running 'download_from_google_storage --directory --recursive --num_threads=10 --no_auth --quiet --bucket chromium-webrtc-resources src/resources' in '/Users/a1/Desktop/webrtc'

NOTICE: You have PROXY values set in your environment, but gsutilin depot_tools does not (yet) obey them.

Also, --no_auth prevents the normal BOTO_CONFIG environmentvariable from being used.

To use a proxy in this situation, please supply those settingsin a .boto file pointed to by the NO_AUTH_BOTO_CONFIG environmentvariable.

Hook 'download_from_google_storage --directory --recursive --num_threads=10 --no_auth --quiet --bucket chromium-webrtc-resources src/resources' took 1268.21 secs

Hook 'vpython src/testing/generate_location_tags.py --out src/testing/location_tags.json' took 34.77 secs

Running hooks: 100% (24/24), done.

$ gclient sync -r 25e3fd53a79bfdb2bd647ee3a199eb9c3a71d271

Syncing projects: 100% (43/43), done.

Running hooks: 41% (10/24) mac_toolchain

________ running 'vpython src/build/mac_toolchain.py' in '/Users/a1/Desktop/webrtc'

Skipping Mac toolchain installation for mac

Running hooks: 45% (11/24) clang

________ running 'vpython src/tools/clang/scripts/update.py' in '/Users/a1/Desktop/webrtc'

Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Mac/clang-llvmorg-13-init-14732-g8a7b5ebf-2.tgz .......... Done.

Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Mac/clang-llvmorg-13-init-14732-g8a7b5ebf-2.tgz .......... Done.

Hook 'vpython src/tools/clang/scripts/update.py' took 31.97 secs

Running hooks: 58% (14/24) clang_format_mac

________ running 'download_from_google_storage --no_resume --platform=darwin --no_auth --bucket chromium-clang-format -s src/buildtools/mac/clang-format.sha1' in '/Users/a1/Desktop/webrtc'

NOTICE: You have PROXY values set in your environment, but gsutilin depot_tools does not (yet) obey them.

Also, --no_auth prevents the normal BOTO_CONFIG environmentvariable from being used.

To use a proxy in this situation, please supply those settingsin a .boto file pointed to by the NO_AUTH_BOTO_CONFIG environmentvariable.

Running hooks: 79% (19/24) test_fonts

________ running 'download_from_google_storage --no_resume --extract --no_auth --bucket chromium-fonts -s src/third_party/test_fonts/test_fonts.tar.gz.sha1' in '/Users/a1/Desktop/webrtc'

NOTICE: You have PROXY values set in your environment, but gsutilin depot_tools does not (yet) obey them.

Also, --no_auth prevents the normal BOTO_CONFIG environmentvariable from being used.

To use a proxy in this situation, please supply those settingsin a .boto file pointed to by the NO_AUTH_BOTO_CONFIG environmentvariable.

Running hooks: 91% (22/24)

________ running 'download_from_google_storage --directory --recursive --num_threads=10 --no_auth --quiet --bucket chromium-webrtc-resources src/resources' in '/Users/a1/Desktop/webrtc'

NOTICE: You have PROXY values set in your environment, but gsutilin depot_tools does not (yet) obey them.

Also, --no_auth prevents the normal BOTO_CONFIG environmentvariable from being used.

To use a proxy in this situation, please supply those settingsin a .boto file pointed to by the NO_AUTH_BOTO_CONFIG environmentvariable.

Hook 'vpython src/testing/generate_location_tags.py --out src/testing/location_tags.json' took 35.13 secs

Running hooks: 100% (24/24), done.

```

IOS技術分享|WebRTC iOS源碼下載&編譯

 

分享到:
標簽:WebRTC iOS
用戶無頭像

網友整理

注冊時間:

網站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網站吧!
最新入駐小程序

數獨大挑戰2018-06-03

數獨一種數學游戲,玩家需要根據9

答題星2018-06-03

您可以通過答題星輕松地創建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學四六

運動步數有氧達人2018-06-03

記錄運動步數,積累氧氣值。還可偷

每日養生app2018-06-03

每日養生,天天健康

體育訓練成績評定2018-06-03

通用課目體育訓練成績評定