Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building with different channels w/ different branding #10

Closed
10 tasks done
bbondy opened this issue Nov 29, 2017 · 7 comments
Closed
10 tasks done

Support building with different channels w/ different branding #10

bbondy opened this issue Nov 29, 2017 · 7 comments

Comments

@bbondy
Copy link
Member

bbondy commented Nov 29, 2017

You can find icon resources here:
https://github.com/brave/muon/tree/master/app/resources

Anthony started things here, and apparently it works for macOS.
https://github.com/brave/brave-browser/tree/multi-channel
https://github.com/brave/brave-core/tree/multi-channel

So still remaining is Linux and Windows.

You can see where we have different profile directories for each OS here:
brave/brave-core#46
brave/brave-core#59
This doc might be helpful:
https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md

We want to support 4 channels:
release, beta, developer, and canary

User directory

For official build

  • ~/Library/Application Support/BraveSoftware/Brave-Browser-Dev/Default for dev channel
  • ~/Library/Application Support/BraveSoftware/Brave-Browser-Beta/Default for beta channel
  • ~/Library/Application Support/BraveSoftware/Brave-Browser-Canary/Default for canary channel
  • ~/Library/Application Support/BraveSoftware/Brave-Browser/Default for release channel

For unofficial build

  • ~/Library/Application Support/BraveSoftware/Brave-Browser-Development/Default for all channel

TODOs

  • channel option for build command (brave-browser)
  • user dir support (brave-core)
    • MacOS
    • Windows
    • Linux
  • install dir
    • MacOS
    • Windows
    • Linux
  • app icon (brave-core)
    • MacOS
    • Windows
    • Linux
@bbondy bbondy changed the title Support building with different channel names Support building with different channels w/ different branding Nov 29, 2017
@darkdh darkdh self-assigned this Nov 29, 2017
@bbondy bbondy added this to the Milestone 2: Install and updatable builds milestone Dec 5, 2017
@simonhong
Copy link
Member

Started to study Anthony's branch.

@simonhong
Copy link
Member

simonhong commented Mar 28, 2018

User directory

For official build

  • ~/Library/Application Support/BraveSoftware/Brave-Browser-Dev/Default for dev channel
  • ~/Library/Application Support/BraveSoftware/Brave-Browser-Beta/Default for beta channel
  • ~/Library/Application Support/BraveSoftware/Brave-Browser-Nightly/Default for canary channel
  • ~/Library/Application Support/BraveSoftware/Brave-Browser/Default for release channel

For unofficial build

  • ~/Library/Application Support/BraveSoftware/Brave-Browser-Development/Default for all channel

@bbondy
Copy link
Member Author

bbondy commented Mar 28, 2018

I think that's correct, but @darkdh to confirm.

@darkdh
Copy link
Member

darkdh commented Mar 28, 2018

that's correct and use different dir for development (official_build=false)
we can either use dev or developer channel and leave development for official_build=false

@bbondy
Copy link
Member Author

bbondy commented Mar 28, 2018

~/Library/Application Support/Brave-Browser-Dev/Default for dev channel
~/Library/Application Support/Brave-Browser-Development/Default for official_build=false builds.

@simonhong
Copy link
Member

simonhong commented Mar 29, 2018

Below 5 commands needs channel info.

  • init and sync commands needs to use different tag/branch
  • build, cibuild and createDist commands need channel to set args.gn

After init, same channel should be used.
When we want to change working channel, re-run init with different channel.

Based on above, there are three ways to handle chrome's multiple tags
(I assume that different version might be used across four channels)

  1. Use one master brave-browser branch
    1.a Make package_config contains all chromium tags of four channels
    1.b Use internal server to get each channel's chromium tag
  2. Use 4 different branch of brave-browser for each channel. In this case, package_config only contains one chromium tag as-is.

IMO, option 1.a is better than others.

WDYT? @bbondy @darkdh @bridiver

@simonhong
Copy link
Member

simonhong commented Apr 4, 2018

On windows, channel info is fetched from executables path.

void InitializeProductDetailsForPrimaryModule() {
  InstallDetails::SetForProcess(MakeProductDetails(GetCurrentProcessExePath()));
}

In the startup progress of beta, Beta is fetched from
"C:\Program Files (x86)\Google\Chrome Beta\Application\chrome.exe" and appropriate InstallConstants is set as a global variable. Then, this variable is used to get various channel information on runtime.

Need to check GetDefaultUserDataDirectory() in chrome_paths_win.cc

We have copied chromium_install_modes.[h|cc] version, however, upstream version is still compiled together.
install_static_util target is including upstream version and is build as a separate library.
I need to fix this first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants