Add flatpak packaging target
electron-builder already bundles @malept/flatpak-bundler, so this just adds the target + a finishArgs set matching the app's actual needs: wayland/x11 rendering, PipeWire for WebRTC screen/mic capture (on top of the base pulseaudio socket), camera device access, and the freedesktop notifications + portal bus names (native/linux-portals handles file chooser/background/global-shortcuts through the latter). Bumped runtime/base to 23.08 from electron-builder's very old 20.08 default. Building this target requires flatpak + flatpak-builder installed on the build machine (Linux-only, can't run on macOS at all), plus the org.freedesktop.Platform/Sdk and org.electronjs.Electron2.BaseApp 23.08 runtimes from Flathub.
This commit is contained in:
@@ -1256,11 +1256,38 @@ module.exports = {
|
||||
target: 'tar.gz',
|
||||
arch: targetArchs,
|
||||
},
|
||||
{
|
||||
target: 'flatpak',
|
||||
arch: targetArchs,
|
||||
},
|
||||
],
|
||||
desktop: {
|
||||
entry: linuxDesktopEntry,
|
||||
},
|
||||
},
|
||||
flatpak: {
|
||||
runtimeVersion: '23.08',
|
||||
baseVersion: '23.08',
|
||||
finishArgs: [
|
||||
// Wayland/X11 rendering
|
||||
'--socket=wayland',
|
||||
'--socket=x11',
|
||||
'--share=ipc',
|
||||
// OpenGL
|
||||
'--device=dri',
|
||||
// Camera (native/mac-* equivalents on Linux go through /dev/video*)
|
||||
'--device=all',
|
||||
// Audio output + WebRTC screen/mic capture via PipeWire
|
||||
'--socket=pulseaudio',
|
||||
'--socket=pipewire',
|
||||
'--filesystem=home',
|
||||
'--share=network',
|
||||
// System notifications
|
||||
'--talk-name=org.freedesktop.Notifications',
|
||||
// XDG portals (file chooser, background, global shortcuts -- see native/linux-portals)
|
||||
'--talk-name=org.freedesktop.portal.Desktop',
|
||||
],
|
||||
},
|
||||
deb: {
|
||||
packageCategory: 'net',
|
||||
desktop: {
|
||||
|
||||
Reference in New Issue
Block a user