Add flatpak Discord Rich Presence support

This commit is contained in:
Parnassius 2019-05-29 22:15:33 +02:00 committed by Patrick
parent f5f692d890
commit f3109cad1f

View file

@ -4,7 +4,7 @@
"runtime": "org.kde.Platform", "runtime": "org.kde.Platform",
"runtime-version": "5.12", "runtime-version": "5.12",
"sdk": "org.kde.Sdk", "sdk": "org.kde.Sdk",
"command": "dolphin-emu", "command": "dolphin-emu-wrapper",
"rename-desktop-file": "dolphin-emu.desktop", "rename-desktop-file": "dolphin-emu.desktop",
"rename-icon": "dolphin-emu", "rename-icon": "dolphin-emu",
"rename-appdata-file": "dolphin-emu.appdata.xml", "rename-appdata-file": "dolphin-emu.appdata.xml",
@ -19,6 +19,7 @@
"--talk-name=ca.desrt.dconf", "--talk-name=ca.desrt.dconf",
"--filesystem=xdg-run/dconf", "--filesystem=xdg-run/dconf",
"--filesystem=~/.config/dconf:ro", "--filesystem=~/.config/dconf:ro",
"--filesystem=xdg-run/app/com.discordapp.Discord:create",
"--env=DCONF_USER_CONFIG_DIR=.config/dconf" "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
], ],
"modules": [ "modules": [
@ -67,8 +68,10 @@
"/share/man" "/share/man"
], ],
"post-install": [ "post-install": [
"install -D dolphin-emu-wrapper /app/bin/dolphin-emu-wrapper",
"install -Dm644 appdata.xml /app/share/appdata/dolphin-emu.appdata.xml", "install -Dm644 appdata.xml /app/share/appdata/dolphin-emu.appdata.xml",
"sed -i -e 's/\"2048\"/\"512\"/g' /app/share/icons/hicolor/scalable/apps/dolphin-emu.svg" "sed -i -e 's/\"2048\"/\"512\"/g' /app/share/icons/hicolor/scalable/apps/dolphin-emu.svg",
"desktop-file-edit --set-key=Exec --set-value='/app/bin/dolphin-emu-wrapper' /app/share/applications/dolphin-emu.desktop"
], ],
"sources": [ "sources": [
{ {
@ -83,6 +86,16 @@
{ {
"type": "file", "type": "file",
"path": "appdata.xml" "path": "appdata.xml"
},
{
"type": "script",
"commands": [
"for i in {0..9}; do",
"test -S $XDG_RUNTIME_DIR/discord-ipc-$i || ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-$i;",
"done",
"dolphin-emu \"$@\""
],
"dest-filename": "dolphin-emu-wrapper"
} }
] ]
} }