mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-26 15:55:38 +00:00
Update Configurator for new functions
This commit is contained in:
parent
96ee4ddc8b
commit
cd4108985c
|
@ -8,3 +8,5 @@ media_folder=/home/deck/retrodeck/downloaded_media
|
||||||
themes_folder=/home/deck/retrodeck/themes
|
themes_folder=/home/deck/retrodeck/themes
|
||||||
logs_folder=/home/deck/retrodeck/.logs
|
logs_folder=/home/deck/retrodeck/.logs
|
||||||
sdcard=/run/media/mmcblk0p1
|
sdcard=/run/media/mmcblk0p1
|
||||||
|
|
||||||
|
power_user=false
|
|
@ -2,11 +2,8 @@
|
||||||
|
|
||||||
# VARIABLES SECTION
|
# VARIABLES SECTION
|
||||||
|
|
||||||
#rd_conf="retrodeck.cfg" # uncomment for standalone testing
|
source /app/libexec/global.sh
|
||||||
#source functions.sh # uncomment for standalone testing
|
source /app/libexec/functions.sh
|
||||||
|
|
||||||
source /app/libexec/global.sh # uncomment for flatpak testing
|
|
||||||
source /app/libexec/functions.sh # uncomment for flatpak testing
|
|
||||||
|
|
||||||
# DIALOG SECTION
|
# DIALOG SECTION
|
||||||
|
|
||||||
|
@ -15,18 +12,29 @@ source /app/libexec/functions.sh # uncomment for flatpak testing
|
||||||
# Welcome
|
# Welcome
|
||||||
# - Move Files
|
# - Move Files
|
||||||
# - Migrate Everything
|
# - Migrate Everything
|
||||||
# - Change Options
|
# - Change RetroArch Options
|
||||||
# - RetroArch
|
# - Enable/Disable Rewind Setting
|
||||||
# - Change Rewind Setting
|
# - RetroAchivement Login
|
||||||
# - RetroAchivement Login
|
# - Login prompt
|
||||||
# - Login prompt
|
# - Change Standalone Emulator Options (Behind one-time power user warning dialog)
|
||||||
|
# - Launch RetroArch
|
||||||
|
# - Launch Citra
|
||||||
|
# - Launch Dolphin
|
||||||
|
# - Launch Duckstation
|
||||||
|
# - Launch MelonDS
|
||||||
|
# - Launch PCSX2
|
||||||
|
# - Launch PPSSPP
|
||||||
|
# - Launch Primehack
|
||||||
|
# - Launch RPCS3
|
||||||
|
# - Launch XEMU
|
||||||
|
# - Launch Yuzu
|
||||||
# - Compress Games
|
# - Compress Games
|
||||||
# - Manual selection
|
# - Manual single-game selection
|
||||||
# - Troubleshooting Tools
|
# - Troubleshooting Tools
|
||||||
# - Multi-file game check
|
# - Multi-file game check
|
||||||
# - Reset
|
# - Reset
|
||||||
# - Reset RetroArch
|
# - Reset Specific Emulator
|
||||||
# - Reset Specific Standalone Emulator
|
# - Reset RetroArch
|
||||||
# - Reset Citra
|
# - Reset Citra
|
||||||
# - Reset Dolphin
|
# - Reset Dolphin
|
||||||
# - Reset Duckstation
|
# - Reset Duckstation
|
||||||
|
@ -38,7 +46,7 @@ source /app/libexec/functions.sh # uncomment for flatpak testing
|
||||||
# - Reset Ryujinx
|
# - Reset Ryujinx
|
||||||
# - Reset XEMU
|
# - Reset XEMU
|
||||||
# - Reset Yuzu
|
# - Reset Yuzu
|
||||||
# - Reset All Standalone Emulators
|
# - Reset All Emulators
|
||||||
# - Reset Tools
|
# - Reset Tools
|
||||||
# - Reset All
|
# - Reset All
|
||||||
|
|
||||||
|
@ -50,39 +58,38 @@ configurator_reset_dialog() {
|
||||||
choice=$(zenity --list --title="RetroDECK Configurator Utility - Reset Options" --cancel-label="Back" \
|
choice=$(zenity --list --title="RetroDECK Configurator Utility - Reset 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 \
|
||||||
--column="Choice" --column="Action" \
|
--column="Choice" --column="Action" \
|
||||||
"Reset RetroArch" "Reset RetroArch to default settings" \
|
"Reset Specific Emulator" "Reset only one specific emulator to default settings" \
|
||||||
"Reset Specific Standalone" "Reset only one specific standalone emulator to default settings" \
|
"Reset All Emulators" "Reset all emulators to default settings" \
|
||||||
"Reset All Standalones" "Reset all standalone emulators to default settings" \
|
|
||||||
"Reset Tools" "Reset Tools menu entries" \
|
"Reset Tools" "Reset Tools menu entries" \
|
||||||
"Reset All" "Reset RetroDECK to default settings" )
|
"Reset All" "Reset RetroDECK to default settings" )
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
|
|
||||||
"Reset RetroArch" )
|
"Reset Specific Emulator" )
|
||||||
ra_init
|
|
||||||
configurator_process_complete_dialog "resetting RetroArch"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"Reset Specific Standalone" )
|
|
||||||
emulator_to_reset=$(zenity --list \
|
emulator_to_reset=$(zenity --list \
|
||||||
--title "RetroDECK Configurator Utility - Reset Specific Standalone Emulator" --cancel-label="Back" \
|
--title "RetroDECK Configurator Utility - Reset Specific Standalone Emulator" --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 \
|
||||||
--text="Which emulator do you want to reset to default?" \
|
--text="Which emulator do you want to reset to default?" \
|
||||||
--hide-header \
|
--column="Emulator" --column="Action" \
|
||||||
--column=emulator \
|
"RetroArch" "Reset RetroArch to default settings" \
|
||||||
"Citra" \
|
"Citra" "Reset Citra to default settings" \
|
||||||
"Dolphin" \
|
"Dolphin" "Reset Dolphin to default settings" \
|
||||||
"Duckstation" \
|
"Duckstation" "Reset Duckstation to default settings" \
|
||||||
"MelonDS" \
|
"MelonDS" "Reset MelonDS to default settings" \
|
||||||
"PCSX2" \
|
"PCSX2" "Reset PCSX2 to default settings" \
|
||||||
"PPSSPP" \
|
"PPSSPP" "Reset PPSSPP to default settings" \
|
||||||
"Primehack" \
|
"Primehack" "Reset Primehack to default settings" \
|
||||||
"RPCS3" \
|
"RPCS3" "Reset RPCS3 to default settings" \
|
||||||
"XEMU" \
|
"XEMU" "Reset XEMU to default settings" \
|
||||||
"Yuzu")
|
"Yuzu" "Reset Yuzu to default settings" )
|
||||||
|
|
||||||
case $emulator_to_reset in
|
case $emulator_to_reset in
|
||||||
|
|
||||||
|
"RetroArch" )
|
||||||
|
ra_init
|
||||||
|
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
||||||
|
;;
|
||||||
|
|
||||||
"Citra" )
|
"Citra" )
|
||||||
citra_init
|
citra_init
|
||||||
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
||||||
|
@ -140,9 +147,10 @@ configurator_reset_dialog() {
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Reset All Standalones" )
|
"Reset All Emulators" )
|
||||||
|
ra_init
|
||||||
standalones_init
|
standalones_init
|
||||||
configurator_process_complete_dialog "resetting standalone emulators"
|
configurator_process_complete_dialog "resetting all emulators"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Reset Tools" )
|
"Reset Tools" )
|
||||||
|
@ -154,7 +162,7 @@ configurator_reset_dialog() {
|
||||||
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
|
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
|
||||||
--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 Configurator Utility - Reset RetroDECK" \
|
--title "RetroDECK Configurator Utility - Reset RetroDECK" \
|
||||||
--text="You are resetting RetroDECK to its default state.\n\nAfter the process is complete you will need to exit RetroDECK and run it again."
|
--text="You are resetting RetroDECK to its default state.\n\nAfter the process is complete you will need to exit RetroDECK and run it again, where you will go through the initial setup process again."
|
||||||
rm -f "$lockfile"
|
rm -f "$lockfile"
|
||||||
configurator_process_complete_dialog "resetting RetroDECK"
|
configurator_process_complete_dialog "resetting RetroDECK"
|
||||||
;;
|
;;
|
||||||
|
@ -187,15 +195,21 @@ configurator_retroachivement_dialog() {
|
||||||
else
|
else
|
||||||
configurator_welcome_dialog
|
configurator_welcome_dialog
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
configurator_power_user_warning_dialog() {
|
||||||
|
zenity --title "RetroDECK Configurator Utility - Power User Options" --question --no-wrap --cancel-label="Back" \
|
||||||
|
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
|
--text="Making manual changes to an emulators configuration may create serious issues,\nand some settings may be overwitten during RetroDECK updates.\n\nSome standalone emulator functions may not work properly outside of Desktop mode.\n\nPlease continue only if you know what you're doing.\n\nDo you want to continue?\n\nClicking Yes will set you as a Power User and you will not see this dialog again."
|
||||||
|
|
||||||
|
if [ $? == 0 ]; then # OK button clicked
|
||||||
|
power_user="true"
|
||||||
|
set_setting_value $rd_conf "power_user" "$power_user" retrodeck # Store power user variable for future checks
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
configurator_power_user_changes_dialog() {
|
configurator_power_user_changes_dialog() {
|
||||||
zenity --title "RetroDECK Configurator Utility - Power User Options" --question --no-wrap --cancel-label="Back" \
|
if [[ $power_user == "true" ]]; then
|
||||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
|
||||||
--text="Making manual changes to an emulators configuration may create serious issues,\nand some settings may be overwitten during RetroDECK updates.\n\nSome standalone emulator functions may not work properly outside of Desktop mode.\n\nPlease continue only if you know what you're doing.\n\nDo you want to continue?"
|
|
||||||
|
|
||||||
if [ $? == 0 ]; then # OK button clicked
|
|
||||||
emulator=$(zenity --list \
|
emulator=$(zenity --list \
|
||||||
--title "RetroDECK Configurator Utility - Power User Options" --cancel-label="Back" \
|
--title "RetroDECK Configurator Utility - Power User 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 \
|
||||||
|
@ -261,12 +275,17 @@ configurator_power_user_changes_dialog() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"" ) # No selection made or Back button clicked
|
"" ) # No selection made or Back button clicked
|
||||||
configurator_options_dialog
|
configurator_welcome_dialog
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
configurator_options_dialog
|
configurator_power_user_warning_dialog
|
||||||
|
if [[ $power_user == "true" ]]; then
|
||||||
|
configurator_power_user_changes_dialog
|
||||||
|
else
|
||||||
|
configurator_welcome_dialog
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,7 +301,7 @@ configurator_retroarch_rewind_dialog() {
|
||||||
set_setting_value $raconf "rewind_enable" "false" retroarch
|
set_setting_value $raconf "rewind_enable" "false" retroarch
|
||||||
configurator_process_complete_dialog "disabling Rewind"
|
configurator_process_complete_dialog "disabling Rewind"
|
||||||
else
|
else
|
||||||
configurator_options_dialog
|
configurator_retroarch_options_dialog
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
zenity --question \
|
zenity --question \
|
||||||
|
@ -295,7 +314,7 @@ configurator_retroarch_rewind_dialog() {
|
||||||
set_setting_value $raconf "rewind_enable" "true" retroarch
|
set_setting_value $raconf "rewind_enable" "true" retroarch
|
||||||
configurator_process_complete_dialog "enabling Rewind"
|
configurator_process_complete_dialog "enabling Rewind"
|
||||||
else
|
else
|
||||||
configurator_options_dialog
|
configurator_retroarch_options_dialog
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -304,7 +323,8 @@ configurator_retroarch_options_dialog() {
|
||||||
choice=$(zenity --list --title="RetroDECK Configurator Utility - RetroArch Options" --cancel-label="Back" \
|
choice=$(zenity --list --title="RetroDECK Configurator Utility - RetroArch 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 \
|
||||||
--column="Choice" --column="Action" \
|
--column="Choice" --column="Action" \
|
||||||
"Change Rewind Setting" "Enable or disable the Rewind function in RetroArch" )
|
"Change Rewind Setting" "Enable or disable the Rewind function in RetroArch." \
|
||||||
|
"Log in to RetroAchivements" "Log into the RetroAchievements service in RetroArch." )
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
|
|
||||||
|
@ -312,6 +332,10 @@ configurator_retroarch_options_dialog() {
|
||||||
configurator_retroarch_rewind_dialog
|
configurator_retroarch_rewind_dialog
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"Log in to RetroAchivements" )
|
||||||
|
configurator_retroachivement_dialog
|
||||||
|
;;
|
||||||
|
|
||||||
"" ) # No selection made or Back button clicked
|
"" ) # No selection made or Back button clicked
|
||||||
configurator_options_dialog
|
configurator_options_dialog
|
||||||
;;
|
;;
|
||||||
|
@ -319,30 +343,6 @@ configurator_retroarch_options_dialog() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
configurator_options_dialog() {
|
|
||||||
choice=$(zenity --list --title="RetroDECK Configurator Utility - Change Options" --cancel-label="Back" \
|
|
||||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
|
|
||||||
--column="Choice" --column="Action" \
|
|
||||||
"Change RetroArch Settings" "Change settings specific to RetroArch" \
|
|
||||||
"Power User Changes" "Make changes directly in an emulator" )
|
|
||||||
|
|
||||||
case $choice in
|
|
||||||
|
|
||||||
"Change RetroArch Settings" )
|
|
||||||
configurator_retroarch_options_dialog
|
|
||||||
;;
|
|
||||||
|
|
||||||
"Power User Changes" )
|
|
||||||
configurator_power_user_changes_dialog
|
|
||||||
;;
|
|
||||||
|
|
||||||
"" ) # No selection made or Back button clicked
|
|
||||||
configurator_welcome_dialog
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
configurator_compress_single_game_dialog() {
|
configurator_compress_single_game_dialog() {
|
||||||
file_to_compress=$(file_browse "Game to compress")
|
file_to_compress=$(file_browse "Game to compress")
|
||||||
if [[ ! -z $file_to_compress ]]; then
|
if [[ ! -z $file_to_compress ]]; then
|
||||||
|
@ -571,10 +571,12 @@ configurator_welcome_dialog() {
|
||||||
choice=$(zenity --list --title="RetroDECK Configurator Utility" --cancel-label="Quit" \
|
choice=$(zenity --list --title="RetroDECK Configurator Utility" --cancel-label="Quit" \
|
||||||
--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" \
|
||||||
"Move Files" "Move files between internal/SD card or to custom locations" \
|
"Move Files" "Move files between internal/SD card or to custom locations." \
|
||||||
"Change Options" "Adjust how RetroDECK behaves" \
|
"Change RetroArch Options" "Change RetroArch presets, log into RetroAchievements etc." \
|
||||||
"RetroAchivements" "Log in to RetroAchievements" \
|
"Change Standalone Emulator Options" "Run emulators standalone to make advanced config changes." \
|
||||||
"Reset" "Reset parts of RetroDECK" )
|
"Compress Games" "Compress games to CHD format for systems that support it." \
|
||||||
|
"Troubleshooting Tools" "Run RetroDECK troubleshooting tools for common issues." \
|
||||||
|
"Reset" "Reset specific parts or all of RetroDECK." )
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
|
|
||||||
|
@ -583,12 +585,12 @@ configurator_welcome_dialog() {
|
||||||
configurator_move_dialog
|
configurator_move_dialog
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Change Options" )
|
"Change RetroArch Options" )
|
||||||
configurator_options_dialog
|
configurator_retroarch_options_dialog
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"RetroAchivements" )
|
"Change Standalone Emulator Options" )
|
||||||
configurator_retroachivement_dialog
|
configurator_power_user_changes_dialog
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Compress Games" )
|
"Compress Games" )
|
||||||
|
@ -603,10 +605,6 @@ configurator_welcome_dialog() {
|
||||||
configurator_reset_dialog
|
configurator_reset_dialog
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Quit" )
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue