mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 14:05:39 +00:00
Merge branch 'cooker' into feat/shadps4
This commit is contained in:
commit
ff5f0575d8
17
.github/workflows/cooker-selfhosted.yml
vendored
17
.github/workflows/cooker-selfhosted.yml
vendored
|
@ -81,14 +81,19 @@ jobs:
|
|||
|
||||
# Check if the event is related to a pull request
|
||||
if [[ "$GITHUB_EVENT_NAME" == "pull_request" || "$GITHUB_EVENT_NAME" == "pull_request_target" ]]; then
|
||||
pr_number=$(echo "$GITHUB_REF" | awk -F'/' '{print $3}')
|
||||
source_branch=$(curl -s "https://api.github.com/repos/RetroDECK/RetroDECK/pulls/$pr_number" | jq -r '.head.ref')
|
||||
source_branch=${source_branch//\//-} # Replace '/' with '-' in the branch name
|
||||
# Use GITHUB_HEAD_REF to get the source branch
|
||||
source_branch="${GITHUB_HEAD_REF}"
|
||||
|
||||
# Replace '/' with '-' in the branch name
|
||||
source_branch=${source_branch//\//-}
|
||||
echo "[DEBUG] source branch is: $source_branch"
|
||||
echo "TAG=PR-$pr_number-$(echo $source_branch-${{ env.buildid }} | sed 's/\//-/g')" >> $GITHUB_ENV
|
||||
echo "MAKE_LATEST=false" >> $GITHUB_ENV # if it's a feature branch it will not marked as "latest" cooker version
|
||||
|
||||
# Generate the tag for a pull request
|
||||
echo "TAG=PR-$GITHUB_RUN_ID-$source_branch-${{ env.buildid }}" >> $GITHUB_ENV
|
||||
echo "MAKE_LATEST=false" >> $GITHUB_ENV # Not marked as the latest cooker version if it's a feature branch
|
||||
else
|
||||
TAG="$MANIFEST_VERSION-${{ env.buildid }} | sed 's/\//-/g'"
|
||||
# Generate the tag for non-pull request branches
|
||||
TAG="$MANIFEST_VERSION-${{ env.buildid }}"
|
||||
echo "TAG=$TAG" >> $GITHUB_ENV
|
||||
echo "MAKE_LATEST=true" >> $GITHUB_ENV
|
||||
fi
|
||||
|
|
|
@ -972,6 +972,12 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"ruffle": {
|
||||
"description": "Flash Games emulator",
|
||||
"name" : "Ruffle",
|
||||
"system" : "flash",
|
||||
"launch": "ruffle-rd-wrapper.sh"
|
||||
},
|
||||
"melonds": {
|
||||
"description": "MelonDS Nintendo DS Emulator",
|
||||
"name": "melonds",
|
||||
|
|
16
config/ruffle/ruffle-rdwrapper.sh
Normal file
16
config/ruffle/ruffle-rdwrapper.sh
Normal 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
|
|
@ -379,6 +379,7 @@ post_update() {
|
|||
|
||||
set_setting_value "$raconf" "libretro_info_path" "/var/config/retroarch/cores" "retroarch"
|
||||
prepare_component "reset" "shadps4"
|
||||
prepare_component "reset" "ruffle"
|
||||
|
||||
# TODO: check this
|
||||
# rm /var/config/emulationstation/.emulationstation # remving the old symlink to .emulationstation as it might be not needed anymore
|
||||
|
|
|
@ -865,6 +865,23 @@ prepare_component() {
|
|||
log i "----------------------"
|
||||
|
||||
# TODO: plceholder
|
||||
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
|
||||
|
||||
|
|
|
@ -566,6 +566,20 @@ modules:
|
|||
url: https://github.com/RetroDECK/RetroDECK-theme
|
||||
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
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
|
@ -661,6 +675,10 @@ modules:
|
|||
- cp config/gzdoom/gzdoom.sh ${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:
|
||||
- type: git
|
||||
url: THISREPO
|
||||
|
|
Loading…
Reference in a new issue