You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: linux icons from custom dir, generate missing from ICNS
24x24, 48x48, 64x64, 96x96 and 128x128 icons will be generated if missed in the ICNS
You can provide Linux icon set explicitly — create `icons` folder in the `build`
@@ -34,23 +34,27 @@ Why the two package.json structure is ideal and how it solves a lot of issues
34
34
2. When you package the app for distribution there is no need to add up to size of the app with your `devDependencies`. Here those are always not included (because reside outside the `app` directory).
35
35
36
36
# Configuration
37
+
38
+
See [options](./docs/options.md), but consider to follow simple 4-step guide outlined below at first.
39
+
37
40
## In short
38
-
1. Ensure that required fields are specified in the application `package.json`:
41
+
1. Ensure that required fields are specified in the application `package.json`:
39
42
40
-
Standard `name`, `description`, `version` and `author`.
43
+
Standard `name`, `description`, `version` and `author`.
41
44
42
-
Custom `build` field must be specified:
43
-
```json
44
-
"build": {
45
-
"app-bundle-id": "your.id",
46
-
"app-category-type": "your.app.category.type",
47
-
"iconUrl": "(windows only) A URL to an ICO file to use as the application icon, see details below"
48
-
}
49
-
```
50
-
This object will be used as a source of [electron-packager](https://www.npmjs.com/package/electron-packager#packageropts-callback) options. You can specify any other options here.
45
+
Custom `build` field must be specified:
46
+
```json
47
+
"build": {
48
+
"app-bundle-id": "your.id",
49
+
"app-category-type": "your.app.category.type",
50
+
"iconUrl": "(windows only) A URL to an ICO file to use as the application icon, see details below"
51
+
}
52
+
```
53
+
This object will be used as a source of [electron-packager](https://www.npmjs.com/package/electron-packager#packageropts-callback) options. You can specify any other options here.
51
54
52
55
2. Create directory `build` in the root of the project and put your `background.png` (OS X DMG background), `icon.icns` (OS X app icon) and `icon.ico` (Windows app icon).
53
-
Linux icon set will be generated automatically on the fly from the OS X `icns` file.
56
+
57
+
Linux icon set will be generated automatically on the fly from the OS X `icns` file (or you can put them into the `build/icons` directory — filename must contains size (e.g. `32x32.png`)).
54
58
55
59
3. Add [scripts](https://docs.npmjs.com/cli/run-script) to the development `package.json`:
56
60
```json
@@ -64,44 +68,6 @@ Why the two package.json structure is ideal and how it solves a lot of issues
64
68
65
69
4. Install [required system packages](./docs/multi-platform-build.md).
66
70
67
-
## iconUrl
68
-
Please note — [local icon file url is not accepted](https://github.com/atom/grunt-electron-installer/issues/73), must be https/http.
69
-
* If you don't plan to build windows installer, you can omit it.
70
-
* If your project repository is public on GitHub, it will be `https://raw.githubusercontent.com/${info.user}/${info.project}/master/build/icon.ico` by default.
71
-
72
-
## Distributable Format Configuration
73
-
In the development `package.json` custom `build` field can be specified to customize distributable format:
74
-
```json
75
-
"build": {
76
-
"osx": {
77
-
"title": "computed name from app package.js, you can overwrite",
78
-
"icon": "build/icon.icns",
79
-
"icon-size": 80,
80
-
"background": "build/background.png",
81
-
"contents": [
82
-
{
83
-
"x": 410,
84
-
"y": 220,
85
-
"type": "link",
86
-
"path": "/Applications"
87
-
},
88
-
{
89
-
"x": 130,
90
-
"y": 220,
91
-
"type": "file",
92
-
"path": "computed path to artifact, do not specify it - will be overwritten"
93
-
}
94
-
]
95
-
},
96
-
"win": "see https://github.com/electronjs/windows-installer#usage"
97
-
}
98
-
```
99
-
100
-
As you can see, you need to customize OS X options only if you want to provide custom `x, y`.
101
-
Don't customize paths to background and icon, — just follow conventions (if you don't want to use `build` as directory of resources — please create issue to ask ability to customize it).
102
-
103
-
See [OS X options](https://www.npmjs.com/package/appdmg#json-specification) and [Windows options](https://github.com/electronjs/windows-installer#usage).
104
-
105
71
# Auto Update
106
72
`electron-builder` produces all required artifacts:
In the development `package.json` custom `build` field can be specified to customize format:
4
+
```json
5
+
"build": {
6
+
"osx": {
7
+
"title": "computed name from the app package.js, you can overwrite",
8
+
"icon": "build/icon.icns",
9
+
"icon-size": 80,
10
+
"background": "build/background.png",
11
+
"contents": [
12
+
{
13
+
"x": 410,
14
+
"y": 220,
15
+
"type": "link",
16
+
"path": "/Applications"
17
+
},
18
+
{
19
+
"x": 130,
20
+
"y": 220,
21
+
"type": "file",
22
+
"path": "computed path to artifact, do not specify it - will be overwritten"
23
+
}
24
+
]
25
+
},
26
+
"win": "see https://github.com/electronjs/windows-installer#usage"
27
+
}
28
+
```
29
+
30
+
As you can see, you need to customize OS X options only if you want to provide custom `x, y`.
31
+
Don't customize paths to background and icon, — just follow conventions (if you don't want to use `build` as directory of resources — please create issue to ask ability to customize it).
32
+
33
+
See [OS X options](https://www.npmjs.com/package/appdmg#json-specification) and [Windows options](https://github.com/electronjs/windows-installer#usage).
34
+
35
+
Here documented only `electron-builder` specific options:
36
+
37
+
| Name | Description
38
+
| --- | ---
39
+
| <aname="iconUrl"></a>iconUrl<br/> | <p>*windows-only.* A URL to an ICO file to use as the application icon (displayed in Control Panel > Programs and Features). Defaults to the Atom icon.</p><p>Please note — [local icon file url is not accepted](https://github.com/atom/grunt-electron-installer/issues/73), must be https/http.</p><ul><li>If you don't plan to build windows installer, you can omit it.</li><li>If your project repository is public on GitHub, it will be `https://raw.githubusercontent.com/${info.user}/${info.project}/master/build/icon.ico` by default.</li></ul>
40
+
| <aname="extraResources"></a>extraResources | <p>A [glob expression](https://www.npmjs.com/package/glob#glob-primer), when specified, copy the file or directory with matching names directly into the app's directory (`Contents/Resources` for OS X).</p><p>You can use `${os}` (expanded to osx, linux or win according to current platform) and `${arch}` in the pattern.</p><p>If directory matched, all contents are copied. So, you can just specify `foo` to copy `<project_dir>/foo` directory.</p><p>May be specified in the platform options (i.e. in the `build.osx`).
0 commit comments