forked from RetroDECK/RetroDECK
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnet.retrodeck.retrodeck.yml
More file actions
400 lines (335 loc) · 16.4 KB
/
net.retrodeck.retrodeck.yml
File metadata and controls
400 lines (335 loc) · 16.4 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# ______ _ ______ _____ _____ _ __
# | ___ \ | | | _ \ ___/ __ \| | / /
# | |_/ /___| |_ _ __ ___ | | | | |__ | / \/| |/ /
# | // _ \ __| '__/ _ \| | | | __|| | | \
# | |\ \ __/ |_| | | (_) | |/ /| |___| \__/\| |\ \
# \_| \_\___|\__|_| \___/|___/ \____/ \____/\_| \_/
#
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
app-id: net.retrodeck.retrodeck
runtime: org.kde.Platform
runtime-version: '6.10'
sdk: org.kde.Sdk
command: retrodeck
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#
# Extensions
# Additional runtime components
#
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
add-extensions:
# FFmpeg libraries and extra codecs, replaces org.freedesktop.Platform.ffmpeg-full
org.freedesktop.Platform.codecs_extra.i386:
directory: lib/i386-linux-gnu/codecs-extra
version: '25.08-extra'
autodelete: false
add-ld-path: lib
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#
# finish-args
# Runtime permissions
#
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
finish-args:
# D-Bus: Prevent screen saver from activating
- --talk-name=org.freedesktop.ScreenSaver
# D-Bus: Prevent power management (sleep, suspend) actions
- --talk-name=org.freedesktop.PowerManagement.Inhibit
# D-Bus: Manage user session (systemd-logind)
- --talk-name=org.freedesktop.login1.Manager
# D-Bus: Share IPC namespace for inter-process communication
- --share=ipc
# Devices: All device access (e.g., /dev/*, used for various inputs)
- --device=all
# Devices: Bluetooth access (used for various inputs)
- --allow=bluetooth
# Filesystem: host lets users store the RetroDECK folder on external media (NAS / SD card/ HDD), permission recommended by Flathub maintainers.
- --filesystem=host
# Filesystem: Discord (For the components that has an option for Discord Rich Presence)
- --filesystem=xdg-run/app/com.discordapp.Discord:create
# Filesystem: GTK‑3 configuration (read‑only)
- --filesystem=xdg-config/gtk-3.0:ro
# Filesystem: Steam ROM Manager / Steam Integration
- --filesystem=xdg-data/Steam:rw
- --filesystem=~/.var/app/com.valvesoftware.Steam:rw
# Filesystem: Udev information (read‑only, for inputs)
- --filesystem=/run/udev:ro
# GStreamer integration
- --env=GST_PLUGIN_SYSTEM_PATH=/app/lib32/gstreamer-1.0:/app/lib/gstreamer-1.0:/usr/lib/i386-linux-gnu/gstreamer-1.0:/usr/lib/x86_64-linux-gnu/gstreamer-1.0
# Gamescope integration
- --filesystem=xdg-run/gamescope-0:ro
- --env=LD_LIBRARY_PATH=/usr/lib/extensions/vulkan/gamescope/lib
# Multi‑arch support (32‑bit libs on 64‑bit)
- --allow=multiarch
# Network
- --share=network
# Environmental Paths: MangoHud, JRE (Java based Systems), Gamescope and OBS (Disabled for now)
# - --env=PATH=/usr/lib/extensions/vulkan/MangoHud/bin/:/app/jre/bin/:/usr/lib/extensions/vulkan/gamescope/bin:/usr/lib/extensions/vulkan/OBSVkCapture/bin
# Sound: PulseAudio, PipeWire
- --socket=pulseaudio
- --filesystem=xdg-run/pipewire-0
# Wayland: Display server access, SDL window‑class, Qt platform selection
- --socket=wayland
- --env=SDL_VIDEO_WAYLAND_WMCLASS=net.retrodeck.retrodeck
- --env=QT_QPA_PLATFORM=wayland;wayland-egl;xcb
# X11: Display server access, SDL window‑class
- --socket=x11
- --env=SDL_VIDEO_X11_WMCLASS=net.retrodeck.retrodeck
# Xemu: openSUSE QEMU_AUDIO_DRV fix
- --unset-env=QEMU_AUDIO_DRV
cleanup:
# ES-DE
- /include
- /share/ffmpeg
- /lib/cmake
- /lib/pkgconfig
- /include
- /bin/glslangValidator
- /bin/zip*
- /bin/zstd*
- /lib/pkg-config
- /share/doc
- /share/gtk-doc # Steam ROM Manager
- /share/man
- /src
- '*.a'
- '*.la'
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#
# Modules
#
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
modules:
# -------------------------------------------------------------------------
# RetroDECK version module
#
# • If `version` is set to “cooker”, the build will automatically generate a
# version tag based on the current date.
# • Otherwise the exact string placed in the `version` file will be used.
# Do **not** prepend a leading “v”.
# • The version number is stored in `/app/retrodeck/version`.
#
# UPDATE STEPS FOR MAIN REPOSITORY
# ☐ Update `net.retrodeck.retrodeck.metainfo.xml` with the new version,
# release date, and changelog notes.
# -------------------------------------------------------------------------
- name: initialization
buildsystem: simple
build-commands:
- |
# Create the retrodeck directory in the Flatpak destination
mkdir -p ${FLATPAK_DEST}/retrodeck/
# Create the version file vital for RetroDECK Framework
cp version ${FLATPAK_DEST}/retrodeck/version
# Print the version number to the console
echo "Version is $(cat ${FLATPAK_DEST}/retrodeck/version)"
# Safelock to quit the build if version file is missing
if [ ! -f ${FLATPAK_DEST}/retrodeck/version ]; then
echo "Version file is missing! Terminating build."
exit 1
fi
# Initializing RO retrodeck config folder
mkdir -p ${FLATPAK_DEST}/retrodeck/graphics
mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/
mkdir -p ${FLATPAK_DEST}/retrodeck/components
sources:
- type: file
path: version
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#
# RetroDECK: Generic Modules
#
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# -------------------------------------------------------------------------
# rclone - manage files on cloud storage.
# -------------------------------------------------------------------------
- name: rclone
buildsystem: simple
build-commands:
- install -Dm755 rclone "${FLATPAK_DEST}/bin/rclone"
sources:
- type: archive
url: https://github.com/rclone/rclone/releases/download/v1.69.1/rclone-v1.69.1-linux-amd64.zip
sha256: 231841f8d8029ae6cfca932b601b3b50d0e2c3c2cb9da3166293f1c3eae7d79c
# -------------------------------------------------------------------------
# rsync - utility for transferring and synchronizing files.
# -------------------------------------------------------------------------
# Source: https://github.com/flathub/com.valvesoftware.Steam.Utility.steamtinkerlaunch/blob/master/modules/rsync.yml
- name: rsync
no-autogen: true
config-opts:
- --with-included-popt
- --with-included-zlib
- --disable-debug
sources:
- type: archive
url: https://download.samba.org/pub/rsync/src/rsync-3.4.1.tar.gz
sha256: 2924bcb3a1ed8b551fc101f740b9f0fe0a202b115027647cf69850d65fd88c52
x-checker-data:
type: anitya
project-id: 4217
stable-only: true
url-template: https://download.samba.org/pub/rsync/src/rsync-$version.tar.gz
modules:
- name: xxhash
no-autogen: true
make-install-args:
- PREFIX=${FLATPAK_DEST}
- DISPATCH=1
sources:
- type: git
url: https://github.com/Cyan4973/xxHash/
tag: v0.8.3
commit: e626a72bc2321cd320e953a0ccf1584cad60f363
x-checker-data:
type: anitya
project-id: 17583
stable-only: true
tag-template: v$version
# -------------------------------------------------------------------------
# p7zip - 7‑Zip compression utilities.
# -------------------------------------------------------------------------
- name: p7zip
no-autogen: true
sources:
- type: archive
url: https://github.com/p7zip-project/p7zip/archive/v17.04/p7zip-v17.04.tar.gz
sha256: ea029a2e21d2d6ad0a156f6679bd66836204aa78148a4c5e498fe682e77127ef
- type: shell
commands:
- sed -i 's|/usr/local|${FLATPAK_DEST}|g' makefile.common
post-install:
- mv "${FLATPAK_DEST}/bin/7za" "${FLATPAK_DEST}/bin/7z"
cleanup:
- /man
# -------------------------------------------------------------------------
# xmlstarlet - XML processor & toolkit.
# -------------------------------------------------------------------------
- name: libxml2-compat
config-opts:
- --prefix=/app/compat/xmlstarlet
- --disable-static
sources:
- type: archive
url: https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.9.tar.xz
sha256: a2c9ae7b770da34860050c309f903221c67830c86e4a7e760692b803df95143a
cleanup:
- /compat/xmlstarlet/include
- /compat/xmlstarlet/lib/pkgconfig
- /compat/xmlstarlet/share
- name: xmlstarlet
config-opts:
- --disable-static-libs
- --with-libxml-libs-prefix=/app/compat/xmlstarlet/lib
- --with-libxml-include-prefix=/app/compat/xmlstarlet/include/libxml2
- --disable-build-docs
sources:
- type: archive
url: https://downloads.sourceforge.net/xmlstar/xmlstarlet-1.6.1.tar.gz
sha256: 15d838c4f3375332fd95554619179b69e4ec91418a3a5296e7c631b7ed19e7ca
- type: shell
commands:
- cp -p /usr/share/automake-*/config.{sub,guess} .
- autoreconf -vfi
post-install:
# Include xmllint
- mv "${FLATPAK_DEST}/compat/xmlstarlet/bin/xmllint" "${FLATPAK_DEST}/bin/xmllint"
# Rename the actual binary
- mv "${FLATPAK_DEST}/bin/xml" "${FLATPAK_DEST}/bin/xml.bin"
# Create wrapper script
- |
cat > "${FLATPAK_DEST}/bin/xml" << 'EOF'
#!/bin/sh
export LD_LIBRARY_PATH="/app/compat/xmlstarlet/lib:${LD_LIBRARY_PATH}"
exec /app/bin/xml.bin "$@"
EOF
- chmod +x "${FLATPAK_DEST}/bin/xml"
- ln -s "xml" "${FLATPAK_DEST}/bin/xmlstarlet"
# -------------------------------------------------------------------------
# yq - YAML processor.
# -------------------------------------------------------------------------
- name: yq
buildsystem: simple
build-commands:
- install -Dm755 yq_linux_amd64 ${FLATPAK_DEST}/bin/yq
sources:
- type: file
url: https://github.com/mikefarah/yq/releases/download/v4.45.1/yq_linux_amd64
sha256: 654d2943ca1d3be2024089eb4f270f4070f491a0610481d128509b2834870049
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#
# RetroDECK: Internal Modules
#
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# -------------------------------------------------------------------------
# install-components - runs the RetroDECK component installer script retrodeck_builder.sh.
# -------------------------------------------------------------------------
- name: install-components
buildsystem: simple
build-commands:
- bash automation_tools/install_components.sh --cicd
sources:
- type: dir
path: .
# -------------------------------------------------------------------------
# finisher - final tidy‑up steps: move files, create icons, install desktop
# entries, copy resources, and clean up temporary bits.
# -------------------------------------------------------------------------
- name: finisher
buildsystem: simple
build-commands:
# This prevents appstream-compose to fail
- |
if [ -d ${FLATPAK_DEST}/usr ]; then
mv -n ${FLATPAK_DEST}/usr/** ${FLATPAK_DEST}/share
rm -rf ${FLATPAK_DEST}/usr
fi
# Logo, res, move graphics directory away from default location so splash can be changed after build
- cp -f res/splash.svg ${FLATPAK_DEST}/retrodeck/graphics/splash.svg
- cp -rf res/extra_splashes/ ${FLATPAK_DEST}/retrodeck/graphics
- cp -rf res/folder-iconsets ${FLATPAK_DEST}/retrodeck/graphics
- cp -f res/icon.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg
- cp -f res/icon-configurator.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.configurator.svg
- mv -f -t ${FLATPAK_DEST}/retrodeck res/binding_icons
- mv -f -t ${FLATPAK_DEST}/retrodeck res/steam_grid
# Tools
- mkdir -p ${FLATPAK_DEST}/tools
- cp -r tools/*.sh ${FLATPAK_DEST}/tools
- find ${FLATPAK_DEST}/tools -type f \( -name "*.sh" -o -name "*.py" \) -exec chmod +x {} \;
# Function libraries
- mkdir -p ${FLATPAK_DEST}/libexec
- cp -r functions/** "${FLATPAK_DEST}/libexec/"
- mv "${FLATPAK_DEST}/libexec/retrodeck.sh" "${FLATPAK_DEST}/bin/retrodeck"
- chmod +x "${FLATPAK_DEST}/bin/retrodeck"
# Desktop entries
- install -Dm755 net.retrodeck.retrodeck.desktop ${FLATPAK_DEST}/share/applications/net.retrodeck.retrodeck.desktop
- install -Dm755 net.retrodeck.retrodeck.Configurator.desktop ${FLATPAK_DEST}/share/applications/net.retrodeck.retrodeck.Configurator.desktop
# Initializing default emulator configs
- cp -r config ${FLATPAK_DEST}/retrodeck/config/
# Creating symlinks for a prettier access
- ln -s ${FLATPAK_DEST}/tools/configurator.sh ${FLATPAK_DEST}/bin/configurator
# Install MIME Type
- install -Dm 644 config/retrodeck/net.retrodeck.retrodeck.mime.xml /app/share/mime/packages/net.retrodeck.retrodeck.mime.xml
# Installing metainfo
- install -Dm 644 net.retrodeck.retrodeck.metainfo.xml ${FLATPAK_DEST}/share/metainfo/net.retrodeck.retrodeck.metainfo.xml
# Prepare codecs-extra location
- mkdir -p ${FLATPAK_DEST}/lib/i386-linux-gnu/codecs-extra
# Removing the retrodeck_function_wrapper.sh in non-cooker versions (aka main)
- |
if ! grep -q "cooker" "${FLATPAK_DEST}/retrodeck/version"; then
rm -f "${FLATPAK_DEST}/tools/retrodeck_function_wrapper.sh"
fi
# Fix for Dolphin
- ln -s "/app/retrodeck/components/dolphin/share/dolphin-emu" "/app/share/dolphin-emu"
sources:
- type: dir
path: .
- name: summary
buildsystem: simple
build-commands:
- echo "RetroDECK Flatpak build completed successfully!"
- echo "Version: $(cat ${FLATPAK_DEST}/retrodeck/version)"
- echo "Flatpak path: ${FLATPAK_DEST}"
- echo "Included components:"
- ls -1 ${FLATPAK_DEST}/retrodeck/components