cef AutomatedBuildSetup
来源:互联网 发布:自然语言处理余弦算法 编辑:程序博客网 时间:2024/06/17 19:14
转载自: https://bitbucket.org/chromiumembedded/cef/wiki/AutomatedBuildSetup.md#markdown-header-windows-configuration
This Wiki page describes the setup of an automated build system for CEF.
Note to Editors: Changes made to this Wiki page without prior approval via the CEF Forum or Issue Tracker may be lost or reverted.
- Overview
- Services
- Execution Steps
- 1. Change Trigger
- 2. Platform Builder
- 3. Artifact Publisher
- Platform Build Configurations
- Linux Configuration
- Mac OS X Configuration
- Windows Configuration
Overview
CEF provides tools for automatically downloading, building and packaging Chromium and CEF source code. These tools are the recommended way of building CEF locally and can also be integrated with an automated build system. Examples of automated build systems for CEF include http://opensource.spotify.com/cefbuilds/index.html hosted by Spotify. This document outlines how to build a system similar to Spotify's. For general CEF build instructions see the BranchesAndBuilding Wiki page.
Services
An automated build system tracks changes to a CEF branch, automatically builds a new version of CEF when changes are detected, and uploads the resulting artifacts (CEF binary files) to an Internet or Intranet Website.
The following high-level services are necessary for an automated build system:
- Build execution service. Used to perform the CEF automated builds using agents running on different OS platforms. For example, a build system like TeamCity or Jenkins.
- Artifact storage service. Used to store artifacts referenced and generated by the build agents. For example, a shared file system or a storage system like Artifactory.
- Artifact publishing service. Used to publish artifacts for download on the Intranet or Internet. Generally provides some form of distributed caching. For example, a cloud provider like Amazon S3 + Cloudfront or Google Cloud Storage.
Setup of these specific services is outside the scope of this document. However, we will refer to the capabilities of these services in generic terms.
Execution Steps
The reference build system works by executing the following steps in order:
1. Change Trigger
Runs automatically at some interval (for example, once daily) to check if a new change has been committed to the CEF repository. The Bitbucket REST API exposes an endpoint that can be queried to identify the most recent commit in a branch. For example, this will return the most recent commit for 2785 branch:
https://api.bitbucket.org/2.0/repositories/chromiumembedded/cef/commit/2785
The resulting "hash" value can then be compared to the last successful CEF build version to identify if a new build is required (e.g. a hash value of "1e15b7626244fa6c6455b7a24552664e4cc14fd3" from branch 2785 will match a build artifact file named "cef_binary_3.2785.*.g1e15b76_*.tar.bz2").
If artifacts are stored on a shared file system then languages like Python can access the file list directly. If artifacts are stored in Artifactory then see the Artifactory REST API documentation for instructions on how to retrieve a directory listing.
2. Platform Builder
Initiated by the change trigger when a new commit is detected. A separate platform builder is configured for each supported build platform (linux32, linux64, macosx64, windows32, windows64). It executes a build on that platform and then uploads the resulting build artifact files to the storage service (shared file system, Artifactory, etc.).
See the "Platform Build Configurations" section below for recommended platform build configurations.
3. Artifact Publisher
Initiated by the platform builder upon a successful build. It retrieves the list of build artifact files from the storage service and uses the cefbuilds tools to compare against the index.json file generated by the previous run. When changes are detected it uploads the new changes to the publishing service (Amazon S3, GCS, etc.). The new index.json file is then stored for future reference.
In addition to generating index.json files the cefbuilds tools can also generate the index.html file used by the Spotify builder (provide your own custom branding to cef_html_builder.py via the "branding" parameter). See the cef_json_builder_example.py and cef_html_builder.py files from the cefbuilds directory for sample usage.
Platform Build Configurations
The following configurations are executed by the platform builder step. These are the recommended configurations for externally published artifacts but are not recommended for local builds. See the the BranchesAndBuilding Wiki page for general build instructions.
These instructions are intended for use with the current release branch (2785). For a limited time you can also build older release branches using these instructions by setting CEF_USE_GN=0
. This will build CEF with GYP instead of GN -- see this announcement for details. This Wiki page will be updated as build requirements change.
Lower-case values between %% (%download_dir%, %cef_branch%, etc.) must be provided by you.
Linux Configuration
What's Required
- Ubuntu 14.04 LTS 64-bit.
- At least 6GB of RAM and 40GB of free disk space.
The following commands can also be executed in a chroot environment.
32-bit Build Commands
To build 32-bit CEF on a 64-bit Linux host system:
dpkg --add-architecture i386apt-get install aptitudeaptitude -y updateDEBIAN_FRONTEND=noninteractive aptitude -y install bison build-essential cdbs curl devscripts dpkg-dev elfutils fakeroot flex g++ git-core git-svn gperf libapache2-mod-php5 libasound2-dev libav-tools libbrlapi-dev libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev libdrm-dev libelf-dev libexif-dev libffi-dev libgconf2-dev libgl1-mesa-dev libglib2.0-dev libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev mesa-common-dev openbox patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto python-dev python-psutil python-numpy python-opencv python-openssl python-yaml rpm ruby subversion ttf-dejavu-core ttf-indic-fonts ttf-kochi-gothic ttf-kochi-mincho fonts-thai-tlwg wdiff wget zip lib32gcc1 lib32stdc++6 libc6-i386 linux-libc-dev:i386export CEF_USE_GN=1export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none symbol_level=1"export GYP_DEFINES="disable_nacl=1 use_sysroot=1 host_arch=x86_64 target_arch=ia32 buildtype=Official use_allocator=none"export CEF_ARCHIVE_FORMAT=tar.bz2automate-git.py --download-dir=%download_dir% --branch=%cef_branch% --minimal-distrib --client-distrib --force-clean --build-target=cefsimple
Debug binaries cannot be generated when building this configuration with GYP. In that case add the --no-debug-build
flag to the automate-git.py command-line. See issue #1804 for details.
64-bit Build Commands
To build 64-bit CEF on a 64-bit Linux host system:
apt-get install aptitudeaptitude -y updateDEBIAN_FRONTEND=noninteractive aptitude -y install bison build-essential cdbs curl devscripts dpkg-dev elfutils fakeroot flex g++ git-core git-svn gperf libapache2-mod-php5 libasound2-dev libav-tools libbrlapi-dev libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev libdrm-dev libelf-dev libexif-dev libffi-dev libgconf2-dev libgl1-mesa-dev libglib2.0-dev libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev mesa-common-dev openbox patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto python-dev python-psutil python-numpy python-opencv python-openssl python-yaml rpm ruby subversion ttf-dejavu-core ttf-indic-fonts ttf-kochi-gothic ttf-kochi-mincho fonts-thai-tlwg wdiff wget zipexport CEF_USE_GN=1export GN_DEFINES="is_official_build=true use_sysroot=true use_allocator=none symbol_level=1"export GYP_DEFINES="disable_nacl=1 use_sysroot=1 buildtype=Official use_allocator=none"export CEF_ARCHIVE_FORMAT=tar.bz2automate-git.py --download-dir=%download_dir% --branch=%cef_branch% --minimal-distrib --client-distrib --force-clean --x64-build --build-target=cefsimple
Mac OS X Configuration
What's Required
- OS X 10.10.4 or newer.
- Xcode 7.3.1.
- At least 8GB of RAM and 40GB of free disk space.
If Xcode is not installed to the default location then set the correct location using the xcodeselect
tool.
64-bit Build Commands
To build 64-bit CEF on a 64-bit OS X host system:
export CEF_USE_GN=1export GN_DEFINES=is_official_build=trueexport GYP_DEFINES=buildtype=Officialexport CEF_ARCHIVE_FORMAT=tar.bz2automate-git.py --download-dir=%download_dir% --branch=%cef_branch% --minimal-distrib --client-distrib --force-clean --x64-build
Windows Configuration
What's Required
- Windows 7 or newer, 64-bit OS.
- Visual Studio 2015 Update 2 or Update 3.
- Windows 10.0.10586 SDK.
- At least 8GB of RAM and 40GB of free disk space.
See comments in gclient_hook.py for Windows custom toolchain requirements. VS + SDK can be packaged for distribution to build agents using a script like Chromium's package_from_installed.py.
32-bit Build Commands
To build 32-bit CEF on a 64-bit Windows host system:
set CEF_USE_GN=1set GN_DEFINES=is_official_build=trueset GYP_DEFINES=buildtype=Officialset GYP_MSVS_VERSION=2015set CEF_ARCHIVE_FORMAT=tar.bz2automate-git.py --download-dir=%download_dir% --branch=%cef_branch% --minimal-distrib --client-distrib --force-clean
If VS2015 or SDK is not installed to the default location then set the following before executing automate-git.py:
set WIN_CUSTOM_TOOLCHAIN=1set CEF_VCVARS=noneset GYP_MSVS_OVERRIDE_PATH=%vs_root%set VS_CRT_ROOT=%vs_crt_root%set SDK_ROOT=%sdk_root%set PATH=%sdk_root%\bin\x86;%vs_root%\VC\bin;%PATH%set LIB=%sdk_root%\Lib\10.0.10586.0\um\x86;%sdk_root%\Lib\10.0.10586.0\ucrt\x86;%vs_root%\VC\lib;%vs_root%\VC\atlmfc\lib;%LIB%set INCLUDE=%sdk_root%\Include\10.0.10586.0\um;%sdk_root%\Include\10.0.10586.0\ucrt;%sdk_root%\Include\10.0.10586.0\shared;%sdk_root%\Include\10.0.10586.0\winrt;%vs_root%\VC\include;%vs_root%\VC\atlmfc\include;%INCLUDE%
64-bit Build Commands
To build 64-bit CEF on a 64-bit Windows host system:
set CEF_USE_GN=1set GN_DEFINES=is_official_build=trueset GYP_DEFINES=buildtype=Officialset GYP_MSVS_VERSION=2015set CEF_ARCHIVE_FORMAT=tar.bz2automate-git.py --download-dir=%download_dir% --branch=%cef_branch% --minimal-distrib --client-distrib --force-clean --x64-build
If VS2015 or SDK is not installed to the default location then set the following before executing automate-git.py:
set WIN_CUSTOM_TOOLCHAIN=1set CEF_VCVARS=noneset GYP_MSVS_OVERRIDE_PATH=%vs_root%set VS_CRT_ROOT=%vs_crt_root%set SDK_ROOT=%sdk_root%set PATH=%sdk_root%\bin\x64;%vs_root%\VC\bin\amd64;%PATH%set LIB=%sdk_root%\Lib\10.0.10586.0\um\x64;%sdk_root%\Lib\10.0.10586.0\ucrt\x64;%vs_root%\VC\lib\amd64;%vs_root%\VC\atlmfc\lib\amd64;%LIB%set INCLUDE=%sdk_root%\Include\10.0.10586.0\um;%sdk_root%\Include\10.0.10586.0\ucrt;%sdk_root%\Include\10.0.10586.0\shared;%sdk_root%\Include\10.0.10586.0\winrt;%vs_root%\VC\include;%vs_root%\VC\atlmfc\include;%INCLUDE%
Updated 2017-05-06
- cef AutomatedBuildSetup
- CEF
- CEF功能
- CEF简介
- CEF-GeneralUsage
- CEF-Architecture
- CEF-JavaScriptIntegration
- cef架构
- mfc cef
- Cef-----摘抄
- cef 介绍
- Cef概览
- cef相关
- 编译CEF
- CEF简介
- cef BranchesAndBuilding
- cef MasterBuildQuickStart
- cef Overview
- 前端通用编码规范
- html中列表前的序号用带圆圈的数字表示及存在的问题
- 什么是数据库连接池?怎么配置tomcat的数据库连接池?
- 01-复杂度2 Maximum Subsequence Sum (25分)
- HDU 4569 Special equations(思维)——2013 ACM-ICPC长沙赛区全国邀请赛
- cef AutomatedBuildSetup
- [leetcode]598. Range Addition II
- 深入理解javascript原型和闭包(9)——简述【执行上下文】下
- web中鼠标的点击事件
- PHP实战之实现简单的分页
- 不同PNP求解算法性能测试
- web前端开发之几种布局方式之响应式布局
- 126. Word Ladder I & II
- 判断某一天是当年的哪一天