-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathelectron-builder-config.js
More file actions
134 lines (131 loc) · 4.22 KB
/
Copy pathelectron-builder-config.js
File metadata and controls
134 lines (131 loc) · 4.22 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
const dotenv = require("dotenv");
dotenv.config();
function productNameByWorkflow() {
if (process.env.VITE_BUILD_ENV == "nightly") {
return "grid-editor-nightly";
} else {
return "grid-editor";
}
}
const config = {
asar: true,
appId: "intechstudio.grid-editor.app",
productName: productNameByWorkflow(),
copyright: "Copyright © Intech Studio Ltd.",
generateUpdatesFilesForAllChannels: true,
directories: {
output: "build/",
buildResources: "build-assets",
},
protocols: [
{
name: "grid-editor-protocol",
schemes: ["grid-editor", "grid-editor-dev"],
},
],
extraResources: [
{
from: "src/renderer/assets/**/*",
to: "assets",
},
],
files: ["**/*"],
win: {
azureSignOptions: {
publisherName: "Intech Studio LLC",
endpoint: "https://weu.codesigning.azure.net/",
certificateProfileName: "intechstudio",
codeSigningAccountName: "grid-editor",
},
publish: [
{
provider: "github",
owner: "intechstudio",
repo: "grid-editor",
},
],
artifactName: "${name}-windows-${version}-x64.${ext}",
target: ["nsis"],
icon: "build-assets/icon.png",
},
linux: {
// AppImage stays the default target so `npm run export` behaves exactly
// as before. The flatpak target is selected explicitly via
// `electron-builder --linux flatpak` (see e:builder:flatpak script),
// so it never runs implicitly on machines without flatpak-builder.
target: "AppImage",
artifactName: "${name}-linux-${version}.${ext}",
category: "Audio",
synopsis: "Editor software for Intech Studio Grid controllers",
desktop: {
entry: {
StartupWMClass: productNameByWorkflow(),
},
},
},
flatpak: {
// NOTE: the flatpak app ID is derived from appId
// ("intechstudio.grid-editor.app"). flatpak-builder accepts it, but if
// you ever submit to Flathub you will need a compliant reverse-DNS ID
// (e.g. "studio.intech.GridEditor") and a native manifest instead.
artifactName: "${name}-linux-${version}-${arch}.${ext}",
runtime: "org.freedesktop.Platform",
runtimeVersion: "25.08",
sdk: "org.freedesktop.Sdk",
base: "org.electronjs.Electron2.BaseApp",
baseVersion: "25.08",
branch: "stable",
// finishArgs REPLACES electron-builder's defaults, so the full set is
// listed here on purpose.
finishArgs: [
// Windowing / rendering
"--socket=x11",
"--socket=wayland",
"--share=ipc",
"--device=dri",
// D-Bus session bus: required by zypak-helper (the Electron zygote wrapper
// in Electron2.BaseApp) to negotiate the sandbox strategy. Without this,
// zypak aborts on systems where dbus is built without X11 autolaunch
// (e.g. Debian/Ubuntu >= 23.04). Must be listed before other sockets.
// Reported by @benblaise-intech
"--socket=session-bus",
// Sound (Web MIDI on Linux goes through the ALSA sequencer; pulseaudio
// socket also covers any audio the app or packages produce)
"--socket=pulseaudio",
// Networking (auth, profile cloud, firmware/library downloads, ws)
"--share=network",
// USB serial access for Grid/Knot (ttyACM enumeration in Chromium's
// Web Serial needs raw /dev + udev; the USB portal is not sufficient
// for CDC serial, so --device=all is the required, standard approach)
"--device=all",
// UF2 bootloader drives: firmware.ts scans and writes to these mounts
"--filesystem=/media:rw",
"--filesystem=/run/media:rw",
"--filesystem=/mnt:rw",
// Profiles / user documents
"--filesystem=home",
// Desktop integration
"--talk-name=org.freedesktop.Notifications",
"--talk-name=org.kde.StatusNotifierWatcher",
],
},
mac: {
target: [
{
target: "default",
arch: ["arm64", "x64"],
},
],
artifactName: "${name}-macos-${version}-${arch}.${ext}",
icon: "build-assets/icon_mac.png",
hardenedRuntime: true,
gatekeeperAssess: false,
entitlements: "build-assets/entitlements.mac.plist",
entitlementsInherit: "build-assets/entitlements.mac.plist",
notarize: true,
},
dmg: {
sign: false,
},
};
module.exports = config;