feat(flatpak): add custom desktop template and update Flatpak permissions

This commit is contained in:
Ivan committed 2026-05-02 23:11:59 -05:00
1 parent 4cd6416884
commit 531992727b
3 files changed
+27 -1

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
[Desktop Entry]
<% if (productName) { %>Name=<%= productName %>
<% } %><% if (description) { %>Comment=<%= description %>
<% } %><% if (genericName) { %>GenericName=<%= genericName %>
<% } %><% if (desktopExec) { %>Exec=<%= desktopExec %> %U
<% } %><% if (id) { %>Icon=<%= id %>
<% } %>Type=Application
StartupNotify=true
<% if (id) { %>StartupWMClass=<%= id %>
<% } %><% if (categories && categories.length) { %>Categories=<%= categories.join(';') %>;
<% } %><% if (mimeType && mimeType.length) { %>MimeType=<%= mimeType.join(';') %>;
<% } %>
+8
View File
@@ -1,6 +1,7 @@
const { FusesPlugin } = require("@electron-forge/plugin-fuses");
const { FuseV1Options, FuseVersion } = require("@electron/fuses");
const which = require("which");
const path = require("path");
function hasExecutable(name) {
return which.sync(name, { nothrow: true }) !== null;
@@ -111,6 +112,8 @@ module.exports = {
sdk: "org.freedesktop.Sdk",
base: "org.electronjs.Electron2.BaseApp",
baseVersion: "25.08",
// Custom desktop template for proper StartupWMClass
desktopTemplate: path.join(__dirname, "electron", "flatpak-desktop.ejs"),
finishArgs: [
"--share=ipc",
"--share=network",
@@ -120,8 +123,13 @@ module.exports = {
"--allow=bluetooth",
"--filesystem=home",
"--talk-name=org.freedesktop.Notifications",
"--talk-name=org.freedesktop.DBus",
"--talk-name=org.freedesktop.portal.Desktop",
"--own-name=com.sudoivan.reticulummeshchatx",
"--env=TMPDIR=/var/tmp",
"--socket=pulseaudio",
"--socket=pipewire",
"--filesystem=xdg-run/pipewire-0",
],
extraFlatpakBuilderArgs: ["--verbose"],
},
+7 -1
View File
@@ -270,7 +270,13 @@
"--device=dri",
"--allow=bluetooth",
"--filesystem=home",
"--talk-name=org.freedesktop.Notifications"
"--talk-name=org.freedesktop.Notifications",
"--talk-name=org.freedesktop.DBus",
"--talk-name=org.freedesktop.portal.Desktop",
"--own-name=com.sudoivan.reticulummeshchatx",
"--socket=pulseaudio",
"--socket=pipewire",
"--filesystem=xdg-run/pipewire-0"
]
},
"dmg": {