Merge pull request #318 from icenine451/cooker-0.7.0b-icenine451

Cooker 0.7.0b icenine451
This commit is contained in:
icenine451 2023-04-21 10:17:28 -04:00 committed by GitHub
commit cb547e93ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 51 additions and 13 deletions

View file

@ -1,4 +1,4 @@
$(EmulatorDir): RETRODECKHOMEDIR/bios/rpcs3/emudir/
$(EmulatorDir): RETRODECKHOMEDIR/bios/rpcs3/
/dev_hdd0/: $(EmulatorDir)dev_hdd0/
/dev_hdd1/: $(EmulatorDir)dev_hdd1/
/dev_flash/: $(EmulatorDir)dev_flash/
@ -47,4 +47,4 @@ $(EmulatorDir): RETRODECKHOMEDIR/bios/rpcs3/emudir/
Path: ""
Serial: ""
VID: ""
PID: ""
PID: ""

View file

@ -1574,26 +1574,31 @@ 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"'^' "$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"'^' "$rpcs3vfsconf"
set_setting_value "$rpcs3vfsconf" "/games/" "$roms_folder/ps3" "rpcs3"
dir_prep "$bios_folder/rpcs3/dev_hdd0/home/00000001/savedata" "$saves_folder/ps3/rpcs3"
fi
# Shared actions
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/dev_hdd0"
mkdir -p "$bios_folder/rpcs3/dev_hdd1"
mkdir -p "$bios_folder/rpcs3/dev_flash"
mkdir -p "$bios_folder/rpcs3/dev_flash2"
mkdir -p "$bios_folder/rpcs3/dev_flash3"
mkdir -p "$bios_folder/rpcs3/dev_bdvd"
mkdir -p "$bios_folder/rpcs3/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"'^' "$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

@ -221,6 +221,15 @@ modules:
- type: file
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"'^' "$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/rpcs3"
mv "$roms_folder/ps3/emudir/*" "$bios_folder/rpcs3/"
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.\nYour existing files have been moved automatically."
fi
mkdir -p "$bios_folder/rpcs3/dev_hdd0"
mkdir -p "$bios_folder/rpcs3/dev_hdd1"
mkdir -p "$bios_folder/rpcs3/dev_flash"
mkdir -p "$bios_folder/rpcs3/dev_flash2"
mkdir -p "$bios_folder/rpcs3/dev_flash3"
mkdir -p "$bios_folder/rpcs3/dev_bdvd"
mkdir -p "$bios_folder/rpcs3/dev_usb000"
dir_prep "$bios_folder/rpcs3/dev_hdd0/home/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