Skip to content

Commit

Permalink
feat: crossplatform icon config
Browse files Browse the repository at this point in the history
  • Loading branch information
aadiene committed Jul 21, 2021
1 parent 7a3d5d7 commit 4e9506a
Show file tree
Hide file tree
Showing 8 changed files with 1,108 additions and 19 deletions.
1,086 changes: 1,086 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 6 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,21 @@
},
"config": {
"forge": {
"packagerConfig": {},
"packagerConfig": {
"name": "electron-angular",
"icon": "./workspaces/electron-app/main/assets/icons/icon"
},
"makers": [
{
"name": "@electron-forge/maker-dmg",
"config": {
"name": "EAQS"
}
},
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "electron_angular_quick_start"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": []
"config": {}
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
"name": "@electron-forge/maker-squirrel"
}
],
"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion workspaces/electron-app/main/assets/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"mainLogFile": "main.log",
"mainLogLevel": "error",
"isIconAvailable": false,
"isOpenDevTools": true
"isOpenDevTools": false
}
}
14 changes: 14 additions & 0 deletions workspaces/electron-app/main/assets/icons/README.md
Original file line number Diff line number Diff line change
@@ -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.
Binary file modified workspaces/electron-app/main/assets/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions workspaces/electron-app/main/components/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e9506a

Please sign in to comment.