forked from siddharthvaddem/openscreen
-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathelectron-builder.json5
More file actions
216 lines (215 loc) · 7.94 KB
/
Copy pathelectron-builder.json5
File metadata and controls
216 lines (215 loc) · 7.94 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
// @see - https://www.electron.build/configuration/configuration
{
"$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",
"appId": "com.etiennelescot.openscreen",
"asar": true,
// .node binaries can't be dlopen'd from inside an asar — must live unpacked.
// onnxruntime-node distributes as a `.node` shared object that whisper.cpp
// helpers run from process spawn, so they all unpack via the same glob.
"asarUnpack": [
"**/*.node"
],
"productName": "Openscreen",
// Fails the build when compositor_view.node is older than the crates/ Rust sources. Plain
// `npm run build` does not rebuild the addon, and a stale one fails SILENTLY at runtime
// (unknown scene fields are #[serde(default)]) rather than erroring. See the script header
// and technical-documentation/engineering/build-and-packaging.md.
"beforePack": "scripts/before-pack.cjs",
"npmRebuild": true,
// sharp ships ABI-stable (napi) prebuilt binaries with bundled libvips. Building it from source
// needs a system libvips we don't provide and breaks on CI/local ("vips-cpp.42 not found"), so we
// let electron-builder use the prebuilt instead of recompiling.
"buildDependenciesFromSource": false,
"compression": "normal",
"directories": {
"output": "release/${version}"
},
"files": [
"dist",
"dist-electron",
"!*.png",
"!preview*.png",
"!*.md",
"!README.md",
"!CONTRIBUTING.md",
"!LICENSE"
],
// Asset layout contract: "wallpapers/" and "cursors/" under resourcesPath must
// align with assetBaseDir in electron/preload.ts (packaged branch).
// Native capture helpers + whisper-stt-server binaries (and their ggml
// backend sidecars) live under `electron/native/bin/<platform>-<arch>/`
// and the per-platform sections below limit them to the matching arch in
// each installer.
//
// ponytail: the STT model (ggml-small-q8_0.bin) is downloaded into the
// userData cache on first use by electron/stt/modelManager.ts, so no model
// files are bundled at build time.
"extraResources": [
// Attribution + LGPL source offer for the bundled ffmpeg DLLs and
// whisper.cpp binaries. Redistributing LGPL libraries obliges us to ship
// the notice with them, so it goes in resources/, not just in the repo.
{
"from": "THIRD-PARTY-NOTICES.md",
"to": "THIRD-PARTY-NOTICES.md"
},
{
"from": "LICENSE",
"to": "LICENSE"
},
{
"from": "public/wallpapers",
"to": "wallpapers"
},
{
"from": "public/cursors",
"to": "cursors"
}
],
"mac": {
"notarize": false,
"hardenedRuntime": true,
"entitlements": "macos.entitlements",
"entitlementsInherit": "macos.entitlements",
"target": [
{
"target": "dmg",
"arch": ["x64", "arm64"]
}
],
"icon": "icons/icons/mac/icon.icns",
"artifactName": "${productName}-Mac-${arch}-${version}-Installer.${ext}",
"extraResources": [
{
"from": "electron/native/bin",
"to": "electron/native/bin",
"filter": ["darwin-*/*"]
}
],
"extendInfo": {
"NSAudioCaptureUsageDescription": "OpenScreen needs audio capture permission to record system audio.",
"NSMicrophoneUsageDescription": "OpenScreen needs microphone access to record voice audio.",
"NSCameraUsageDescription": "OpenScreen needs camera access to record webcam video.",
"NSScreenCaptureUsageDescription": "OpenScreen needs screen recording permission to detect and capture windows.",
"NSCameraUseContinuityCameraDeviceType": true
}
},
"linux": {
"target": [
"AppImage",
"deb",
"pacman"
],
"icon": "icons/icons/png",
"artifactName": "${productName}-Linux-${version}.${ext}",
"maintainer": "Etienne Lescot <etiennelescot@gmail.com>",
"category": "AudioVideo",
"extraResources": [
{
"from": "electron/native/bin",
"to": "electron/native/bin",
// `**`, not `*`: the capture helper's ffmpeg libraries live one level
// deeper, in `linux-x64/ffmpeg/`. They are in their own directory
// because `linux-x64/` also holds the compositor addon's copies of the
// same sonames with every symbol renamed to `osff_*`, and the helper
// must not find those — see scripts/build-linux-pipewire-helper.mjs.
// A single-level filter ships a helper that cannot start.
"filter": ["linux-*/**"]
}
]
},
// Le compositeur natif rend via wgpu/Vulkan (crates/compositor/src/d3d_linux.rs).
// Sans AUCUN ICD Vulkan installé, `request_adapter` ne rend rien : pas de pilote
// GPU, et pas non plus le repli logiciel lavapipe — donc `probe()` répond `"none"`
// et l'aperçu s'ouvre sur « Aperçu indisponible sur cette machine ». Le paquet
// Mesa est ce qui garantit qu'au minimum le rastériseur logiciel existe.
//
// `depends` REMPLACE la liste par défaut d'electron-builder au lieu de s'y ajouter
// (app-builder-lib, FpmTarget.getDefaultDepends) : les entrées reprises ci-dessous
// sont donc ce défaut, verbatim, plus la nôtre en dernier. En retirer une casse le
// paquet silencieusement.
//
// L'AppImage n'a pas de mécanisme de dépendances et reste donc exposée : c'est
// pour elle que `d3d_linux::diagnose` nomme le paquet à installer.
"deb": {
"depends": [
"libgtk-3-0",
"libnotify4",
"libnss3",
"libxss1",
"libxtst6",
"xdg-utils",
"libatspi2.0-0",
"libuuid1",
"libsecret-1-0",
"mesa-vulkan-drivers"
]
},
"pacman": {
// `vulkan-swrast` est le lavapipe d'Arch ; il tire `vulkan-icd-loader` avec lui.
"depends": [
"c-ares",
"ffmpeg",
"gtk3",
"http-parser",
"libevent",
"libvpx",
"libxslt",
"libxss",
"minizip",
"nss",
"re2",
"snappy",
"libnotify",
"libappindicator-gtk3",
"vulkan-swrast"
]
},
"win": {
"target": [
"nsis"
],
"icon": "icons/icons/win/icon.ico",
"artifactName": "${productName}.Setup.${version}.${ext}",
"extraResources": [
{
"from": "electron/native/bin",
"to": "electron/native/bin",
// The static ffmpeg.exe is excluded on purpose. scripts/fetch-ffmpeg.mjs
// vendors two artifacts into this directory: the shared av*.dll set,
// which the D3D11 compositor addon dlopens at require() time and
// therefore MUST ship, and a standalone static ffmpeg.exe that nothing
// in the app spawns. Shipping it added a large binary to every Windows
// installer, plus an LGPL redistribution obligation, for a file no
// shipped code opens.
"filter": ["win32-*/*", "!win32-*/ffmpeg.exe"]
}
],
// Native D3D11 compositor addon (Windows-only). Built by
// `npm run build:native:compositor` (scripts/build-windows-compositor-addon.mjs)
// before packaging. Packed into asar, then auto-unpacked by the top-level
// `asarUnpack: ["**/*.node"]` rule to app.asar.unpacked/... — matches the
// `.asar` -> `.asar.unpacked` rewrite compositorViewService.ts's
// buildCandidatePaths() already applies for packaged builds. Appends to
// (doesn't replace) the top-level `files` list.
"files": [
"electron/native/compositor-view/build"
]
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true
},
// Microsoft Store packaging identity, from Partner Center's "Product identity" page
// (Applications et jeux > OpenScreen > Product identity).
"appx": {
"identityName": "EtienneLescot.OpenScreen",
"publisher": "CN=03B0FC8C-2067-45D9-BE82-9F15CE264B4A",
"publisherDisplayName": "Etienne Lescot",
"applicationId": "Openscreen",
"displayName": "OpenScreen",
"backgroundColor": "transparent",
"capabilities": ["runFullTrust", "microphone", "webcam"],
"languages": ["en-US", "fr-FR"],
"showNameOnTiles": true
}
}