feat: crossplatform icon config
This commit is contained in:
1086
package-lock.json
generated
1086
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@@ -55,31 +55,21 @@
|
|||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"forge": {
|
"forge": {
|
||||||
"packagerConfig": {},
|
"packagerConfig": {
|
||||||
|
"name": "electron-angular",
|
||||||
|
"icon": "./workspaces/electron-app/main/assets/icons/icon"
|
||||||
|
},
|
||||||
"makers": [
|
"makers": [
|
||||||
{
|
{
|
||||||
"name": "@electron-forge/maker-dmg",
|
"name": "@electron-forge/maker-dmg",
|
||||||
"config": {
|
"config": {}
|
||||||
"name": "EAQS"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "@electron-forge/maker-squirrel",
|
|
||||||
"config": {
|
|
||||||
"name": "electron_angular_quick_start"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "@electron-forge/maker-zip",
|
|
||||||
"platforms": []
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "@electron-forge/maker-deb",
|
"name": "@electron-forge/maker-deb",
|
||||||
"config": {}
|
"config": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "@electron-forge/maker-rpm",
|
"name": "@electron-forge/maker-squirrel"
|
||||||
"config": {}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
|||||||
@@ -24,6 +24,6 @@
|
|||||||
"mainLogFile": "main.log",
|
"mainLogFile": "main.log",
|
||||||
"mainLogLevel": "error",
|
"mainLogLevel": "error",
|
||||||
"isIconAvailable": false,
|
"isIconAvailable": false,
|
||||||
"isOpenDevTools": true
|
"isOpenDevTools": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
14
workspaces/electron-app/main/assets/icons/README.md
Normal file
14
workspaces/electron-app/main/assets/icons/README.md
Normal 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
|
||||||
BIN
workspaces/electron-app/main/assets/icons/icon.icns
Normal file
BIN
workspaces/electron-app/main/assets/icons/icon.icns
Normal file
Binary file not shown.
BIN
workspaces/electron-app/main/assets/icons/icon.ico
Normal file
BIN
workspaces/electron-app/main/assets/icons/icon.ico
Normal file
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 |
@@ -21,8 +21,7 @@ export class Window {
|
|||||||
width: 1280,
|
width: 1280,
|
||||||
height: 720,
|
height: 720,
|
||||||
backgroundColor: '#FFFFFF',
|
backgroundColor: '#FFFFFF',
|
||||||
// FIXME
|
icon: this.loadIcon(),
|
||||||
// icon: this.loadIcon(),
|
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
// Default behavior in Electron since 5, that
|
// Default behavior in Electron since 5, that
|
||||||
// limits the powers granted to remote content
|
// limits the powers granted to remote content
|
||||||
|
|||||||
Reference in New Issue
Block a user