Skip to content

Commit 631969a

Browse files
committed
Attempt flatpak build
1 parent eb9e104 commit 631969a

File tree

2 files changed

+153
-0
lines changed

2 files changed

+153
-0
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,26 @@ jobs:
160160
name: ${{ steps.create-artifact.outputs.name }}
161161
path: "*.tar.xz"
162162

163+
build_flatpak:
164+
runs-on: ubuntu-latest
165+
container:
166+
image: bilelmoussaoui/flatpak-github-actions:gnome-nightly
167+
options: --privileged
168+
steps:
169+
- uses: actions/checkout@v2
170+
- name: Purge .git for space reasons
171+
run: rm -rf /home/runner/work/Project-Plus-Dolphin-src/Project-Plus-Dolphin-src/.git
172+
- name: Setup Packages
173+
run: |
174+
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo && \
175+
flatpak install org.kde.Sdk//5.15 org.kde.Platform//5.15 -y && \
176+
dnf install libusb1-devel cmake git gcc-c++ libXext-devel libgudev qt6-qtbase-devel systemd-devel openal-soft-devel libevdev-devel libao-devel SOIL-devel libXrandr-devel pulseaudio-libs-devel bluez-libs-devel p7zip SDL2-devel make automake gcc gcc-c++ kernel-devel -y
177+
- name: Run Flatpak Builder
178+
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
179+
with:
180+
manifest-path: Distribution/flatpak.yml
181+
bundle: Project-Plus-Dolphin-flatpak-linux-x86_64.flatpak
182+
163183
build_appimage:
164184
name: AppImage Build
165185
runs-on: ubuntu-24.04

Distribution/flatpak.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
app-id: org.DolphinEmu.dolphin-mpn
2+
branch: master
3+
runtime: org.kde.Platform
4+
runtime-version: 6.6
5+
sdk: org.kde.Sdk
6+
command: dolphin-mpn-wrapper
7+
rename-desktop-file: dolphin-mpn.desktop
8+
rename-icon: dolphin-mpn
9+
finish-args:
10+
- --device=all # need for controllers
11+
# the file picker uses portals but the set
12+
# game directory feature still needs this
13+
- --filesystem=host
14+
- --socket=pulseaudio
15+
- --env=QT_QPA_PLATFORM=xcb
16+
- --socket=x11
17+
- --share=network
18+
- --share=ipc
19+
# along with the bluez module, required for the
20+
# emulated bluetooth adapter feature to work.
21+
- --allow=bluetooth
22+
- --filesystem=xdg-run/app/com.discordapp.Discord:create
23+
- --talk-name=org.freedesktop.ScreenSaver
24+
# required for Gamescope on Steam Deck
25+
- --filesystem=xdg-run/gamescope-0:ro
26+
modules:
27+
# needed for the bluetooth passthrough feature to work
28+
- name: libusb
29+
config-opts:
30+
- --disable-static
31+
cleanup:
32+
- /include
33+
- /lib/*.la
34+
- /lib/pkgconfig
35+
sources:
36+
- type: archive
37+
url: https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2
38+
sha256: 12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5
39+
x-checker-data:
40+
type: anitya
41+
project-id: 1749
42+
stable-only: true
43+
url-template: https://github.com/libusb/libusb/releases/download/v$version/libusb-$version.tar.bz2
44+
45+
# needed for the emulate bluetooth adapter feature to work
46+
- name: bluez
47+
config-opts:
48+
- --enable-library
49+
- --disable-manpages
50+
- --disable-udev
51+
- --disable-tools
52+
- --disable-cups
53+
- --disable-monitor
54+
- --disable-client
55+
- --disable-systemd
56+
- --disable-a2dp
57+
- --disable-avrcp
58+
- --disable-network
59+
- --disable-obex
60+
- --disable-bap
61+
- --disable-mcp
62+
- --with-dbusconfdir=/app/etc
63+
- --with-dbussessionbusdir=/app/usr/lib/system-services
64+
sources:
65+
- type: archive
66+
url: https://www.kernel.org/pub/linux/bluetooth/bluez-5.66.tar.xz
67+
sha256: 39fea64b590c9492984a0c27a89fc203e1cdc74866086efb8f4698677ab2b574
68+
x-checker-data:
69+
type: anitya
70+
project-id: 10029
71+
stable-only: true
72+
url-template: https://www.kernel.org/pub/linux/bluetooth/bluez-$version.tar.xz
73+
74+
# enables motion controls on non-wii controllers (switch, ps4, etc)
75+
# requires a udev rule enabling Motion Sensors access
76+
- name: libevdev
77+
buildsystem: meson
78+
config-opts:
79+
- -Dtests=disabled
80+
- -Ddocumentation=disabled
81+
sources:
82+
- type: archive
83+
url: https://www.freedesktop.org/software/libevdev/libevdev-1.13.0.tar.xz
84+
sha256: 9edf2006cc86a5055279647c38ec923d11a821ee4dc2c3033e8d20e8ee237cd9
85+
x-checker-data:
86+
type: anitya
87+
project-id: 20540
88+
stable-only: true
89+
url-template: https://www.freedesktop.org/software/libevdev/libevdev-$version.tar.xz
90+
91+
# needed for screensaver inhibition
92+
- name: xdg-screensaver-shim
93+
buildsystem: meson
94+
sources:
95+
- type: archive
96+
url: https://github.com/Unrud/xdg-screensaver-shim/archive/0.0.2.tar.gz
97+
sha256: 0ed2a69fe6ee6cbffd2fe16f85116db737f17fb1e79bfb812d893cf15c728399
98+
99+
- name: dolphin-mpn
100+
buildsystem: cmake-ninja
101+
config-opts:
102+
- -DCMAKE_BUILD_TYPE=Release
103+
- -DENABLE_ALSA=OFF
104+
- -DENABLE_SDL=ON
105+
- -DENABLE_EVDEV=ON
106+
- -DDISTRIBUTOR=Mario Party Netplay
107+
- -DCPACK_PACKAGE_CONTACT=Mario Party Netplay
108+
cleanup:
109+
- /share/man
110+
post-install:
111+
- install -D -t ${FLATPAK_DEST}/bin/ dolphin-mpn-wrapper
112+
- desktop-file-edit --set-key=Exec --set-value='/app/bin/dolphin-mpn-wrapper'
113+
/app/share/applications/dolphin-mpn.desktop
114+
- desktop-file-edit --set-key=Name --set-value='Dolphin MPN'
115+
/app/share/applications/dolphin-mpn.desktop
116+
sources:
117+
- type: git
118+
url: https://github.com/MarioPartyNetplay/Dolphin-MPN-src.git
119+
120+
# detects whether dolphin is running in a flatpak sandbox
121+
# and makes it use xdg directories if it is.
122+
# prevents dolphin from attempting to write conf files
123+
# in non-writable paths, typically happens when a user
124+
# has leftover files from a previous non-flatpak install
125+
- type: script
126+
commands:
127+
- |
128+
for i in {0..9}; do
129+
test -S $XDG_RUNTIME_DIR/discord-ipc-$i ||
130+
ln -sf {app/com.discordapp.Discord,$XDG_RUNTIME_DIR}/discord-ipc-$i;
131+
done
132+
dolphin-mpn "$@"
133+
dest-filename: dolphin-mpn-wrapper

0 commit comments

Comments
 (0)