-
Notifications
You must be signed in to change notification settings - Fork 920
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
Make different channel apps run simultaneously on MacOS #298
Conversation
patches/chrome-common-BUILD.gn.patch
Outdated
"//printing/buildflags", | ||
"//ui/base:ui_features", | ||
] | ||
+ if (brave_chromium_build) { configs += [ "//brave/common:constants_configs" ] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to use BRAVE_PRODUCT_STRING
define in chrome_constants.cc
.
This define has different string for different channel.(Brave-Browser, Brave-Browser-Nightly)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment below
"${xpc_plist}" "CFBundleIdentifier")" | ||
|
||
+framework_plist="${framework}/Resources/Info" | ||
+framework_bundle_id="$(__CFPREFERENCES_AVOID_DAEMON=1 defaults read \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fetch id from plist because framework of different channel have different id.
(ex, org.brave.Brave.dev.framework)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this also the case with chrome?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems like we're patching some of these files to the point that we might as well have our own version of them?
--- a/chrome/common/chrome_constants.cc | ||
+++ b/chrome/common/chrome_constants.cc | ||
@@ -10,11 +10,11 @@ | ||
#define FPL FILE_PATH_LITERAL | ||
|
||
#if defined(OS_MACOSX) | ||
-#define CHROMIUM_PRODUCT_STRING "Chromium" | ||
+#define CHROMIUM_PRODUCT_STRING "Brave" | ||
+#define CHROMIUM_PRODUCT_STRING BRAVE_PRODUCT_STRING |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Framework/Helper app's name reflects PRODUCT_FULL_NAME
in BRANDING
file.
(Ex, Brave-Browser-Dev Framework.framework
, Brave-Browser-Dev Helper.app
).
Their framework/helper name is made by using CHROMIUM_PRODCUT_STRING
and PRODUCT_STRING
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we just use a chromium_src override here to redefine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure this entire patch file can be replaced with overrides cc @bbondy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@RyanJarv To sign each channel, I created cert for each channel like below because each channel has different id. |
0d042f9
to
92a2d1c
Compare
|
||
// Fetch the strings | ||
NSString* name = | ||
- LoadStringFromDataPack(branded_data_pack.get(), cur_lang, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't seem right to me because presumably this works with multi-channel chrome
|
||
executable("infoplist_strings_tool") { | ||
configs += [ "//build/config/compiler:wexit_time_destructors" ] | ||
+ configs += [ "//brave/common:constants_configs" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as other comments for BRAVE_PRODUCT_STRING
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
I was hoping to include this in the new dev-channel builds tonight, are these blockers @bridiver ? |
I'll wait on it, FYI the patches are rebased for C69 in the branch |
@bridiver , Chrome product has same problem with us. We can't run different channel chrome product simultaneously. They don't support it for now. Only one channel app(among stable, beta and dev) is visible in launch pad because they use same id(because of this, sign script patch is introduced). I'm not sure this is bug or intended behavior. Without infoplist_string patch, there is no facility for using different product name. To do this, we might have different grd files(such as brave_strings.grd, brave_dev_strings.grd and etc.) I think this PR is minimal change for supporting multi channel. |
64826d0
to
a0bdef7
Compare
I think we'll want to add "TEAM_ID=KL8N8XSYF4" in the branding files. This was added recently for entitlements during signing upstream Edit: Well I suppose they just added |
@RyanJarv Thanks for checking this. I added it to all BRANDING files. |
To execute different channel apps simultaneously, each app should have different app name and different id. This PR added different BRANDING files for each channel because Brave on MacOS refers BRANDING file to get unique app name and id.
Each channel app should have different bundle id to install/run them simultaneously.
Brave browser should show product name that includes channel because different channel apps can be run simultaneously. To do this, BRAVE_PRODUCT_STRING is set to CFBundleDisplayName in localized infoplist string instead of using IDS_PRODUCT_NAME only.
This property is newly introduced in C69.
7a24535
to
061c53b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@bridiver if you have more comments pls just post an issue or ask @simonhong to here and he'll do them as a follow up.
Changes: ``` * cee363d - (44 minutes ago) Merge pull request #314 from brave/revert-sync-master — Pete Miller (HEAD -> master, origin/master, origin/HEAD) |\ | * 0ca4b73 - (56 minutes ago) Revert "sync v2" — Cezar Augusto | * a479cea - (56 minutes ago) Revert "Merge pull request #308 from brave/sync_img" — Cezar Augusto |/ * dd46eab - (19 hours ago) Merge pull request #247 from brave/c71-clock-period — Pete Miller |\ | * 20d2a61 - (7 weeks ago) Fix NTP clock for c71 — petemill (origin/c71-clock-period, c71-clock-period) * | 69a3399 - (19 hours ago) Merge pull request #305 from ryanml/android-rewards-title-fix — Pete Miller |\ \ | |/ |/| | * d92ce8f - (7 days ago) Fixing rewards toggle for long translations — ryanml (ryanml/android-rewards-title-fix, android-rewards-title-fix) |/ * 4692dfd - (25 hours ago) readme typos — Ross Moody * ca3e285 - (29 hours ago) Merge pull request #312 from emerick/rewards-backup-wallet-notification — Nejc Zdovc |\ | * 4dda1bc - (4 days ago) Add support for backupWallet notification — Emerick Rogul * | 0a5f56e - (4 days ago) Emoji Life — Ross Moody * | be16816 - (4 days ago) Readme formatting — Ross Moody * | 35b166d - (4 days ago) Brave UI Logo — Ross Moody * | fddeb8a - (4 days ago) Merge pull request #311 from brave/now-deploy-static — Cezar Augusto |\ \ | * | 6685301 - (5 days ago) Use new static deploy config for now instead of docker — petemill (origin/now-deploy-static, now-deploy-static) * | | eb49e8b - (4 days ago) remove list from README file — Cezar Augusto * | | 59eae8d - (4 days ago) remove outdated docs — Cezar Augusto * | | f04fecc - (4 days ago) do not count first letter if space in textareaclipboard — Cezar Augusto | |/ |/| * | 7ea9178 - (5 days ago) Merge pull request #308 from brave/sync_img — Cezar Augusto |\ \ | * | 470233f - (6 days ago) make sync images exportable — Cezar Augusto | |/ * | aa520cf - (5 days ago) Merge pull request #309 from brave/welcome_img — Pete Miller |\ \ | * | 870d3ba - (6 days ago) animation dial in — Ross Moody (origin/welcome_img, welcome_img) | * | 1c2525b - (6 days ago) make welcome page images exportable — Cezar Augusto | |/ * | 96ccb12 - (6 days ago) Merge pull request #307 from kirkins/patch-1 — Ryan Lanese |\ \ | * | f98a665 - (6 days ago) small typo — Philip Kirkbride * | | f3c38e1 - (6 days ago) v0.36.0 — ryanml (tag: v0.36.0) |/ / * | 46b3501 - (6 days ago) Merge pull request #304 from ryanml/disabled-panel — Nejc Zdovc |\ \ | * | 6be56a3 - (7 days ago) Adding disabledPanel component — ryanml (ryanml/disabled-panel) |/ / * | 79b16fb - (6 days ago) Merge pull request #299 from ryanml/fix-298 — Nejc Zdovc |\ \ | |/ |/| | * c79530c - (12 days ago) Fixes #298, uses string type for amount/tokens — ryanml (ryanml/fix-298, fix-298) * 6bf8054 - (8 days ago) v0.35.0 — Cezar Augusto (tag: v0.35.0, now-deploy-reliable) * 3535427 - (3 weeks ago) sync v2 — Cezar Augusto * 10f07c0 - (9 days ago) Merge pull request #300 from brave/site-banner-icon — Ryan Lanese |\ | * da3cc4b - (11 days ago) Site banner icon update — Ross Moody * 9064f12 - (9 days ago) Merge pull request #301 from emerick/rewards-insufficient-funds-notification — Ryan Lanese * 5300262 - (11 days ago) Add support for insufficientFunds notification — Emerick Rogul ```
To execute different channel apps simultaneously, each app should
have different app name and different id.
This PR added different BRANDING files for each channel because
Brave on MacOS refers BRANDING file to get unique app name and id.
Issue brave/brave-browser#469
Did all four channel apps installation and execution simultaneously.

Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Create multiple channel dmg and install/run them.
Reviewer Checklist: