mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 03:32:12 -08:00
icns icon no longer works as macOS platform icon (resolves #68).
This commit is contained in:
parent
8726638a23
commit
1430d0faa2
19
index.js
19
index.js
@ -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
12
package-lock.json
generated
@ -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": {
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user