-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathelectron-builder-config.mjs
More file actions
95 lines (91 loc) · 2.63 KB
/
electron-builder-config.mjs
File metadata and controls
95 lines (91 loc) · 2.63 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// App is tagged with a .mjs extension to allow
import path from 'path';
import { fileURLToPath } from 'url';
/**
* electron-builder doesn't look for the APPLE_TEAM_ID environment variable for some reason.
* This workaround allows an environment variable to be added to the electron-builder.yml config
* collection. See: https://github.com/electron-userland/electron-builder/issues/7812
*/
const dirname = path.dirname(fileURLToPath(import.meta.url));
// const root = path.join(dirname, '..', '..');
const root = dirname; // redundant, but is meant to keep with the previous line
const buildDirPath = path.join(root, 'dist_electron', 'build');
const packageDirPath = path.join(root, 'dist_electron', 'bundled');
const frappeBooksConfig = {
productName: 'Frappe Books',
appId: 'io.frappe.books',
artifactName: '${productName}-v${version}-${os}-${arch}.${ext}',
asarUnpack: '**/*.node',
extraResources: [
{ from: 'log_creds.txt', to: '../creds/log_creds.txt' },
{ from: 'translations', to: '../translations' },
{ from: 'templates', to: '../templates' },
],
files: '**',
extends: null,
directories: {
output: packageDirPath,
app: buildDirPath,
},
mac: {
type: 'distribution',
artifactName: '${productName}-v${version}-mac-${arch}.${ext}',
category: 'public.app-category.finance',
icon: 'build/icon.icns',
notarize: {
teamId: process.env.APPLE_TEAM_ID || '',
},
hardenedRuntime: true,
gatekeeperAssess: false,
darkModeSupport: false,
entitlements: 'build/entitlements.mac.plist',
entitlementsInherit: 'build/entitlements.mac.plist',
publish: ['github'],
},
win: {
publisherName: 'Frappe Technologies Pvt. Ltd.',
artifactName: '${productName}-v${version}-windows-${arch}.${ext}',
signDlls: true,
icon: 'build/icon.ico',
publish: ['github'],
target: [
{
target: 'nsis',
arch: ['x64', 'ia32'],
},
{
target: 'portable',
arch: ['x64', 'ia32'],
},
],
},
nsis: {
oneClick: false,
perMachine: false,
allowToChangeInstallationDirectory: true,
installerIcon: 'build/installericon.ico',
uninstallerIcon: 'build/uninstallericon.ico',
publish: ['github'],
},
linux: {
icon: 'build/icons',
artifactName: '${productName}-v${version}-linux-${arch}.${ext}',
category: 'Finance',
publish: ['github'],
target: [
{
target: 'deb',
arch: ['x64', 'arm64'],
},
{
target: 'AppImage',
arch: ['x64'],
},
{
target: 'rpm',
arch: ['x64', 'arm64'],
},
],
},
};
export default frappeBooksConfig;