Skip to content

Commit d5bc16f

Browse files
authored
Merge pull request #653 from brave/copy_mac_app_icon
Copy proper app icon to /chrome/app/theme/mac/app.icns
2 parents 2bc97a5 + 4f7acc4 commit d5bc16f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

lib/config.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,12 @@ Config.prototype.update = function (options) {
239239
this.officialBuild = this.buildConfig === 'Release'
240240
}
241241

242-
// In chromium src, empty string represents stable channel.
243-
if (options.channel !== 'release')
242+
if (this.debugBuild) {
243+
this.channel = 'development'
244+
} else if (options.channel !== 'release') {
245+
// In chromium src, empty string represents stable channel.
244246
this.channel = options.channel
247+
}
245248

246249
if (options.mac_signing_identifier)
247250
this.mac_signing_identifier = options.mac_signing_identifier

lib/util.js

+8
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ const util = {
9393
fs.copySync(path.join(braveComponentsDir, 'resources', 'default_200_percent', 'brave'), path.join(chromeComponentsDir, 'resources', 'default_200_percent', 'chromium'))
9494
fs.copySync(path.join(braveAppVectorIconsDir, 'vector_icons', 'brave'), path.join(chromeAppDir, 'vector_icons', 'brave'))
9595
fs.copySync(path.join(braveResourcesDir, 'settings', 'brave_page_visibility.js'), path.join(chromeResourcesDir, 'settings', 'brave_page_visibility.js'))
96+
97+
if (process.platform === 'darwin') {
98+
// Copy proper mac app icon for channel to chrome/app/theme/mac/app.icns.
99+
// Each channel's app icons are stored in brave/app/theme/$channel/app.icns.
100+
// With this copying, we don't need to modify chrome/BUILD.gn for this.
101+
fs.copySync(path.join(braveAppDir, 'theme', 'brave', 'mac', config.channel, 'app.icns'),
102+
path.join(chromeAppDir, 'theme', 'brave', 'mac', 'app.icns'))
103+
}
96104
},
97105

98106
// Chromium compares pre-installed midl files and generated midl files from IDL during the build to check integrity.

0 commit comments

Comments
 (0)