feat: crossplatform icon config

This commit is contained in:
Amadou Ada DIENE
2021-07-21 17:55:49 +02:00
parent 7a3d5d7d3a
commit 4e9506aca5
8 changed files with 1108 additions and 19 deletions

View File

@@ -24,6 +24,6 @@
"mainLogFile": "main.log",
"mainLogLevel": "error",
"isIconAvailable": false,
"isOpenDevTools": true
"isOpenDevTools": false
}
}

View File

@@ -0,0 +1,14 @@
# Install the icon generator globally
> npm i -g electron-icon-maker
# Run following command from anywhere you have your input file to generate platforms icons
> electron-icon-maker --input=icon.png --output=./out
# Rename and move files to match with next config
- ./workspaces/electron-app/main/assets/icons/icon.png for Linux
- ./workspaces/electron-app/main/assets/icons/icon.icns for MacOs
- ./workspaces/electron-app/main/assets/icons/icon.ico for Windows
x

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 231 KiB

View File

@@ -21,8 +21,7 @@ export class Window {
width: 1280,
height: 720,
backgroundColor: '#FFFFFF',
// FIXME
// icon: this.loadIcon(),
icon: this.loadIcon(),
webPreferences: {
// Default behavior in Electron since 5, that
// limits the powers granted to remote content