-
Notifications
You must be signed in to change notification settings - Fork 16
/
electron-builder.js
65 lines (55 loc) · 1.45 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const { APP_CONFIG } = require('./app.config');
const { APP_ID, AUTHOR, TITLE, FOLDERS, ELECTRON_PROTOCOL } = APP_CONFIG;
const CURRENT_YEAR = new Date().getFullYear();
/**
* @type {import('electron-builder').Configuration}
*
* @see https://www.electron.build/configuration/configuration
*/
module.exports = {
appId: APP_ID,
productName: TITLE,
copyright: `Copyright © ${CURRENT_YEAR} — ${AUTHOR.name}`,
directories: {
app: FOLDERS.DEV_BUILD,
output: FOLDERS.PROD_BUILD,
},
protocols: {
name: TITLE,
schemes: [ELECTRON_PROTOCOL],
},
mac: {
category: 'public.app-category.finance',
hardenedRuntime: true,
icon: `${FOLDERS.RESOURCES}/icons/icon.png`,
entitlements: `${FOLDERS.RESOURCES}/entitlements/entitlements.mac.plist`,
extendInfo: {
NSCameraUsageDescription: 'This app requires camera access to import accounts and sign operations',
},
target: {
target: 'default',
arch: ['x64', 'arm64'],
},
},
dmg: {
icon: false,
},
linux: {
icon: `${FOLDERS.RESOURCES}/icons/icon.png`,
category: 'Finance',
target: ['AppImage'],
artifactName: 'Nova-Spektr-${version}_x86_64.AppImage',
desktop: {
mimeTypes: [`x-scheme-handler/${ELECTRON_PROTOCOL}`],
exec: `${ELECTRON_PROTOCOL} %U`,
},
},
win: {
icon: `${FOLDERS.RESOURCES}/icons/icon.ico`,
target: ['nsis'],
},
publish: {
provider: 'github',
owner: 'novasamatech',
},
};