RPCS3 setup updates

Cooker upgrade check updates
Add yq tool
This commit is contained in:
icenine451 2023-04-20 15:56:41 -04:00
parent 7c4b632ac8
commit 51d17ae1f3
7 changed files with 43 additions and 5 deletions

View file

@ -1574,14 +1574,17 @@ prepare_emulator() {
mkdir -pv "$multi_user_data_folder/$SteamAppUser/config/rpcs3/"
cp -fr $emuconfigs/rpcs3/* "$multi_user_data_folder/$SteamAppUser/config/rpcs3/"
# This is an unfortunate one-off because set_setting_value does not currently support settings with $ in the name.
sed -i 's^\^$(EmulatorDir): .*^$(EmulatorDir): '"$bios_folder/ps3/emudir"'^' "$multi_user_data_folder/$SteamAppUser/config/rpcs3/vfs.yml"
sed -i 's^\^$(EmulatorDir): .*^$(EmulatorDir): '"$bios_folder/rpcs3/emudir"'^' "$multi_user_data_folder/$SteamAppUser/config/rpcs3/vfs.yml"
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/rpcs3/vfs.yml" "/games/" "$roms_folder/ps3" "rpcs3"
dir_prep "$multi_user_data_folder/$SteamAppUser/config/rpcs3" "/var/config/rpcs3"
else # Single-user actions
rm -rf /var/config/rpcs3
mkdir -pv /var/config/rpcs3/
cp -fr $emuconfigs/rpcs3/* /var/config/rpcs3/
# This is an unfortunate one-off because set_setting_value does not currently support settings with $ in the name.
sed -i 's^\^$(EmulatorDir): .*^$(EmulatorDir): '"$bios_folder/ps3/emudir"'^' $rpcs3vfsconf
sed -i 's^\^$(EmulatorDir): .*^$(EmulatorDir): '"$bios_folder/rpcs3/emudir"'^' "$rpcs3vfsconf"
set_setting_value "$rpcs3vfsconf" "/games/" "$roms_folder/ps3" "rpcs3"
dir_prep "$bios_folder/rpcs3/emudir/dev_hdd0/00000001/savedata" "$saves_folder/ps3/rpcs3"
fi
# Shared actions
mkdir -p "$bios_folder/rpcs3/emudir/dev_hdd0"
@ -1590,10 +1593,12 @@ prepare_emulator() {
mkdir -p "$bios_folder/rpcs3/emudir/dev_flash2"
mkdir -p "$bios_folder/rpcs3/emudir/dev_flash3"
mkdir -p "$bios_folder/rpcs3/emudir/dev_bdvd"
mkdir -p "$bios_folder/rpcs3/emudir/dev_usb000"
fi
if [[ "$action" == "postmove" ]]; then # Run only post-move commands
# This is an unfortunate one-off because set_setting_value does not currently support settings with $ in the name.
sed -i 's^\^$(EmulatorDir): .*^$(EmulatorDir): '"$bios_folder/ps3/emudir"'^' $rpcs3vfsconf
sed -i 's^\^$(EmulatorDir): .*^$(EmulatorDir): '"$bios_folder/rpcs3/emudir"'^' "$rpcs3vfsconf"
set_setting_value "$rpcs3vfsconf" "/games/" "$roms_folder/ps3" "rpcs3"
fi
fi

View file

@ -119,6 +119,8 @@ then
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build
set_setting_value $rd_conf "update_repo" "RetroDECK-cooker" retrodeck "options"
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
update_ignore=$(curl --silent "https://api.github.com/repos/XargonWan/$update_repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
set_setting_value $rd_conf "update_ignore" "$update_ignore" retrodeck "options" # Store the latest online version to ignore for future checks, as internal version and online tag version may not match up.
fi
echo "Setting config file permissions"

View file

@ -4,7 +4,7 @@ GenericName=RetroDECK Configuration Utility
Type=Application
Comment=A handy tool to change common RetroDECK settings
Icon=net.retrodeck.retrodeck
Exec=flatpak run net.retrodeck.retrodeck --configurator
Exec=--configurator
Terminal=false
StartupNotify=false
Keywords=multi;engine;emulator;standalone;steam;deck

View file

@ -222,6 +222,15 @@ modules:
url: https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
sha256: af986793a515d500ab2d35f8d2aecd656e764504b789b66d7e1a0b727a124c44
- name: yq
buildsystem: simple
build-commands:
- cp yq_linux_amd64 ${FLATPAK_DEST}/bin/yq
sources:
- type: file
url: https://github.com/mikefarah/yq/releases/download/v4.33.3/yq_linux_amd64
sha256: 4ee662847c588c3ef2fec8bfb304e8739e3dbaba87ccb9a608d691c88f5b64dc
# ES-DE - START
# https://gitlab.com/es-de/emulationstation-de

View file

@ -73,6 +73,7 @@ post_update() {
# - Expose ES-DE gamelists folder to user at ~/retrodeck/gamelists
# - Add new sections [paths] and [options] headers to retrodeck.cfg
# - Prepackaged DOOM!
# - Update RPCS3 vfs file contents. migrate from old location if needed
mkdir -p "$mods_folder"
mkdir -p "$texture_packs_folder"
@ -91,6 +92,24 @@ post_update() {
cp -f "/app/retrodeck/rd_prepacks/doom/gamelist.xml" "/var/config/emulationstation/.emulationstation/gamelists/doom/gamelist.xml"
mkdir -p "$media_folder/doom"
unzip -oq "/app/retrodeck/rd_prepacks/doom/doom.zip" -d "$media_folder/doom/"
cp -f $emuconfigs/rpcs3/vfs.yml /var/config/rpcs3/vfs.yml
sed -i 's^\^$(EmulatorDir): .*^$(EmulatorDir): '"$bios_folder/rpcs3/emudir"'^' "$rpcs3vfsconf"
set_setting_value "$rpcs3vfsconf" "/games/" "$roms_folder/ps3" "rpcs3"
if [[ -d "$roms_folder/ps3/emudir" ]]; then # The old location exists, meaning the emulator was run at least once.
mkdir "$bios_folder/ps3/emudir"
mv "$roms_folder/ps3/emudir/*" "$bios_folder/ps3/emudir/"
rm "$roms_folder/ps3/emudir"
configurator_generic_dialog "As part of this update and due to a RPCS3 config upgrade, the files that used to exist at\n\n~/retrodeck/roms/ps3/emudir\n\nare now located at\n\n~/retrodeck/bios/rpcs3/emudir.\nYour existing files have been moved automatically."
fi
mkdir -p "$bios_folder/rpcs3/emudir/dev_hdd0"
mkdir -p "$bios_folder/rpcs3/emudir/dev_hdd1"
mkdir -p "$bios_folder/rpcs3/emudir/dev_flash"
mkdir -p "$bios_folder/rpcs3/emudir/dev_flash2"
mkdir -p "$bios_folder/rpcs3/emudir/dev_flash3"
mkdir -p "$bios_folder/rpcs3/emudir/dev_bdvd"
mkdir -p "$bios_folder/rpcs3/emudir/dev_usb000"
dir_prep "$bios_folder/rpcs3/emudir/dev_hdd0/00000001/savedata" "$saves_folder/ps3/rpcs3"
fi
# The following commands are run every time.

@ -1 +1 @@
Subproject commit 717b78093797270877ec416e58082f1c71d435d8
Subproject commit 0b1cfb79e591e10488a3262d6b38db843c39a409

View file

@ -106,6 +106,8 @@ then
echo "Config file's version is $version but the actual version is $hard_version"
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build
cooker_base_version=$(echo $hard_version | cut -d'-' -f2)
update_ignore=$(curl --silent "https://api.github.com/repos/XargonWan/$update_repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
set_setting_value $rd_conf "update_ignore" "$update_ignore" retrodeck "options" # Store the latest online version to ignore for future checks, as internal version and online tag version may not match up.
choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Upgrade" --extra-button="Don't Upgrade" --extra-button="Fresh Install" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Cooker Upgrade" \
@ -131,6 +133,7 @@ then
if grep -qF "cooker" <<< $version; then # If previously installed version was a cooker build
set_setting_value $rd_conf "update_repo" "RetroDECK" retrodeck "options"
set_setting_value $rd_conf "update_check" "false" retrodeck "options"
set_setting_value $rd_conf "update_ignore" "" retrodeck "options"
fi
post_update # Executing post update script
fi