How to compile chromium (CEF3) on Windows and join MP3 support (ii)

Source: Internet
Author: User

After a year, once again compiled CEF3, the unique purpose is still to join MP3 support. The new version of the compilation environment and considerations have changed, so record again.

One, the compiled version

CEF version number format is X.yyyy.a.ghhhhhhh

    • X is the main version number, currently only 3
    • YYYY to Chromium branch number
    • A is the incremented SVN commit version number
    • Hhhhhhh commit hash for 7-bit git

This compile CEF version is 3.2704.1434.gec3e9ed

Second, the compilation conditions

    • Fast and stable VPN, download chromium source code required, recommended Nydus
    • 60G disk space
    • 64-bit operating system, Win 7+
    • vs2015 Update2 or Update3
    • Windows 10.0.10586 SDK (included in vs2015, installation note selection)
    • MFC libraries (included in vs2015, installation note selection)

Other version compilation conditions view official documentation Instructions

Iii. preparatory work

    • Set the system area to English (United States). (Control Panel-zone-manage-change system locale-English (United States)
    • Create a working directory where the path cannot contain spaces and special characters. such as H:\ws
    • Download the compilation Toolkit and unzip it to the working directory.
    • Download the compilation script to the working directory.
    • Create the source directory under the working directory. such as H:\ws\source
    • adding system environment variables
      • cef_archive_format=tar.bz2
      • Depot_tools_win_toolchain=0
      • Gyp_defines=buildtype=official
      • gyp_msvs_version=2015
      • Path to add h:\ws\depot_tools, to avoid conflicts with installed Python or git, it is recommended to write in the forward position of the path
Full directory structure: H:/   ws/       automate-git.py       depot_tools/       source /

Iv. beginning

1. Run cmd as an administrator , install python, git, svn

H:CD H:\ws\depot_toolsupdate_depot_tools.bat

2. Run the compilation script.

CD h:\ws# does not pass in parameters will show help Python automate-git.py--download-dir=h:\ws\source--depot-tools-dir =h:\ws\depot_tools--branch=2704 --checkout=ec3e9ed7fecc0d9f37a96951ba1bb26fd4f64dc7--no-build-- No-distrib

Since the download of the source code to modify the configuration first, so set to not compile. The download lasts about 4-5 hours. How to get checkout values see the previous article .

3. Modify the Configuration

Modify the H:\ws\source\chromium\src\cef\cef.gypi,variables section below to support MP3.

' Proprietary_codecs ' 1 , ' ffmpeg_branding ' ' Chrome ',

You can also refer to http://blog.csdn.net/chromium_webkit/article/details/8575629 to add more format support .

From the source code of chromium third_party\ffmpeg\chromium\config\chrome\win\ia32\ Config.h can learn about the FFmpeg configuration options that Chrome uses, adding the following options after the original configuration options:

--enable-decoder= ' rv10,rv20,rv30,rv40,cook,h263,h263i,mpeg4,msmpeg4v1,msmpeg4v2,msmpeg4v3,amrnb,amrwb,ac3,flv ' --enable-demuxer= ' Rm,mpegvideo,avi,avisynth,h263,aac,amr,ac3,flv,mpegts,mpegtsraw '--enable-parser= ' MPEGVideo, Rv30,rv40,h263,mpeg4video,ac3 '

4. Modify other errors

#解决错误: Unrecognized symbol _ff_w64_guid_data# Modify chromium/third_party/ffmpeg/ffmpeg_generated.gypi# line  '  libavformat/vorbiscomment.c', after adding 'libavformat/w64.c' ,

5. Compiling

Python automate-git.py--download-dir=h:\ws\source--depot-tools-dir=h:\ws\depot_tools--branch= 2704 --checkout=ec3e9ed7fecc0d9f37a96951ba1bb26fd4f64dc7--no-debug-build--force-build--no-update

The--build-log-file parameter can be added to output log information to a file for complete information.

But not at the same time in the CMD window to observe the progress, and generate large files, pay attention to trade-offs.

#最终生成输出路径H: \ws\source\chromium\src\out\releaseh:\ws\source\chromium\src\cef\binary_distrib

V. Results test

1. Version number

2. Compare with official version

Vi. references

Https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md

Https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding.md

Https://bitbucket.org/chromiumembedded/cef/wiki/AutomatedBuildSetup.md

http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=14473

Https://chromium-review.googlesource.com/#/c/343398/4

How to compile chromium (CEF3) on Windows and join MP3 support (ii)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.