Skip to content

Commit

Permalink
icns icon no longer works as macOS platform icon (resolves #68).
Browse files Browse the repository at this point in the history
  • Loading branch information
dscalzi committed May 24, 2020
1 parent 8726638 commit 1430d0f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
19 changes: 11 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,19 @@ function createMenu() {
}

function getPlatformIcon(filename){
const opSys = process.platform
if (opSys === 'darwin') {
filename = filename + '.icns'
} else if (opSys === 'win32') {
filename = filename + '.ico'
} else {
filename = filename + '.png'
let ext
switch(process.platform) {
case 'win32':
ext = 'ico'
break
case 'darwin':
case 'linux':
default:
ext = 'png'
break
}

return path.join(__dirname, 'app', 'assets', 'images', filename)
return path.join(__dirname, 'app', 'assets', 'images', `${filename}.${ext}`)
}

app.on('ready', createWindow)
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"cross-env": "^7.0.2",
"electron": "^9.0.0",
"electron-builder": "^22.6.1",
"eslint": "^7.0.0"
"eslint": "^7.1.0"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 1430d0f

Please sign in to comment.