-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathelectron-builder.json5
More file actions
150 lines (150 loc) · 4.4 KB
/
electron-builder.json5
File metadata and controls
150 lines (150 loc) · 4.4 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/**
* @see https://www.electron.build/configuration/configuration
*/
{
productName: 'Platform.Bible',
appId: 'org.paranext.PlatformBible',
copyright: 'Copyright © 2017-2025 SIL Global and United Bible Societies',
protocols: {
name: 'platform-bible',
schemes: ['platform-bible'],
},
asar: true,
asarUnpack: '**\\*.{node,dll}',
files: ['dist', 'node_modules', 'package.json'],
afterSign: '.erb/scripts/notarize.js',
mac: {
notarize: false,
target: {
target: 'default',
arch: ['universal'],
},
// Rather than creating a universal .NET build, we create one for each architecture
extraResources: [
{
from: './c-sharp/bin/Release/net8.0/publish/osx-x64/',
to: './dotnet/osx-x64/',
},
{
from: './c-sharp/bin/Release/net8.0/publish/osx-arm64/',
to: './dotnet/osx-arm64/',
},
],
// https://github.com/electron/universal?tab=readme-ov-file#skip-lipo-for-certain-binaries-in-your-universal-app
// The documentation for this option didn't seem to match the results when it was used.
// To not specify a global pattern match on everything would require listing every single .NET
// executable and DLL file in the app bundle. That isn't practical, so a global match is used.
// In addition to the .NET files, it also was unhappy about node native modules which were not
// stitched together using lipo beforehand. It's rather confusing why this option even exists.
x64ArchFiles: '**/*',
type: 'distribution',
hardenedRuntime: true,
entitlements: 'assets/entitlements.mac.plist',
entitlementsInherit: 'assets/entitlements.mac.plist',
gatekeeperAssess: false,
icon: 'assets/icon-default.icns',
darkModeSupport: true,
},
dmg: {
sign: false,
contents: [
{
x: 130,
y: 220,
},
{
x: 410,
y: 220,
type: 'link',
path: '/Applications',
},
],
},
win: {
target: ['nsis', 'nsis-web', 'portable'],
extraResources: [
{
from: './c-sharp/bin/Release/net8.0/publish/win-x64/',
to: './dotnet/',
},
],
},
linux: {
executableName: 'platform-bible',
target: ['snap'],
category: 'Development',
extraResources: [
{
from: './c-sharp/bin/Release/net8.0/publish/linux-x64/',
to: './dotnet/',
},
],
},
directories: {
app: 'release/app',
buildResources: 'assets',
output: 'release/build',
},
extraResources: ['./assets/**', { from: './extensions/dist/', to: './extensions' }],
publish: {
provider: 'github',
owner: 'paranext',
repo: 'paranext-core',
},
snap: {
// The base version needs to align with the Ubuntu runners in the GitHub Actions workflows.
// Some things are built in the host OS, and some are built in the snap environment. If they
// don't match, there will likely be compatibility issues.
base: 'core22',
category: 'Development',
environment: {
// We copy the ICU libraries to the .NET app directory to avoid snap confinement issues
// We need to allow the ICU libraries to load their dependencies from the same directory
LD_LIBRARY_PATH: '$LD_LIBRARY_PATH:.',
// Workaround for .NET bug: https://github.com/dotnet/runtime/issues/57784
DOTNET_LTTNG: '0',
// Snap changes $HOME, but we want the original home directory for compatibility reasons
HOME: '$SNAP_REAL_HOME',
// Snap confinement prevents writing to `/var/lock` which GlobalMutex normally requires
SIL_CORE_MAKE_GLOBAL_MUTEX_LOCAL_ONLY: 'true',
},
// Change from "devel" to "stable" when it's ready to be published on the snap store
grade: 'devel',
stagePackages: [
'libappindicator3-1',
'libasound2',
'libdrm2',
'libdrm-nouveau2',
'libgbm1',
'libgl1',
'libgtk-3-0',
'libnspr4',
'libnss3',
'libsecret-1-0',
'libtinfo5',
'libxss1',
],
plugs: [
'audio-playback',
'browser-support',
'desktop',
'desktop-legacy',
'gsettings',
'home',
'network',
'opengl',
'password-manager-service',
'pulseaudio',
'unity7',
'wayland',
'x11',
{
'dot-platform-bible': {
interface: 'personal-files',
read: ['$HOME/.platform.bible'],
write: ['$HOME/.platform.bible'],
},
},
],
},
}