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

Cooker 0.7.0b icenine451
This commit is contained in:
icenine451 2023-05-22 12:17:05 -04:00 committed by GitHub
commit 58cd8eecf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 76 additions and 68 deletions

View file

@ -138,6 +138,7 @@ if [[ ! -f "$rd_conf" ]]; then
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build 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_repo" "RetroDECK-cooker" retrodeck "options"
set_setting_value $rd_conf "update_check" "true" retrodeck "options" set_setting_value $rd_conf "update_check" "true" retrodeck "options"
set_setting_value $rd_conf "developer_options" "true" retrodeck "options"
fi fi
echo "Setting config file permissions" echo "Setting config file permissions"
@ -155,6 +156,7 @@ else
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build 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_repo" "RetroDECK-cooker" retrodeck "options"
set_setting_value $rd_conf "update_check" "true" retrodeck "options" set_setting_value $rd_conf "update_check" "true" retrodeck "options"
set_setting_value $rd_conf "developer_options" "true" retrodeck "options"
fi fi
conf_read conf_read

View file

@ -107,6 +107,9 @@ if [ -f "$lockfile" ]; then
echo "Config file's version is $version but the actual version is $hard_version" 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 if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build
configurator_generic_dialog "RetroDECK Cooker Warning" "RUNNING COOKER VERSIONS OF RETRODECK CAN BE EXTREMELY DANGEROUS AND ALL OF YOUR RETRODECK DATA\n(INCLUDING BIOS FILES, BORDERS, DOWNLOADED MEDIA, GAMELISTS, MODS, ROMS, SAVES, STATES, SCREENSHOTS, TEXTURE PACKS AND THEMES)\nARE AT RISK BY CONTINUING!" configurator_generic_dialog "RetroDECK Cooker Warning" "RUNNING COOKER VERSIONS OF RETRODECK CAN BE EXTREMELY DANGEROUS AND ALL OF YOUR RETRODECK DATA\n(INCLUDING BIOS FILES, BORDERS, DOWNLOADED MEDIA, GAMELISTS, MODS, ROMS, SAVES, STATES, SCREENSHOTS, TEXTURE PACKS AND THEMES)\nARE AT RISK BY CONTINUING!"
set_setting_value $rd_conf "update_repo" "RetroDECK-cooker" retrodeck "options"
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
set_setting_value $rd_conf "developer_options" "true" retrodeck "options"
cooker_base_version=$(echo $hard_version | cut -d'-' -f2) cooker_base_version=$(echo $hard_version | cut -d'-' -f2)
choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Upgrade" --extra-button="Don't Upgrade" --extra-button="Full Wipe and Fresh Install" \ choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Upgrade" --extra-button="Don't Upgrade" --extra-button="Full Wipe and Fresh Install" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
@ -145,6 +148,7 @@ if [ -f "$lockfile" ]; then
set_setting_value $rd_conf "update_repo" "RetroDECK" retrodeck "options" 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_check" "false" retrodeck "options"
set_setting_value $rd_conf "update_ignore" "" retrodeck "options" set_setting_value $rd_conf "update_ignore" "" retrodeck "options"
set_setting_value $rd_conf "developer_options" "false" retrodeck "options"
fi fi
post_update # Executing post update script post_update # Executing post update script
fi fi

View file

