Merge branch 'cooker' of https://github.com/RetroDECK/RetroDECK into cooker

This commit is contained in:
XargonWan 2024-08-23 23:31:44 +09:00
commit f9135435c7
5 changed files with 59 additions and 1 deletions

View file

@ -972,6 +972,12 @@
} }
] ]
}, },
"ruffle": {
"description": "Flash Games emulator",
"name" : "Ruffle",
"system" : "flash",
"launch": "ruffle-rd-wrapper.sh"
},
"melonds": { "melonds": {
"description": "MelonDS Nintendo DS Emulator", "description": "MelonDS Nintendo DS Emulator",
"name": "melonds", "name": "melonds",

View file

@ -0,0 +1,16 @@
#!/bin/sh
source /app/libexec/global.sh
create_dir "$saves_folder/ruffle"
static_invoke="--config /var/data/ruffle \
--save-directory "$saves_folder/ruffle" \
--fullscreen"
#Check if Steam Deck in Desktop Mode
if [[ $(check_desktop_mode) == "true" ]]; then
ruffle --graphics vulkan $static_invoke "$@"
else
ruffle --graphics gl --no-gui $static_invoke "$@"
fi

View file

@ -857,6 +857,24 @@ prepare_component() {
sed -i 's#RETRODECKSAVESDIR#'$saves_folder'#g' "/var/config/gzdoom/gzdoom.ini" # This is an unfortunate one-off because set_setting_value does not currently support JSON sed -i 's#RETRODECKSAVESDIR#'$saves_folder'#g' "/var/config/gzdoom/gzdoom.ini" # This is an unfortunate one-off because set_setting_value does not currently support JSON
fi fi
if [[ "$component" =~ ^(ruffle|all)$ ]]; then
component_found="true"
log i "----------------------"
log i "Prepearing Ruffle"
log i "----------------------"
rm -rf "/var/config/ruffle"
# Ruffle creates a directory with the full rom paths in it, so this is necessary
# TODO: be aware of this when multi user support will be integrated for this component
dir_prep "$saves_folder/flash" "/var/data/ruffle/SharedObjects/localhost/$roms_folder/flash"
if [[ "$action" == "postmove" ]]; then # Run only post-move commands
dir_prep "$saves_folder/flash" "/var/data/ruffle/SharedObjects/localhost/$roms_folder/flash"
fi
fi
if [[ $component_found == "false" ]]; then if [[ $component_found == "false" ]]; then
log e "Supplied component $component not found, not resetting" log e "Supplied component $component not found, not resetting"
fi fi

View file

@ -549,6 +549,20 @@ modules:
url: https://github.com/RetroDECK/RetroDECK-theme url: https://github.com/RetroDECK/RetroDECK-theme
commit: 975c41cac99d150b6ae86a1dfd19988058c69aad commit: 975c41cac99d150b6ae86a1dfd19988058c69aad
# RUFFLE - START
# https://github.com/ruffle-rs/ruffle/releases
- name: ruffle
buildsystem: simple
build-commands:
- |
cp -p ruffle "${FLATPAK_DEST}/bin/"
chmod +x "${FLATPAK_DEST}/bin/ruffle"
sources:
- type: archive
strip-components: 0
url: https://github.com/ruffle-rs/ruffle/releases/download/nightly-2024-08-09/ruffle-nightly-2024_08_09-linux-x86_64.tar.gz
sha256: d2c4c77d8426da6df8dc8b2a57565c151146464a8eec605d5faa68a297d8cad6
- name: fetch-missing-libs - name: fetch-missing-libs
buildsystem: simple buildsystem: simple
build-commands: build-commands:
@ -644,6 +658,10 @@ modules:
- cp config/gzdoom/gzdoom.sh ${FLATPAK_DEST}/bin/gzdoom.sh - cp config/gzdoom/gzdoom.sh ${FLATPAK_DEST}/bin/gzdoom.sh
- chmod +x ${FLATPAK_DEST}/bin/gzdoom.sh - chmod +x ${FLATPAK_DEST}/bin/gzdoom.sh
# RUFFLE wrapper
- cp config/ruffle/ruffle-rdwrapper.sh "${FLATPAK_DEST}/bin/ruffle-rdwrapper.sh"
- chmod +x "${FLATPAK_DEST}/bin/ruffle-rdwrapper.sh"
sources: sources:
- type: git - type: git
url: THISREPO url: THISREPO