-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
electron-builder.js
48 lines (40 loc) · 1013 Bytes
/
electron-builder.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const {
main,
name,
version,
resources,
description,
displayName,
author: _author,
} = require('./package.json')
const { getDevFolder } = require('./bin/utils')
const author = _author?.name ?? _author
const currentYear = new Date().getFullYear()
const authorInKebabCase = author.replace(/\s+/g, '-')
const appId = `com.${authorInKebabCase}.${name}`.toLowerCase()
/** @type {import('electron-builder').Configuration} */
module.exports = {
appId,
productName: displayName,
copyright: `Copyright © ${currentYear} — ${author}`,
directories: {
app: getDevFolder(main),
output: `dist/v${version}`,
},
mac: {
icon: `${resources}/build/icons/icon.icns`,
category: 'public.app-category.utilities',
},
dmg: {
icon: false,
},
linux: {
category: 'Utilities',
synopsis: description,
target: ['AppImage', 'deb', 'pacman', 'freebsd', 'rpm'],
},
win: {
icon: `${resources}/build/icons/icon.ico`,
target: ['nsis', 'portable', 'zip'],
},
}