Set up icon for electron app
- Linux uses BrowserWindow icon option, but the filename was incorrect. - Windows and Mac use packagerConfig, which differentiates on the file extension automatically, but the file names have to be the same otherwise.main
parent
8995af743d
commit
401475e180
1
TODO.md
1
TODO.md
|
@ -157,7 +157,6 @@ Electron boilerplate stuff:
|
|||
|
||||
* [Set up Content-Security-Policy](https://electronjs.org/docs/tutorial/security)
|
||||
* Remember window position/state
|
||||
* Add icon to built executable
|
||||
* Set up autoupdating
|
||||
* Keep window hidden until loaded (`show: false`, [`ready-to-show`](https://electronjs.org/docs/api/browser-window#event-ready-to-show))
|
||||
* Ideally name the executable `jspaint.exe` instead of `JS Paint.exe`
|
||||
|
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
|
@ -27,7 +27,9 @@
|
|||
"main": "src/electron-main.js",
|
||||
"config": {
|
||||
"forge": {
|
||||
"packagerConfig": {},
|
||||
"packagerConfig": {
|
||||
"icon": "./images/icons/jspaint"
|
||||
},
|
||||
"makers": [
|
||||
{
|
||||
"name": "@electron-forge/maker-squirrel",
|
||||
|
|
|
@ -25,10 +25,10 @@ const createWindow = () => {
|
|||
minHeight: 360,
|
||||
icon: require("path").join(__dirname, "../images/icons",
|
||||
process.platform === "win32" ?
|
||||
"windows.ico" :
|
||||
"jspaint.ico" :
|
||||
process.platform === "darwin" ?
|
||||
"mac.icns" :
|
||||
"48.png"
|
||||
"jspaint.icns" :
|
||||
"48x48.png"
|
||||
),
|
||||
title: "JS Paint",
|
||||
webPreferences: {
|
||||
|
|
Loading…
Reference in New Issue