歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> ubuntu14.04下chromium的編譯

ubuntu14.04下chromium的編譯

日期:2017/2/27 15:54:07   编辑:Linux教程
1、下載depot_tools:

首先安裝 git-core: sudo apt-get install git-core

執行命令: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

2、更新depot_tools:

直接在當前shell環境輸入: export PATH="$PATH:depot_tools_dir/depot_tools";

或加如系統環境變量: vim ~/.bashrc 文件,在最後加入export PATH="$PATH:depot_tools_dir/depot_tools",

 保存執行source ~/.bashrc

3、配置代碼分支

 進入自己本地要保存源碼的目錄,執行 gclient config http://src.chromium.org/svn/releases/36.0.1985.135

可根據自己需要下載相應版本。如果不需要下載一些文件如LayoutTest修改目錄下的.gclient :
  solutions = [

  { "name"        : "36.0.1985.135",

    "url"         : "http://src.chromium.org/svn/releases/36.0.1985.135",

    "deps_file"   : "DEPS",

    "managed"     : True,

    "custom_deps" : {

                "src/content/test/data/layout_tests/LayoutTests": None,

                "src/third_party/WebKit/LayoutTests": None,

                "src/chrome/tools/test/reference_build/chrome_win": None,

                "src/chrome_frame/tools/test/reference_build/chrome_win":None,

                "src/chrome/tools/test/reference_build/chrome_mac": None,

                "src/third_party/hunspell_dictionaries": None,

    },

    "safesync_url": "",

  },

]

cache_dir = None

target_os = ['android']

4、代碼同步:

  執行glient sync --force 同步一般時間比較長,

特別說明:

  請使用vpn 我使用的VPN gate 一個開源的vpn 客戶端(window平台) + ubuntu14.04虛擬機。

5、安裝java sdk

sudo apt-get install openjdk-7-jdk

sudo upate-alternatives --config javac

sudo upate-alternatives --config javaws

sudo upate-alternatives --config javap

sudo upate-alternatives --config jar

sudo upate-alternatives --config jarsigner

sudo upate-alternatives --config java


6、編譯chromium

執行:src/build/install-build-deps-android.sh (android)

ninja -C out/Release content_shell_apk

注意:

 在ubuntu14.04 上編譯(36.0.1985.135)的時候需要更改一下install-build-deps.sh 腳本中的

  ubuntu_versions="12\.04|12\.10|13\.04|13\.10|14\.04"

  添加14\.04這個才能執行。
Copyright © Linux教程網 All Rights Reserved