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

Cooker 0.7.0b icenine451
This commit is contained in:
icenine451 2023-04-26 12:49:48 -04:00 committed by GitHub
commit 3bacc4e498
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10708 additions and 4 deletions

File diff suppressed because it is too large Load diff

View file

@ -723,7 +723,7 @@ check_for_version_update() {
choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Ignore this version" \ choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Ignore this version" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Update Available" \ --title "RetroDECK Update Available" \
--text="There is a new version of RetroDECK available!\n\nIf you would like to update to the new version now, click \"Yes\". If you would like to skip reminders about this version, click \"Ignore this version\".\nYou will be reminded again at the next version update.\n\nIf you would like to disable these update notifications entirely, disable Online Update Checks in the Configurator.") --text="There is a new version of RetroDECK available!\n\nIf you would like to update to the new version now, click \"Yes\".\nIf you would like to skip reminders about this version, click \"Ignore this version\".\nYou will be reminded again at the next version update.\n\nIf you would like to disable these update notifications entirely, disable Online Update Checks in the Configurator.")
rc=$? # Capture return code, as "Yes" button has no text value rc=$? # Capture return code, as "Yes" button has no text value
if [[ $rc == "1" ]]; then # If any button other than "Yes" was clicked if [[ $rc == "1" ]]; then # If any button other than "Yes" was clicked
if [[ $choice == "Ignore this version" ]]; then if [[ $choice == "Ignore this version" ]]; then
@ -731,7 +731,14 @@ check_for_version_update() {
fi fi
else # User clicked "Yes" else # User clicked "Yes"
configurator_generic_dialog "The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version." configurator_generic_dialog "The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version."
(
flatpak-spawn --host flatpak update --noninteractive -y net.retrodeck.retrodeck flatpak-spawn --host flatpak update --noninteractive -y net.retrodeck.retrodeck
) |
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 Updater" \
--text="RetroDECK is updating to the latest version, please wait."
configurator_generic_dialog "The update process is now complete!\n\nPlease restart RetroDECK to keep the fun going."
exit 1 exit 1
fi fi
elif [[ "$update_repo" == "RetroDECK-cooker" ]] && [[ ! $current_version == $online_version ]]; then elif [[ "$update_repo" == "RetroDECK-cooker" ]] && [[ ! $current_version == $online_version ]]; then
@ -746,11 +753,18 @@ check_for_version_update() {
fi fi
else # User clicked "Yes" else # User clicked "Yes"
configurator_generic_dialog "The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version." configurator_generic_dialog "The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version."
(
local latest_cooker_download=$(curl --silent https://api.github.com/repos/XargonWan/$update_repo/releases/latest | grep '"browser_download_url":' | sed -E 's/.*"([^"]+)".*/\1/') local latest_cooker_download=$(curl --silent https://api.github.com/repos/XargonWan/$update_repo/releases/latest | grep '"browser_download_url":' | sed -E 's/.*"([^"]+)".*/\1/')
mkdir -p "$rdhome/RetroDECK_Updates" mkdir -p "$rdhome/RetroDECK_Updates"
wget -P "$rdhome/RetroDECK_Updates" $latest_cooker_download wget -P "$rdhome/RetroDECK_Updates" $latest_cooker_download
flatpak-spawn --host flatpak install --user --bundle --noninteractive -y "$rdhome/RetroDECK_Updates/RetroDECK.flatpak" flatpak-spawn --host flatpak install --user --bundle --noninteractive -y "$rdhome/RetroDECK_Updates/RetroDECK.flatpak"
rm -f "$rdhome/RetroDECK_Updates" # Cleanup old bundles to save space rm -f "$rdhome/RetroDECK_Updates" # Cleanup old bundles to save space
) |
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 Updater" \
--text="RetroDECK is updating to the latest version, please wait."
configurator_generic_dialog "The update process is now complete!\n\nPlease restart RetroDECK to keep the fun going."
exit 1 exit 1
fi fi
fi fi
@ -1179,6 +1193,7 @@ prepare_emulator() {
while read -r config_line; do while read -r config_line; do
local current_setting_name=$(get_setting_name "$config_line" "retrodeck") local current_setting_name=$(get_setting_name "$config_line" "retrodeck")
if [[ ! $current_setting_name =~ (rdhome|sdcard) ]]; then # Ignore these locations if [[ ! $current_setting_name =~ (rdhome|sdcard) ]]; then # Ignore these locations
local current_setting_value=$(get_setting_value "$rd_conf" "$current_setting_name" "retrodeck" "paths")
eval "$current_setting_name=$rdhome/$(basename $current_setting_value)" eval "$current_setting_name=$rdhome/$(basename $current_setting_value)"
mkdir "$rdhome/$(basename $current_setting_value)" mkdir "$rdhome/$(basename $current_setting_value)"
fi fi
@ -1925,10 +1940,10 @@ finit() {
--column "Option" \ --column "Option" \
--column "Description" \ --column "Description" \
--column "option_flag" \ --column "option_flag" \
"${finit_options_list[@]}") "${finit_options_list[@]}" )
if [[ "$finit_options_choices" =~ (rpcs3_firmware|Enable All) ]]; then # Additional information on the firmware install process, as the emulator needs to be manually closed 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.") 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 fi
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \ zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
@ -1945,7 +1960,7 @@ finit() {
fi fi
if [[ "$finit_options_choices" =~ (rd_controller_profile|Enable All) ]]; then 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/" rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/"
# TODO move controller profile file to where it needs to go cp -f "$emuconfigs/retrodeck/defaults/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf"
fi fi
# Add packaged extras, after the ROMS folder has been initialized # Add packaged extras, after the ROMS folder has been initialized
@ -2288,3 +2303,15 @@ configurator_move_folder_dialog() {
configurator_move_folder_dialog "$rd_dir_name" configurator_move_folder_dialog "$rd_dir_name"
fi fi
} }
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*//')
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Changelogs" \
--text="Welcome to RetroDECK version $1!\n\nHere are the changes that were made in this version:\n$changelog"
}

View file

@ -30,6 +30,7 @@ es_themes_list="https://gitlab.com/es-de/themes/themes-list/-/raw/master/themes.
remote_network_target="https://one.one.one.one" # The URL of a common internet target for testing network access remote_network_target="https://one.one.one.one" # The URL of a common internet target for testing network access
helper_files_folder="$emuconfigs/defaults/retrodeck/helper_files" # The parent folder of RetroDECK documentation files for deployment helper_files_folder="$emuconfigs/defaults/retrodeck/helper_files" # The parent folder of RetroDECK documentation files for deployment
helper_files_list="$emuconfigs/defaults/retrodeck/reference_lists/helper_files_list.cfg" # The list of files to be deployed and where they go helper_files_list="$emuconfigs/defaults/retrodeck/reference_lists/helper_files_list.cfg" # The list of files to be deployed and where they go
rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml" # The shipped appdata XML file for this version
rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2023_0228_05fe32f5dc8c78acbcd84d36ee7fdc5b/PS3UPDAT.PUP" rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2023_0228_05fe32f5dc8c78acbcd84d36ee7fdc5b/PS3UPDAT.PUP"
# Options list for users to pick from during finit # Options list for users to pick from during finit

View file

@ -75,6 +75,7 @@ post_update() {
# - Prepackaged DOOM! # - Prepackaged DOOM!
# - Update RPCS3 vfs file contents. migrate from old location if needed # - Update RPCS3 vfs file contents. migrate from old location if needed
# - Disable ESDE update checks for existing installs # - Disable ESDE update checks for existing installs
# - Offer user option of installing custom controller config
# - Notify user of default PSX core change # - Notify user of default PSX core change
mkdir -p "$mods_folder" mkdir -p "$mods_folder"
@ -115,6 +116,12 @@ post_update() {
set_setting_value $es_settings "ApplicationUpdaterFrequency" "never" "es_settings" 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 [[ $(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"
fi
configurator_generic_dialog "As part of this update, the default PSX emulator has changed!\n\nIf you are currently playing PSX games and have not changed the default emulator on your own, you will need to switch back to the previous default emulator (Swanstation) for your existing saves to work.\nIf you have changed the default emulator yourself, please change it again to your previous choice.\n\nSee the wiki or Discord if you have more questions on this change!" configurator_generic_dialog "As part of this update, the default PSX emulator has changed!\n\nIf you are currently playing PSX games and have not changed the default emulator on your own, you will need to switch back to the previous default emulator (Swanstation) for your existing saves to work.\nIf you have changed the default emulator yourself, please change it again to your previous choice.\n\nSee the wiki or Discord if you have more questions on this change!"
fi fi
@ -132,5 +139,7 @@ post_update() {
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Finishing Upgrade" \ --title "RetroDECK Finishing Upgrade" \
--text="RetroDECK is finishing the upgrade process, please wait." --text="RetroDECK is finishing the upgrade process, please wait."
changelog_dialog "$version"
create_lock create_lock
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

View file

@ -40,6 +40,7 @@ source /app/libexec/functions.sh
# - Multi-file compression (CHD) # - Multi-file compression (CHD)
# - Download ES themes # - Download ES themes
# - Download PS3 firmware # - Download PS3 firmware
# - Install RetroDECK controller profile
# - Backup RetroDECK userdata # - Backup RetroDECK userdata
# - Reset # - Reset
# - Reset Specific Emulator # - Reset Specific Emulator
@ -814,6 +815,7 @@ configurator_tools_and_troubleshooting_dialog() {
"Compress Games" "Compress games to CHD format for systems that support it" \ "Compress Games" "Compress games to CHD format for systems that support it" \
"Download/Update Themes" "Download new themes for RetroDECK or update existing ones" \ "Download/Update Themes" "Download new themes for RetroDECK or update existing ones" \
"Download PS3 Firmware" "Download PS3 firmware for use with the RPCS3 emulator" \ "Download PS3 Firmware" "Download PS3 firmware for use with the RPCS3 emulator" \
"Install RetroDECK controller profile" "Install the custom RetroDECK controller profile and required icons" \
"Backup RetroDECK Userdata" "Compress important RetroDECK user data folders" ) "Backup RetroDECK Userdata" "Compress important RetroDECK user data folders" )
case $choice in case $choice in
@ -856,6 +858,16 @@ configurator_tools_and_troubleshooting_dialog() {
fi fi
;; ;;
"Install RetroDECK controller profile" )
configurator_generic_dialog "Starting with version 0.7.0b, 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.\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"
fi
configurator_generic_dialog "The RetroDECK controller profile install is complete.\nSee the Wiki for more details on how to use it to its fullest potential!"
configurator_tools_and_troubleshooting_dialog
;;
"Backup RetroDECK Userdata" ) "Backup RetroDECK Userdata" )
configurator_generic_dialog "This tool will compress important RetroDECK userdata (basically everything except the ROMs folder) into a zip file.\n\nThis process can take several minutes, and the resulting zip file can be found in the ~/retrodeck/backups folder." configurator_generic_dialog "This tool will compress important RetroDECK userdata (basically everything except the ROMs folder) into a zip file.\n\nThis process can take several minutes, and the resulting zip file can be found in the ~/retrodeck/backups folder."
( (