icns icon no longer works as macOS platform icon (resolves #68).

This commit is contained in:
Daniel Scalzi 2020-05-23 22:21:51 -04:00
parent 8726638a23
commit 1430d0faa2
No known key found for this signature in database
GPG Key ID: D18EA3FB4B142A57
3 changed files with 18 additions and 15 deletions

View File

@ -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)

12
package-lock.json generated
View File

@ -1118,9 +1118,9 @@
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"eslint": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.0.0.tgz",
"integrity": "sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg==",
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.1.0.tgz",
"integrity": "sha512-DfS3b8iHMK5z/YLSme8K5cge168I8j8o1uiVmFCgnnjxZQbCGyraF8bMl7Ju4yfBmCuxD7shOF7eqGkcuIHfsA==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@ -3059,9 +3059,9 @@
}
},
"tslib": {
"version": "1.11.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz",
"integrity": "sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg==",
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
"dev": true
},
"tunnel": {

View File

@ -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",