Skip to content

Commit 99d4ee7

Browse files
committed
Copy proper app icon to /chrome/app/theme/mac/app.icns
With this, we can avoid patching chrome/BUILD.gn for this.
1 parent 2bc97a5 commit 99d4ee7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/util.js

+11
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@ 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+
let channel = config.channel
102+
if (config.debugBuild)
103+
channel = 'development'
104+
const source_icon_path = path.join(braveAppDir, 'theme', 'brave', 'mac', channel, 'app.icns')
105+
fs.copySync(source_icon_path, path.join(chromeAppDir, 'theme', 'brave', 'mac', 'app.icns'))
106+
}
96107
},
97108

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

0 commit comments

Comments
 (0)