chromium 源码获取 与 webrtc 版本对应的版本切换

win10 + visual studio 2017;

获取 chromium 源码 和 单独获取 webrtc 源码 基本上是一样的;

网络保证可以访问 Google;

 

1: 配置 depot_tools ,设置环境变量,或者每次 cmd 中设置;

2: 管理员权限 打开 cmd;

3:设置环境变量,基本上和 webrtc 一样;

4:fetch chromium; 

5:gclient sync;

      5.1:git fetch

      5.2:git tetch --tags           

6:代码更新完成后,可以切换需要的 branch,如果要切换指定 webrtc_m74 版本对应的 chromium 版本 branch ,怎么切换:

      6.1:查看 Chromium 版本对应的 相关工程版本: 

               https://chromiumdash.appspot.com/branches  

chromium 源码获取 与 webrtc 版本对应的版本切换_第1张图片

      6.2:前后 branch :   如:   

git checkout -b branch_heads_3729_m74 refs/remotes/branch-heads/3729

gclient sync --with_branch_heads --with_tags

    更多可以看这里:

     http://www.chromium.org/developers/how-tos/get-the-code/working-with-release-branches

Working with Release Branches
This applies to commits to Chromium repository branches. For changes to Chromium OS repositories, see the information here.

Checking out a release branch
Note: Prior to branch 3420 it is usually NOT possible to sync and build a release branch (i.e. with consistent third_party DEPS), The instructions below will only work with branch 3420 or later. For old branches, please refer to the internal documentation (go/ChromeReleaseBranches).

# Make sure you are in 'src'.
# This part should only need to be done once, but it won't hurt to repeat it. The first
# time checking out branches and tags might take a while because it fetches an extra
# 1/2 GB or so of branch commits. 
gclient sync --with_branch_heads --with_tags

# You may have to explicitly 'git fetch origin' to pull branch-heads/
git fetch

# Checkout the branch 'src' tree.
git checkout -b branch_$BRANCH branch-heads/$BRANCH

# Checkout all the submodules at their branch DEPS revisions.
gclient sync --with_branch_heads --with_tags
Building a branch
Once checked out, building a branch should be the same as building trunk. To avoid clobbering other build artifacts, you may want to specify a different build directory (e.g. //out/Branch1234 instead of //out/Default).

Merging a patch from another branch (e.g. trunk)
Please see the cherry-pick/drover instructions.
Developing a patch directly on the branch
Note: Bugs should generally be fixed and tested on trunk (canary) and then merged to branches. However, if you cannot do that:
# Make sure you are in 'src'.
# Create a branch for the patch.
git new-branch --upstream branch-heads/$BRANCH my_hack_on_the_branch

# Develop normally.
git commit
git cl upload

# After your CL is carefully reviewed, land directly. Don't use the CQ on branches.
git cl land
Syncing and building a release tag
Releases are tagged in git with the release version number.
Note: You cannot commit to a release tag. This is purely for acquiring the sources that went into a release build.

# Make sure you have all the release tag information in your checkout.
git fetch --tags
# Checkout whatever version you need (known versions can be seen with 'git show-ref --tags')
git checkout -b your_release_branch 74.0.3729.131   # or more explicitly, tags/74.0.3729.131
gclient sync --with_branch_heads --with_tags
Then build as normal.

Get back to the "trunk"
# Make sure you are in 'src'.
git checkout -f master
gclient sync

7:另一个方法:

      打开: https://chromiumdash.appspot.com/releases?platform=Windows

      chromium 源码获取 与 webrtc 版本对应的版本切换_第2张图片

        查看:stable频道版本

       如: 74 版本对应的是 74.0.3729.169

       git checkout -b branch_heads_3729_m74 74.0.3729.169

       gclient sync --with_branch_heads --with_tags

   我用的上面第一个方法,这个方法未测试;

 

参考: https://www.cnblogs.com/kanego/p/4086686.html

你可能感兴趣的:(WebRTC)