Skip to content

Commit

Permalink
add grd files
Browse files Browse the repository at this point in the history
  • Loading branch information
bridiver committed Sep 6, 2018
1 parent f7db8d6 commit e26b708
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,12 @@ const util = {
const braveBrowserDir = path.join(config.projects['brave-core'].dir, 'browser')
const braveAppVectorIconsDir = path.join(config.projects['brave-core'].dir, 'vector_icons', 'chrome', 'app')

// The following 3 entries we map to the same name, not the chromium equivalent name for copying back
autoGeneratedBraveToChromiumMapping[path.join(braveAppDir, 'brave_strings.grd')] = path.join(chromeAppDir, 'brave_strings.grd')
autoGeneratedBraveToChromiumMapping[path.join(braveAppDir, 'settings_brave_strings.grdp')] = path.join(chromeAppDir, 'settings_brave_strings.grdp')
autoGeneratedBraveToChromiumMapping[path.join(braveAppDir, 'components_brave_strings.grd')] = path.join(config.srcDir, 'components', 'components_brave_strings.grd')
let fileMap = {}
fileMap[path.join(braveAppDir, 'brave_strings.grd')] = path.join(chromeAppDir, 'brave_strings.grd')
fileMap[path.join(braveAppDir, 'settings_brave_strings.grdp')] = path.join(chromeAppDir, 'settings_brave_strings.grdp')
fileMap[path.join(braveAppDir, 'components_brave_strings.grd')] = path.join(config.srcDir, 'components', 'components_brave_strings.grd')

// Copy each grd back to Chromium src dir
Object.entries(autoGeneratedBraveToChromiumMapping).forEach(([bravePath, chromiumPath]) =>
fs.copySync(bravePath, chromiumPath))

let fileMap = {}
// Copy xtb files for:
// brave/app/resources/chromium_strings*.xtb
// brave/app/strings/components_chromium_strings*.xtb
Expand Down Expand Up @@ -165,7 +161,7 @@ const util = {

const args = util.buildArgsToString(config.buildArgs())
util.run('gn', ['gen', config.outputDir, '--args="' + args + '"'], options)
util.run('ninja', ['-C', config.outputDir, config.buildTarget], options)
util.run('ninja', ['-C', config.outputDir, config.buildTarget, '-d', 'explain'], options)
},

submoduleSync: (options = {}) => {
Expand Down

0 comments on commit e26b708

Please sign in to comment.