@ -11,14 +11,16 @@ source /app/libexec/global.sh
# Welcome # Welcome
# - Presets & Settings # - Presets & Settings
# - Global: Presets & Settings # - Global: Presets & Settings
# - Enable/Disable Widescreen # - Widescreen: Enable/Disable
# - Enable/Disable Ask-To-Exit # - Ask-To-Exit: Enable/Disable
# - RetroAchievements Login # - RetroAchievements: Login
# - RetroAchievements Logout # - RetroAchievements: Logout
# - Enable/Disable RetroAchievements Hardcore Mode # - RetroAchievements: Hardcore Mode
# - Swap A/B and X/Y Buttons
# - RetroDECK: Change Update Check Setting
# - RetroArch: Presets & Settings # - RetroArch: Presets & Settings
# - Enable/Disable borders # - Borders: Enable/Disable
# - Enable/Disable Rewind Setting # - Rewind: Enable/Disable
# - Wii & GameCube: Presets & Settings # - Wii & GameCube: Presets & Settings
# - Dolphin Textures: Universal Dynamic Input # - Dolphin Textures: Universal Dynamic Input
# - Primehack Textures: Universal Dynamic Input # - Primehack Textures: Universal Dynamic Input
@ -35,8 +37,8 @@ source /app/libexec/global.sh
# - RPCS3 # - RPCS3
# - XEMU # - XEMU
# - Yuzu # - Yuzu
# - RetroDECK: Tools # - Tools
# - RetroDECK: Move Tool # - Tool: Move Folders
# - Move all of RetroDECK # - Move all of RetroDECK
# - Move ROMs folder # - Move ROMs folder
# - Move BIOS folder # - Move BIOS folder
@ -47,16 +49,16 @@ source /app/libexec/global.sh
# - Move Screenshots folder # - Move Screenshots folder
# - Move Mods folder # - Move Mods folder
# - Move Texture Packs folder # - Move Texture Packs folder
# - RetroDECK: Compression Tool # - Tool: Compress Games
# - Compress Single Game # - Compress Single Game
# - Compress Multiple Games - CHD # - Compress Multiple Games - CHD
# - Compress Multiple Games - ZIP # - Compress Multiple Games - ZIP
# - Compress Multiple Games - RVZ # - Compress Multiple Games - RVZ
# - Compress Multiple Games - All Formats # - Compress Multiple Games - All Formats
# - Compress All Games # - Compress All Games
# - Install: RetroDECK Controller Profile # - Install: RetroDECK SD Controller Profile
# - Install: PS3 firmware # - Install: PS3 firmware
# - RetroDECK: Troubleshooting # - Troubleshooting
# - Backup: RetroDECK Userdata # - Backup: RetroDECK Userdata
# - Check & Verify: BIOS # - Check & Verify: BIOS
# - Check & Verify: Multi-file structure # - Check & Verify: Multi-file structure
@ -84,7 +86,6 @@ source /app/libexec/global.sh
# - Developer Options (Hidden) # - Developer Options (Hidden)
# - Change Multi-user mode # - Change Multi-user mode
# - Change Update channel # - Change Update channel
# - Change Update check setting
# - Browse the wiki # - Browse the wiki
# - USB Import tool # - USB Import tool
# - Install: RetroDECK Starter Pack # - Install: RetroDECK Starter Pack
@ -179,26 +180,27 @@ configurator_global_presets_and_settings_dialog() {
choice=$(zenity --list --title="RetroDECK Configurator Utility - Global: Presets & Settings" --cancel-label="Back" \ choice=$(zenity --list --title="RetroDECK Configurator Utility - Global: Presets & Settings" --cancel-label="Back" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
--column="Choice" --column="Action" \ --column="Choice" --column="Action" \
"Enable/Disable Widescreen" "Enable or disable widescreen in supported systems" \ "Widescreen: Enable/Disable" "Enable or disable widescreen in supported systems" \
"Enable/Disable Ask-to-Exit" "Enable or disable emulators confirming when quitting in supported systems" \ "Ask-to-Exit: Enable/Disable" "Enable or disable emulators confirming when quitting in supported systems" \
"RetroAchievements Login" "Log into the RetroAchievements service in supported systems" \ "RetroAchievements: Login" "Log into the RetroAchievements service in supported systems" \
"RetroAchievements Logout" "Disable RetroAchievements service in ALL supported systems" \ "RetroAchievements: Logout" "Disable RetroAchievements service in ALL supported systems" \
"RetroAchievements Hardcore Mode" "Enable RetroAchievements hardcore mode (no cheats, rewind, save states etc.) in supported emulators" \ "RetroAchievements: Hardcore Mode" "Enable RetroAchievements hardcore mode (no cheats, rewind, save states etc.) in supported emulators" \
"Nintendo Button Layout" "Enable or disable Nintendo button layout (swapped A/B and X/Y) in supported systems" ) "Swap A/B and X/Y Buttons" "Enable or disable a swapped A/B and X/Y button layout in supported systems" \
"RetroDECK: Change Update Check Setting" "Enable or disable online checks for new versions of RetroDECK" )
case $choice in case $choice in
"Enable/Disable Widescreen" ) "Widescreen: Enable/Disable" )
change_preset_dialog "widescreen" change_preset_dialog "widescreen"
configurator_global_presets_and_settings_dialog configurator_global_presets_and_settings_dialog
;; ;;
"Enable/Disable Ask-to-Exit" ) "Ask-to-Exit: Enable/Disable" )
change_preset_dialog "ask_to_exit" change_preset_dialog "ask_to_exit"
configurator_global_presets_and_settings_dialog configurator_global_presets_and_settings_dialog
;; ;;
"RetroAchievements Login" ) "RetroAchievements: Login" )
local cheevos_creds=$(get_cheevos_token_dialog) local cheevos_creds=$(get_cheevos_token_dialog)
if [[ ! "$cheevos_creds" == "failed" ]]; then if [[ ! "$cheevos_creds" == "failed" ]]; then
configurator_generic_dialog "RetroDECK Configurator Utility - RetroAchievements" "RetroAchievements login successful, please select systems you would like to enable achievements for in the next dialog." configurator_generic_dialog "RetroDECK Configurator Utility - RetroAchievements" "RetroAchievements login successful, please select systems you would like to enable achievements for in the next dialog."
@ -210,7 +212,7 @@ configurator_global_presets_and_settings_dialog() {
configurator_global_presets_and_settings_dialog configurator_global_presets_and_settings_dialog
;; ;;
"RetroAchievements Logout" ) # This is a workaround to allow disabling cheevos without having to enter login credentials "RetroAchievements: Logout" ) # This is a workaround to allow disabling cheevos without having to enter login credentials
local cheevos_emulators=$(sed -n '/\[cheevos\]/, /\[/{ /\[cheevos\]/! { /\[/! p } }' $rd_conf | sed '/^$/d') local cheevos_emulators=$(sed -n '/\[cheevos\]/, /\[/{ /\[cheevos\]/! { /\[/! p } }' $rd_conf | sed '/^$/d')
for emulator in $cheevos_emulators; do for emulator in $cheevos_emulators; do
set_setting_value "$rdconf" "$emulator" "false" "retrodeck" "cheevos" set_setting_value "$rdconf" "$emulator" "false" "retrodeck" "cheevos"
@ -220,16 +222,20 @@ configurator_global_presets_and_settings_dialog() {
configurator_global_presets_and_settings_dialog configurator_global_presets_and_settings_dialog
;; ;;
"RetroAchievements Hardcore Mode" ) "RetroAchievements: Hardcore Mode" )
change_preset_dialog "cheevos_hardcore" change_preset_dialog "cheevos_hardcore"
configurator_global_presets_and_settings_dialog configurator_global_presets_and_settings_dialog
;; ;;
"Nintendo Button Layout" ) "Swap A/B and X/Y Buttons" )
change_preset_dialog "nintendo_button_layout" change_preset_dialog "nintendo_button_layout"
configurator_global_presets_and_settings_dialog configurator_global_presets_and_settings_dialog
;; ;;
"RetroDECK: Change Update Check Setting" )
configurator_online_update_setting_dialog
;;
"" ) # No selection made or Back button clicked "" ) # No selection made or Back button clicked
configurator_presets_and_settings_dialog configurator_presets_and_settings_dialog
;; ;;
@ -237,21 +243,49 @@ configurator_global_presets_and_settings_dialog() {
esac esac
} }
configurator_online_update_setting_dialog() {
if [[ $(get_setting_value $rd_conf "update_check" retrodeck "options") == "true" ]]; then
zenity --question \
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Configurator - RetroDECK Online Update Check" \
--text="Online update checks for RetroDECK are currently enabled.\n\nDo you want to disable them?"
if [ $? == 0 ] # User clicked "Yes"
then
set_setting_value $rd_conf "update_check" "false" retrodeck "options"
else # User clicked "Cancel"
configurator_global_presets_and_settings_dialog
fi
else
zenity --question \
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Configurator - RetroDECK Online Update Check" \
--text="Online update checks for RetroDECK are currently disabled.\n\nDo you want to enable them?"
if [ $? == 0 ] # User clicked "Yes"
then
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
else # User clicked "Cancel"
configurator_global_presets_and_settings_dialog
fi
fi
}
configurator_retroarch_presets_and_settings_dialog() { configurator_retroarch_presets_and_settings_dialog() {
choice=$(zenity --list --title="RetroDECK Configurator Utility - RetroArch: Presets & Settings" --cancel-label="Back" \ choice=$(zenity --list --title="RetroDECK Configurator Utility - RetroArch: Presets & Settings" --cancel-label="Back" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
--column="Choice" --column="Action" \ --column="Choice" --column="Action" \
"Enable/Disable Borders" "Enable or disable borders in supported systems" \ "Borders: Enable/Disable" "Enable or disable borders in supported systems" \
"Enable/Disable Rewind" "Enable or disable the Rewind function in RetroArch." ) "Rewind: Enable/Disable" "Enable or disable the Rewind function in RetroArch." )
case $choice in case $choice in
"Enable/Disable Borders" ) "Borders: Enable/Disable" )
change_preset_dialog "borders" change_preset_dialog "borders"
configurator_retroarch_presets_and_settings_dialog configurator_retroarch_presets_and_settings_dialog
;; ;;
"Enable/Disable Rewind" ) "Rewind: Enable/Disable" )
configurator_retroarch_rewind_dialog configurator_retroarch_rewind_dialog
;; ;;
@ -495,23 +529,23 @@ configurator_retrodeck_tools_dialog() {
choice=$(zenity --list --title="RetroDECK Configurator Utility - RetroDECK: Tools" --cancel-label="Back" \ choice=$(zenity --list --title="RetroDECK Configurator Utility - RetroDECK: Tools" --cancel-label="Back" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
--column="Choice" --column="Action" \ --column="Choice" --column="Action" \
"RetroDECK: Move Tool" "Move RetroDECK folders between internal/SD card or to a custom location" \ "Tool: Move Folders" "Move RetroDECK folders between internal/SD card or to a custom location" \
"RetroDECK: Compression Tool" "Compress games for systems that support it" \ "Tool: Compress Games" "Compress games for systems that support it" \
"Install: RetroDECK Controller Profile" "Install the optional custom RetroDECK controller profile" \ "Install: RetroDECK SD Controller Profile" "Install the custom RetroDECK controller layout for the Steam Deck" \
"Install: PS3 Firmware" "Download and install PS3 firmware for use with the RPCS3 emulator" ) "Install: PS3 Firmware" "Download and install PS3 firmware for use with the RPCS3 emulator" )
case $choice in case $choice in
"RetroDECK: Move Tool" ) "Tool: Move Folders" )
configurator_retrodeck_move_tool_dialog configurator_retrodeck_move_tool_dialog
;; ;;
"RetroDECK: Compression Tool" ) "Tool: Compress Games" )
configurator_generic_dialog "RetroDECK Configurator - Compression Tool" "Depending on your library and compression choices, the process can sometimes take a long time.\nPlease be patient once it is started!" configurator_generic_dialog "RetroDECK Configurator - Compression Tool" "Depending on your library and compression choices, the process can sometimes take a long time.\nPlease be patient once it is started!"
configurator_compression_tool_dialog configurator_compression_tool_dialog
;; ;;
"Install: RetroDECK Controller Profile" ) "Install: RetroDECK SD Controller Profile" )
configurator_generic_dialog "RetroDECK Configurator - Install: RetroDECK Controller Profile" "We are now 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" configurator_generic_dialog "RetroDECK Configurator - Install: RetroDECK Controller Profile" "We are now 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 "Install: RetroDECK Controller Profile" "Would you like to install the official RetroDECK controller profile?") == "true" ]]; then if [[ $(configurator_generic_question_dialog "Install: RetroDECK Controller Profile" "Would you like to install the official RetroDECK controller profile?") == "true" ]]; then
install_retrodeck_controller_profile install_retrodeck_controller_profile
@ -1076,7 +1110,6 @@ configurator_developer_dialog() {
--column="Choice" --column="Description" \ --column="Choice" --column="Description" \
"Change Multi-user mode" "Enable or disable multi-user support" \ "Change Multi-user mode" "Enable or disable multi-user support" \
"Change Update Channel" "Change between normal and cooker builds" \ "Change Update Channel" "Change between normal and cooker builds" \
"Change Update Check Setting" "Enable or disable online checks for new versions of RetroDECK" \
"Browse the Wiki" "Browse the RetroDECK wiki online" \ "Browse the Wiki" "Browse the RetroDECK wiki online" \
"USB Import" "Prepare a USB device for ROMs or import an existing collection" \ "USB Import" "Prepare a USB device for ROMs or import an existing collection" \
"Install RetroDECK Starter Pack" "Install the optional RetroDECK starter pack" ) "Install RetroDECK Starter Pack" "Install the optional RetroDECK starter pack" )
@ -1091,12 +1124,9 @@ configurator_developer_dialog() {
configurator_online_update_channel_dialog configurator_online_update_channel_dialog
;; ;;
"Change Update Check Setting" )
configurator_online_update_setting_dialog
;;
"Browse the Wiki" ) "Browse the Wiki" )
xdg-open "https://github.com/XargonWan/RetroDECK/wiki" xdg-open "https://github.com/XargonWan/RetroDECK/wiki"
configurator_developer_dialog
;; ;;
"USB Import" ) "USB Import" )
@ -1172,34 +1202,6 @@ configurator_online_update_channel_dialog() {
fi fi
} }
configurator_online_update_setting_dialog() {
if [[ $(get_setting_value $rd_conf "update_check" retrodeck "options") == "true" ]]; then
zenity --question \
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Configurator - RetroDECK Online Update Check" \
--text="Online update checks for RetroDECK are currently enabled.\n\nDo you want to disable them?"
if [ $? == 0 ] # User clicked "Yes"
then
set_setting_value $rd_conf "update_check" "false" retrodeck "options"
else # User clicked "Cancel"
configurator_developer_dialog
fi
else
zenity --question \
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Configurator - RetroDECK Online Update Check" \
--text="Online update checks for RetroDECK are currently disabled.\n\nDo you want to enable them?"
if [ $? == 0 ] # User clicked "Yes"
then
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
else # User clicked "Cancel"
configurator_developer_dialog
fi
fi
}
configurator_usb_import_dialog() { configurator_usb_import_dialog() {
choice=$(zenity --list --title="RetroDECK Configurator Utility - Developer Options" --cancel-label="Back" \ choice=$(zenity --list --title="RetroDECK Configurator Utility - Developer Options" --cancel-label="Back" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \