Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Upgrade to electron-builder 17.1.1
Browse files Browse the repository at this point in the history
Auditors: @bsclifton, @aekeus

Electron-builder has change significantly, but we've been stuck on a
really old version 2.3.1 because it changed a lot and we didn't keep up
with the changes.

This gets us on the latest 17.1.1 which has support for NOT
rebuilding native modules, and also has things we want in the future
like Ubuntu snaps.

electron-builder added muon support here:
electron-userland/electron-builder#1404 (comment)

We currently only use electron-builder for macOS. But it's really
powerful and we should probably use it everywhere. This task is only to
get our mac back on their tip release.
  • Loading branch information
bbondy committed Apr 25, 2017
1 parent 02e8e79 commit 59a55f3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
"async": "^2.0.1",
"clipboard-copy": "^1.0.0",
"electron-localshortcut": "^0.6.0",
"electron-prebuilt": "brave/electron-prebuilt",
"electron-squirrel-startup": "brave/electron-squirrel-startup",
"file-loader": "^0.8.5",
"font-awesome": "^4.5.0",
Expand Down Expand Up @@ -149,8 +148,9 @@
"co-mocha": "^1.1.2",
"cross-env": "^3.1.4",
"css-loader": "^0.23.0",
"electron-builder": "^2.3.1",
"electron-builder": "^17.1.1",
"electron-packager": "brave/electron-packager",
"electron-prebuilt": "brave/electron-prebuilt",
"empty-port": "0.0.2",
"enzyme": "^2.6.0",
"flow-bin": "^0.22.1",
Expand Down
18 changes: 12 additions & 6 deletions res/builderConfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
{
"osx": {
"appId": "com.electron.brave",
"productName": "Brave",
"npmRebuild": false,
"mac": {
"target": "dmg"
},
"dmg": {
"title": "Brave",
"background": "background.png",
"icon": "brave_installer.icns",
"icon-size": 80,
"background": "res/background.png",
"icon": "res/brave_installer.icns",
"iconSize": 80,
"contents": [
{ "x": 438, "y": 344, "type": "link", "path": "/Applications" },
{ "x": 192, "y": 344, "type": "file" }
{ "x": 192, "y": 344, "type": "file" },
{ "x": 438, "y": 344, "type": "link", "path": "/Applications" }
]
}
}
11 changes: 5 additions & 6 deletions tools/buildInstaller.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ if (isDarwin) {

// Package it into a dmg
'cd ..',
'electron-builder "' + buildDir + '/Brave.app"' +
' --platform=osx ' +
' --out="' + outDir + '" ' +
' --config=res/builderConfig.json ' +
' --overwrite',
'build ' +
'--prepackaged="' + buildDir + '/Brave.app" ' +
'--mac=dmg ' +
' --config=res/builderConfig.json ',

// Create an update zip
// Create an update zip
'ditto -c -k --sequesterRsrc --keepParent ' + buildDir + '/Brave.app dist/Brave-' + VersionInfo.braveVersion + '.zip'
]
execute(cmds, {}, console.log.bind(null, 'done'))
Expand Down
1 change: 1 addition & 0 deletions tools/lib/versionInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ var pack = JSON.parse(fs.readFileSync('package.json', 'utf-8'))
var electronPrebuiltPack = JSON.parse(fs.readFileSync('./node_modules/electron-prebuilt/package.json', 'utf-8'))
module.exports.braveVersion = pack.version
module.exports.electronVersion = (process.env.npm_config_brave_electron_version || electronPrebuiltPack.version).replace(/-.*/, '')
module.exports.muonVersion = (process.env.npm_config_brave_electron_version || electronPrebuiltPack.version).replace(/-.*/, '')

3 comments on commit 59a55f3

@bbondy
Copy link
Member Author

@bbondy bbondy commented on 59a55f3 Apr 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed #8481

@aekeus
Copy link
Member

@aekeus aekeus commented on 59a55f3 Apr 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

@bsclifton
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

Please sign in to comment.