We could update CI to download/unzip/install the CDM binaries (header, manifest, etc)... but that would only be appropriate if we wanted to bundle CDM. We don't intend to bundle Widevine, instead we are distributing using component updater.
Stub needed after Chromium change:
90c6eb5176
commit 90c6eb5176bf1347001dde9edd27aa8b70b74186
Author: John Rummell <jrummell@chromium.org>
Date: Thu Aug 29 21:07:24 2019 +0000
Move CDMs into platform specific paths on Linux
Rather than including the CDMs in the base install directory, move them
into subdirectories (e.g. Widevine would be located in
<installdir>/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so).
This allows the LICENSE and manifest.json file to be bundled with Chrome
on Linux. Future CL's will use the manifest.json file to determine
the capabilities of the CDM (rather than having them hardcoded as they
are today).
In addition to the unittests below, ran EME browser_tests (both ECK
and Widevine) to check that the library can be loaded from it's new
directory, and built "installer" (although I don't know if whatever
package it creates is installable).
Bug: 971433
Fixesbrave/brave-browser#6001
After updating git submodule depot_tools manually checkout master and
reset to the latest if our version of depot_tools doesn't have the
commit yet that started tracking pylint.bat.
See https://bugs.chromium.org/p/chromium/issues/detail?id=996359
Also, modifies how depot_tools are cleaned on windows in submoduleSync
to avoid getting the 'in use' error.
Allow switching between brave-core branches and not incurring a lengthy build because all ~400 chromium source files were reset and had patches re-applied.
Instead, only reset target files and apply patches when appropriate: when either the patch file has changed or the chromium source file has been modified.
This is achieved by writing a corresponding .patchinfo file for each .patch file that is applied. This file contains a checksum of the .patch file, as well as a checksum of each target source file that the patch applies to. The checksum is calculated after the patch is applied.
Note that npm run sync -- --init will still always reset and re-apply all patches.
npm run sync -- --all however will run this more selective algorithm.
Also now applies v8 patches
Use --gn to pass through ad-hoc gn args. --gn=is_component_build:true
translates to is_component_build=true.
Use --ninja to add command line options for Ninja. --ninja=j:48
translates to -j 48.
Added `widevineConfig.fakeWidevineCdmLibFilePath`
This fixes a [warning found by lgtm](49c71729b7/files/lib/util.js).
The same operand was used twice in an if statement.
- Adds `gn-project-generators` submodule for generating Xcode projects based on gn gen json output
- Also now displays the current working directory in utils.run
* Enable widevine cdm host verification
brave_enable_cdm_host_verification build flag is introduced to enable/disable
cdm host verification during the build time. It will be set after checking several
prerequites for verification.
On MacOS, sig file is generated during the `create_dist`
In contrast to MacOS, sig file generation is done during the build step on Windows.
System python is needed for that because sig files can't be generated by python in gn.
It was very hard to use more external modules with python of gn.
Some binaries(ex, brave.exe, chrome.dll and chrome_child.dll) that are used for
cdm host verification are signed in advance to generate sig files from them
when signing is needed on Windows. And that signed files are copied during the
`create_dist` because signing again during the `create_dist` causes mismatch of generated
sig files. With this, sig files can be remained as a valid.
Signing is moved from `create_dist` step because signed binaries are
needed to generate sig files. And sig files can't be generated by gn
because of python version of depot_tools.
So, build step signes and generates sig files by system python and they
will be used by installer packaging.
script/lint.py uses GetCommonAncestorWithUpstream() returns common ancestor
with the master branch. This function returns the top_commit if the changes
have been pushed to the branch. This change fixes thelint script by passing
a base branch as an argument to the lint script to get the list of files
changed by the commit.
auditors: @bridiver, @mihaiplesa, @bsclifton
To build with bundling, we should provide widevine lib and header.
gn checkes that two files during the generation.
Header file is used by brave-core to get latest version and
download url. However, lib file isn't used by brave-core.
So, empty fake lib file is added just for gn.
Real cdm lib is downloaded and initialized when user accepts the
use of widevine.
This commit adds the --with_tags flag to gclient sync in the hopes that
doing so will fix the error while building whereby some builds will fail
due to tags not existing in some repository clones.