-
Notifications
You must be signed in to change notification settings - Fork 0
/
builder.config.ts
55 lines (49 loc) · 1.22 KB
/
builder.config.ts
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
49
50
51
52
53
54
55
/**
* electron-builder configuration
* https://www.electron.build/configuration/configuration
*/
import path from 'path'
import { Configuration, CliOptions } from 'electron-builder'
import devConfig from './dev.config'
const ICON_ICO = path.resolve(__dirname, '../assets/app-icon/icon/icon.ico')
const ICON_ICNS = path.resolve(__dirname, '../assets/app-icon/icon/icon.icns')
const {
npm_package_name: productName,
npm_package_buildVersion: buildVersion,
npm_package_appId: appId,
npm_package_version: version,
} = process.env
const config: Configuration = {
productName,
buildVersion,
appId,
files: ['dist', 'assets', 'package.json'],
asar: false,
directories: {
buildResources: 'assets',
output: path.join(devConfig.release, `${productName}-release-${version}.${buildVersion}`),
},
win: {
icon: ICON_ICO,
target: ['nsis', 'msi'],
},
mac: {
icon: ICON_ICNS,
},
dmg: {
icon: ICON_ICNS,
contents: [
{ x: 130, y: 220 },
{ x: 410, y: 220, type: 'link', path: '/Applications' },
],
},
linux: {
icon: ICON_ICNS,
target: ['deb', 'rpm', 'AppImage'],
category: 'Development',
},
}
const packageConfig: CliOptions = {
config,
}
export default packageConfig