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

Cooker 0.7.0b icenine451
This commit is contained in:
icenine451 2023-04-27 16:55:07 -04:00 committed by GitHub
commit c92a825c83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 98 additions and 57 deletions

View file

@ -0,0 +1,3 @@
false^RPCS3 Firmware Install^Install firmware needed for PS3 emulation^rpcs3_firmware
false^RetroDECK Controller Profile^Install custom RetroDECK controller profile^rd_controller_profile
false^RetroDECK Prepackaged Games^Install freely availble games that are packaged with RetroDECK^rd_prepacks

View file

@ -63,7 +63,7 @@
<bool name="ScraperExcludeRecursively" value="true" />
<bool name="ScraperHaltOnInvalidMedia" value="false" />
<bool name="ScraperIncludeFolders" value="true" />
<bool name="ScraperInteractive" value="false" />
<bool name="ScraperInteractive" value="true" />
<bool name="ScraperOverwriteData" value="false" />
<bool name="ScraperRegionFallback" value="true" />
<bool name="ScraperRespectExclusions" value="true" />

View file

@ -1223,12 +1223,6 @@ prepare_emulator() {
dir_prep "$themes_folder" "/var/config/emulationstation/.emulationstation/themes"
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists"
cp -f /app/retrodeck/es_settings.xml /var/config/emulationstation/.emulationstation/es_settings.xml
# RetroDECK prepack metadata
mkdir -p "/var/config/emulationstation/.emulationstation/gamelists/doom"
cp "/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/"
fi
if [[ "$action" == "postmove" ]]; then
dir_prep "$roms_folder" "/var/config/emulationstation/ROMs"
@ -1261,7 +1255,7 @@ prepare_emulator() {
mkdir -pv /var/config/retroarch/config/
cp -rf $emuconfigs/retroarch/core-overrides/* /var/config/retroarch/config
dir_prep "$borders_folder" "/var/config/retroarch/borders"
cp -rt "/var/config/retroarch/borders/" "/app/retrodeck/emu-configs/retroarch/borders/*"
cp -rt /var/config/retroarch/borders/ /app/retrodeck/emu-configs/retroarch/borders/*
set_setting_value "$raconf" "savefile_directory" "$saves_folder" "retroarch"
set_setting_value "$raconf" "savestate_directory" "$states_folder" "retroarch"
set_setting_value "$raconf" "screenshot_directory" "$screenshots_folder" "retroarch"
@ -1429,27 +1423,28 @@ prepare_emulator() {
mkdir -p "$multi_user_data_folder/$SteamAppUser/data/duckstation/"
cp -fv $emuconfigs/duckstation/* "$multi_user_data_folder/$SteamAppUser/data/duckstation"
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "SearchDirectory" "$bios_folder" "duckstation" "BIOS"
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "Card1Path" "$saves_folder/duckstation/shared_card_1.mcd" "duckstation" "MemoryCards"
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "Card2Path" "$saves_folder/duckstation/shared_card_2.mcd" "duckstation" "MemoryCards"
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "Directory" "$saves_folder/duckstation" "duckstation" "MemoryCards"
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "Card2Path" "$saves_folder/psx/duckstation/memcards/shared_card_2.mcd" "duckstation" "MemoryCards"
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "Directory" "$saves_folder/psx/duckstation/memcards" "duckstation" "MemoryCards"
dir_prep "$multi_user_data_folder/$SteamAppUser/config/duckstation" "/var/config/duckstation"
else # Single-user actions
rm -rf /var/config/duckstation
mkdir -p /var/data/duckstation/
cp -fv $emuconfigs/duckstation/* /var/data/duckstation
set_setting_value "$duckstationconf" "SearchDirectory" "$bios_folder" "duckstation" "BIOS"
set_setting_value "$duckstationconf" "Card1Path" "$saves_folder/duckstation/shared_card_1.mcd" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Card2Path" "$saves_folder/duckstation/shared_card_2.mcd" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Directory" "$saves_folder/duckstation" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Card2Path" "$saves_folder/psx/duckstation/memcards/shared_card_2.mcd" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Directory" "$saves_folder/psx/duckstation/memcards" "duckstation" "MemoryCards"
fi
dir_prep "$saves_folder/duckstation" "/var/data/duckstation/memcards" # TODO: This shouldn't be needed anymore, verify
dir_prep "$states_folder/duckstation" "/var/data/duckstation/savestates" # TODO: This shouldn't be needed anymore, verify
dir_prep "$saves_folder/psx/duckstation/memcards" "/var/data/duckstation/memcards" # TODO: This shouldn't be needed anymore, verify
dir_prep "$states_folder/psx/duckstation" "/var/data/duckstation/savestates" # This is hard-coded in Duckstation, always needed
fi
if [[ "$action" == "postmove" ]]; then # Run only post-move commands
set_setting_value "$duckstationconf" "SearchDirectory" "$bios_folder" "duckstation" "BIOS"
set_setting_value "$duckstationconf" "Card1Path" "$saves_folder/duckstation/shared_card_1.mcd" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Card2Path" "$saves_folder/duckstation/shared_card_2.mcd" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Directory" "$saves_folder/duckstation" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Card2Path" "$saves_folder/psx/duckstation/memcards/shared_card_2.mcd" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Directory" "$saves_folder/psx/duckstation/memcards" "duckstation" "MemoryCards"
dir_prep "$states_folder/psx/duckstation" "/var/data/duckstation/savestates" # This is hard-coded in Duckstation, always needed
fi
fi
@ -1609,16 +1604,16 @@ 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/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"
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/rpcs3"'^' "$rpcs3vfsconf"
set_setting_value "$rpcs3vfsconf" "/games/" "$roms_folder/ps3" "rpcs3"
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
@ -1768,9 +1763,15 @@ prepare_emulator() {
}
update_rpcs3_firmware() {
(
mkdir -p "$roms_folder/ps3/tmp"
chmod 777 "$roms_folder/ps3/tmp"
wget "$rpcs3_firmware" -P "$roms_folder/ps3/tmp/"
) |
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK RPCS3 Firmware Download" \
--text="RetroDECK downloading the RPCS3 firmware, please wait."
rpcs3 --installfw "$roms_folder/ps3/tmp/PS3UPDAT.PUP"
rm -rf "$roms_folder/ps3/tmp"
}
@ -1811,11 +1812,6 @@ easter_eggs() {
cp -f "$new_splash_file" "$current_splash_file" # Deploy assigned splash screen
}
tools_init() {
mkdir -pv /var/config/emulationstation/.emulationstation/gamelists/tools/
cp -fv /app/retrodeck/tools-gamelist.xml /var/config/emulationstation/.emulationstation/gamelists/tools/gamelist.xml
}
start_retrodeck() {
easter_eggs # Check if today has a surprise splashscreen and load it if so
# normal startup
@ -1859,6 +1855,29 @@ do
done
}
finit_user_options_dialog() {
finit_available_options=()
while IFS="^" read -r enabled option_name option_desc option_tag
do
finit_available_options=("${finit_available_options[@]}" "$enabled" "$option_name" "$option_desc" "$option_tag")
done < $finit_options_list
local choices=$(zenity \
--list --width=1200 --height=720 \
--checklist --hide-column=4 --ok-label="Confirm Selections" --extra-button="Enable All" \
--separator=" " --print-column=4 \
--text="Choose which options to enable:" \
--column "Enabled?" \
--column "Option" \
--column "Description" \
--column "option_flag" \
"${finit_available_options[@]}")
echo "${choices[*]}"
}
finit() {
# Force/First init, depending on the situation
@ -1935,40 +1954,37 @@ finit() {
conf_write # Write the new values to retrodeck.cfg
local finit_options_choices=$(zenity \
--list --width=1200 --height=720 \
--checklist --hide-column=4 --ok-label="Confirm Selections" --extra-button="Enable All" \
--separator=" " --print-column=4 \
--text="Choose which options to enable:" \
--column "Enabled?" \
--column "Option" \
--column "Description" \
--column "option_flag" \
"${finit_options_list[@]}" )
configurator_generic_dialog "RetroDECK Initial Setup" "The next dialog will be a list of optional actions to take during the initial setup.\n\nIf you choose to not do any of these now, they can be done later through the Configurator."
local finit_options_choices=$(finit_user_options_dialog)
if [[ "$finit_options_choices" =~ (rpcs3_firmware|Enable All) ]]; then # Additional information on the firmware install process, as the emulator needs to be manually closed
configurator_generic_dialog "RPCS3 Firmware Install" "You have chosen to install the RPCS3 firmware during the RetroDECK first setup.\n\nThis process will take several minutes and requires network access.\n\nRPCS3 will be launched automatically at the end of the RetroDECK setup process.\nOnce the firmware is installed, please close the emulator to finish the process."
fi
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" \
--text="RetroDECK will now install the needed files, which can take up to one minute.\nRetroDECK will start once the process is completed.\n\nPress OK to continue."
(
prepare_emulator "reset" "all"
tools_init
# Optional actions based on user choices
if [[ "$finit_options_choices" =~ (rpcs3_firmware|Enable All) ]]; then
update_rpcs3_firmware
if [[ $(check_network_connectivity) == "true" ]]; then
update_rpcs3_firmware
fi
fi
if [[ "$finit_options_choices" =~ (rd_controller_profile|Enable All) ]]; then
rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/"
cp -f "$emuconfigs/retrodeck/defaults/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf"
fi
# Add packaged extras, after the ROMS folder has been initialized
cp /app/retrodeck/extras/doom1.wad "$roms_folder/doom/doom1.wad" # No -f in case the user already has it
if [[ "$finit_options_choices" =~ (rd_prepacks|Enable All) ]]; then
cp /app/retrodeck/extras/doom1.wad "$roms_folder/doom/doom1.wad" # No -f in case the user already has it
mkdir -p "/var/config/emulationstation/.emulationstation/gamelists/doom"
cp "/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/"
fi
) |
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
@ -2312,7 +2328,7 @@ changelog_dialog() {
# This function will pull the changelog notes from the version it is passed (which must match the appdata version tag) from the net.retrodeck.retrodeck.appdata.xml file
# USAGE: changelog_dialog "version"
changelog=$(xmlstarlet sel -t -m "//release[@version='$1']/description" -v . -n $rd_appdata | tr -s '\n' | sed 's/^\s*//')
changelog=$(xml sel -t -m "//release[@version='$1']/description" -v . -n $rd_appdata | tr -s '\n' | sed 's/^\s*//')
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \

View file

@ -14,7 +14,8 @@ bios_checklist="$emuconfigs/defaults/retrodeck/reference_lists/bios_checklist.cf
compression_targets="$emuconfigs/defaults/retrodeck/reference_lists/compression_targets.cfg" # A config file containing supported compression types per system
zip_compressable_extensions="$emuconfigs/defaults/retrodeck/reference_lists/zip_compressable_extensions.cfg" # A config file containing every file extension that is allowed to be compressed to .zip format, because there are a lot!
easter_egg_checklist="$emuconfigs/defaults/retrodeck/reference_lists/easter_egg_checklist.cfg" # A config file listing days and times when special splash screens should show up
input_validation="$emuconfigs/defaults/retrodeck/reference_lists/input_validation.cfg" # List of valid CLI inputs
input_validation="$emuconfigs/defaults/retrodeck/reference_lists/input_validation.cfg" # A config file listing valid CLI inputs
finit_options_list="$emuconfigs/defaults/retrodeck/reference_lists/finit_options_list.cfg" # A config file listing available optional installs during finit
splashscreen_dir="/var/config/emulationstation/.emulationstation/resources/graphics/extra-splashes" # The default location of extra splash screens
current_splash_file="/var/config/emulationstation/.emulationstation/resources/graphics/splash.svg" # The active splash file that will be shown on boot
default_splash_file="/var/config/emulationstation/.emulationstation/resources/graphics/splash-orig.svg" # The default RetroDECK splash screen

View file

@ -75,6 +75,8 @@ post_update() {
# - Prepackaged DOOM!
# - Update RPCS3 vfs file contents. migrate from old location if needed
# - Disable ESDE update checks for existing installs
# - Move Duckstation saves and states to new locations
# - Clean up legacy tools files (Configurator is now accessible through the main ES-DE menu)
# - Offer user option of installing custom controller config
mkdir -p "$mods_folder"
@ -89,20 +91,22 @@ post_update() {
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists"
cp "/app/retrodeck/extras/doom1.wad" "$roms_folder/doom/doom1.wad" # No -f in case the user already has it
mkdir -p "/var/config/emulationstation/.emulationstation/gamelists/doom"
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/"
if [[ $(configurator_generic_question_dialog "RetroDECK DOOM Addition" "RetroDECK now runs DOOM!\n\nIf you would like to have this classic game added to your library, smash that Yes button!") == "true" ]]; then
cp "/app/retrodeck/extras/doom1.wad" "$roms_folder/doom/doom1.wad" # No -f in case the user already has it
mkdir -p "/var/config/emulationstation/.emulationstation/gamelists/doom"
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/"
fi
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"
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."
configurator_generic_dialog "RetroDECK 0.7.0b Upgrade" "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"
@ -115,7 +119,25 @@ post_update() {
set_setting_value $es_settings "ApplicationUpdaterFrequency" "never" "es_settings"
configurator_generic_dialog "As part of this update, we are offering a new official RetroDECK controller profile!\nIt is an optional component that helps you get the most out of RetroDECK with a new in-game radial menu for unified hotkeys across emulators.\n\nThe files need to be installed outside of the normal ~/retrodeck folder, so we wanted your permission before proceeding.\nIf you decide to not install the profile now, it can always be done later through the Configurator.\n\nThe files will be installed at the following shared Steam locations:\n\n$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/\n$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf"
if [[ -f "$saves_folder/duckstation/shared_card_1.mcd" || -f "$saves_folder/duckstation/shared_card_2.mcd" ]]; then
configurator_generic_dialog "RetroDECK 0.7.0b Upgrade" "As part of this update, the location of saves and states for Duckstation has been changed.\n\nYour files will be moved automatically, and can now be found at\n\n~.../saves/psx/duckstation/memcards/\nand\n~.../states/psx/duckstation/"
fi
mkdir -p "$saves_folder/psx/duckstation/memcards"
mv "$saves_folder/duckstation/*" "$saves_folder/psx/duckstation/memcards/"
rmdir "$saves_folder/duckstation" # File-safe folder cleanup
unlink "/var/data/duckstation/memcards"
set_setting_value "$duckstationconf" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Card2Path" "$saves_folder/psx/duckstation/memcards/shared_card_2.mcd" "duckstation" "MemoryCards"
set_setting_value "$duckstationconf" "Directory" "$saves_folder/psx/duckstation/memcards" "duckstation" "MemoryCards"
mkdir -p "$states_folder/psx"
mv -t "$states_folder/psx/" "$states_folder/duckstation"
unlink "/var/data/duckstation/savestates"
dir_prep "$states_folder/psx/duckstation" "/var/data/duckstation/savestates"
rm -rf /var/config/retrodeck/tools
rm -rf /var/config/emulationstation/.emulationstation/gamelists/tools/
configurator_generic_dialog "RetroDECK 0.7.0b Upgrade" "As part of this update, we are offering a new official RetroDECK controller profile!\nIt is an optional component that helps you get the most out of RetroDECK with a new in-game radial menu for unified hotkeys across emulators.\n\nThe files need to be installed outside of the normal ~/retrodeck folder, so we wanted your permission before proceeding.\nIf you decide to not install the profile now, it can always be done later through the Configurator.\n\nThe files will be installed at the following shared Steam locations:\n\n$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/\n$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf"
if [[ $(configurator_generic_question_dialog "RetroDECK Official Controller Profile" "Would you like to install the official RetroDECK controller profile?") == "true" ]]; then
rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/"
cp -f "$emuconfigs/retrodeck/defaults/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf"
@ -128,7 +150,6 @@ post_update() {
rsync -a "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/dolphin-emu/Load/DynamicInputTextures/"
fi
tools_init
update_splashscreens
update_rd_conf
) |

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