brave/brave-browser: Next generation Brave browser for Android, Linux, macOS, Windows.

Brave Browser

View larger

This repository includes the required build tools for Brave Desktop Browser, which can be used on macOS, Windows, or Linux. It syncs and fetches code from the package.json projects.

Downloads

To download the current stable release, you can refer to our website

You can also find other repositories

Other versions of this browser are available at:

Contributing

Refer to the contributing guidelines .

Community

You can join the Q&A Community to learn more about Brave. Ask for help. Discuss features you’d love to see. And much more. Brave is constantly improving. We would love your feedback.

Help us translate Brave to your language by submitting translations at https://www.transifex.com/brave/brave/.

Keep up with @brave Twitter feed for the latest news and announcements.

Install prerequisites

Follow these steps for setting up your platform

Clone and intialize the repo

Once the prerequisites are installed, you will be able to obtain the code and init the build environment.

git clone git@github.com:brave/brave-browser.git 

cd

Install brave-browser's npm

#

The entire process takes approximately 30-45 mins.

#

You can download the Chromium source, which includes a lot of history npm run init

run init for Android builds based on brave-core should be used --target_os=android and --target_arch=arm or any other cpu type.

It is possible to set target_os/target_arch init/build using

 NPM config Set Target_Os Android npm Config Set Target_Arch Arm 

Braveness is a virtue

This is the default build type.

# begin the component build build compile NPM run build

To do a release build:

npm runs should be used to build androids based on brave-core.

You can build configurations

It can take time to run a release build on using npm run Build, and it will use lots of RAM.

Run a statically connected build. It takes longer but builds faster.

Static

To debug a build, use component build with is_debug=true

npm run -- Debug

Brave personnel may be interested in Goma to speed up their builds.

Run Brave

For more information on how to start the build


npm start [Release|Component|Static|Debug]

Update Brave


npm run sync -- [--force] [--init] [--create] [brave_core_ref]


The script will save your local files in bravecore. It’s better to create local changes and then run the program.

npm trigger will, depending on the following flags

  1. Sub-projects, such as chrome and brave-core should be updated to the latest commit of a relevant git ref. Tag or branch
  2. Place patches
  3. Update gclient DEPS dependencies
  4. Run hooks (e.g. to execute and npm-install on children projects

flag Description

[no flags]

Patches can be re-applied and the chromium version updated if necessary. This will only apply patches to the changed chromium versions if it has not been updated. Child dependencies will be updated

If any project required updating, only during this script run


*This is for those who want the script’s management to be updated, instead of you manually switching or pulling branches. **

--create

Use with

brave_core_ref

It creates a new branch if it does not exist.

--force

updates both Chromium and brave-core to the latest remote commit for the current brave-core branch and the Chromium ref specified in brave-browser/package.json (e.g.

Master

Or

74.0.0.103

Will apply all patches again. All dependent children will need to be updated.

You can use this to make the branches return to a state they are in if you have trouble. **

--init

force update both Chromium and brave-core to the versions specified in brave-browser/package.json and force updates all dependent repos – same as

npm run init

Run with npm. To checkout the chosen brave-core reference and to modify all dependencies, including chrome, if necessary

Scenarios

Initiate a new branch

For the brave and strong

>

git checkout --b Branch_name

Or

The bravebrowser

>

npm run sync -- --create branch_name

Checkout an existing branch or tag

For the brave and strong

>

git fetch origin brave-core

>

git checkout [b] branch_name brave-core

>

npm run sync...Updating patch......Updating child dependency......Running hooks...

Or

The bravebrowser

>

npmrun sync --create Branch_name...Updating 2 Patches......Updating Child Dependencies......Running Hooks...

Change the remote to update your current branch

For the brave and strong

>

git pull bravecore

>

npm run sync...Update 2 patches......Update Child Dependencies......Running Hooks...

To reset to brave-browser master, courageous-core master and chrome

The bravebrowser

>

Master brave-browser git checkout

>

"git Pull Brave-browser"

>

npm run sync -- --init

Once you realize that DEPS was not changed, but.patch file did.

For the brave and strong

>

git checkout featureB brave-core

>

"git Pull Brave-browser"

>

NPM run apply_patches. Applying 2 patches

Third-party APIs can be enabled:

  1. Google Safe Browsing: Get an API key with SafeBrowsing API enabled from https://console.developers.google.com/. Update the GOOGLE_API_KEY environment variable with your key as per https://www.chromium.org/developers/how-tos/api-keys to enable Google SafeBrowsing.

Troubleshooting

For common problems see Troubleshooting.