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

Cooker 0.7.0b icenine451
This commit is contained in:
icenine451 2023-05-01 16:34:20 -04:00 committed by GitHub
commit 784162411f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 113 additions and 21 deletions

View file

@ -1358,10 +1358,14 @@ prepare_emulator() {
mkdir -pv "$saves_folder/n3ds/citra/sdmc/"
dir_prep "$bios_folder/citra/sysdata" "/var/data/citra-emu/sysdata"
dir_prep "$logs_folder/citra" "/var/data/citra-emu/log"
dir_prep "$mods_folder/Citra" "/var/data/citra-emu/load/mods"
dir_prep "$texture_packs_folder/Citra" "/var/data/citra-emu/load/textures"
fi
if [[ "$action" == "postmove" ]]; then # Run only post-move commands
dir_prep "$rdhome/bios/citra/sysdata" "/var/data/citra-emu/sysdata"
dir_prep "$rdhome/.logs/citra" "/var/data/citra-emu/log"
dir_prep "$mods_folder/Citra" "/var/data/citra-emu/load/mods"
dir_prep "$texture_packs_folder/Citra" "/var/data/citra-emu/load/textures"
set_setting_value "$citraconf" "nand_directory" "$saves_folder/n3ds/citra/nand/" "citra" "Data%20Storage"
set_setting_value "$citraconf" "sdmc_directory" "$saves_folder/n3ds/citra/sdmc/" "citra" "Data%20Storage"
set_setting_value "$citraconf" "Paths\gamedirs\3\path" "$roms_folder/n3ds" "citra" "UI"
@ -1394,20 +1398,24 @@ prepare_emulator() {
set_setting_value "$dolphinconf" "ISOPath1" "$roms_folder/gc" "dolphin" "General"
set_setting_value "$dolphinconf" "WiiSDCardPath" "$saves_folder/wii/dolphin/sd.raw" "dolphin" "General"
fi # Shared actions
dir_prep "$saves_folder/gc/dolphin/EUR" "/var/data/dolphin-emu/GC/EUR" # TODO: Multi-user one-off
dir_prep "$saves_folder/gc/dolphin/USA" "/var/data/dolphin-emu/GC/USA" # TODO: Multi-user one-off
dir_prep "$saves_folder/gc/dolphin/JAP" "/var/data/dolphin-emu/GC/JAP" # TODO: Multi-user one-off
dir_prep "$saves_folder/gc/dolphin/EU" "/var/data/dolphin-emu/GC/EUR" # TODO: Multi-user one-off
dir_prep "$saves_folder/gc/dolphin/US" "/var/data/dolphin-emu/GC/USA" # TODO: Multi-user one-off
dir_prep "$saves_folder/gc/dolphin/JP" "/var/data/dolphin-emu/GC/JAP" # TODO: Multi-user one-off
dir_prep "$screenshots_folder" "/var/data/dolphin-emu/ScreenShots"
dir_prep "$states_folder/dolphin" "/var/data/dolphin-emu/StateSaves"
dir_prep "$saves_folder/wii/dolphin" "/var/data/dolphin-emu/Wii"
dir_prep "$saves_folder/wii/dolphin" "/var/data/dolphin-emu/Wii"
dir_prep "$mods_folder/Dolphin" "/var/data/dolphin-emu/Load/GraphicMods"
dir_prep "$texture_packs_folder/Dolphin" "/var/data/dolphin-emu/Load/Textures"
fi
if [[ "$action" == "postmove" ]]; then # Run only post-move commands
dir_prep "$saves_folder/gc/dolphin/EUR" "/var/data/dolphin-emu/GC/EUR"
dir_prep "$saves_folder/gc/dolphin/USA" "/var/data/dolphin-emu/GC/USA"
dir_prep "$saves_folder/gc/dolphin/JAP" "/var/data/dolphin-emu/GC/JAP"
dir_prep "$saves_folder/gc/dolphin/EU" "/var/data/dolphin-emu/GC/EUR"
dir_prep "$saves_folder/gc/dolphin/US" "/var/data/dolphin-emu/GC/USA"
dir_prep "$saves_folder/gc/dolphin/JP" "/var/data/dolphin-emu/GC/JAP"
dir_prep "$screenshots_folder" "/var/data/dolphin-emu/ScreenShots"
dir_prep "$states_folder/dolphin" "/var/data/dolphin-emu/StateSaves"
dir_prep "$saves_folder/wii/dolphin" "/var/data/dolphin-emu/Wii"
dir_prep "$saves_folder/wii/dolphin" "/var/data/dolphin-emu/Wii"
dir_prep "$mods_folder/Dolphin" "/var/data/dolphin-emu/Load/GraphicMods"
dir_prep "$texture_packs_folder/Dolphin" "/var/data/dolphin-emu/Load/Textures"
set_setting_value "$dolphinconf" "BIOS" "$bios_folder" "dolphin" "GBA"
set_setting_value "$dolphinconf" "SavesPath" "$saves_folder/gba" "dolphin" "GBA"
set_setting_value "$dolphinconf" "ISOPath0" "$roms_folder/wii" "dolphin" "General"
@ -1578,21 +1586,25 @@ prepare_emulator() {
set_setting_value "$primehackconf" "ISOPath0" "$roms_folder/gc" "primehack" "General"
fi
# Shared actions
dir_prep "$saves_folder/gc/primehack/EUR" "/var/data/primehack/GC/EUR"
dir_prep "$saves_folder/gc/primehack/USA" "/var/data/primehack/GC/USA"
dir_prep "$saves_folder/gc/primehack/JAP" "/var/data/primehack/GC/JAP"
dir_prep "$saves_folder/gc/primehack/EU" "/var/data/primehack/GC/EUR"
dir_prep "$saves_folder/gc/primehack/US" "/var/data/primehack/GC/USA"
dir_prep "$saves_folder/gc/primehack/JP" "/var/data/primehack/GC/JAP"
dir_prep "$screenshots_folder" "/var/data/primehack/ScreenShots"
dir_prep "$states_folder/primehack" "/var/data/primehack/StateSaves"
mkdir -pv /var/data/primehack/Wii/
dir_prep "$saves_folder/wii/primehack" "/var/data/primehack/Wii"
dir_prep "$mods_folder/Primehack" "/var/data/primehack/Load/GraphicMods"
dir_prep "$texture_packs_folder/Primehack" "/var/data/primehack/Load/Textures"
fi
if [[ "$action" == "postmove" ]]; then # Run only post-move commands
dir_prep "$saves_folder/gc/primehack/EUR" "/var/data/primehack/GC/EUR"
dir_prep "$saves_folder/gc/primehack/USA" "/var/data/primehack/GC/USA"
dir_prep "$saves_folder/gc/primehack/JAP" "/var/data/primehack/GC/JAP"
dir_prep "$saves_folder/gc/primehack/EU" "/var/data/primehack/GC/EUR"
dir_prep "$saves_folder/gc/primehack/US" "/var/data/primehack/GC/USA"
dir_prep "$saves_folder/gc/primehack/JP" "/var/data/primehack/GC/JAP"
dir_prep "$screenshots_folder" "/var/data/primehack/ScreenShots"
dir_prep "$states_folder/primehack" "/var/data/primehack/StateSaves"
dir_prep "$saves_folder/wii/primehack" "/var/data/primehack/Wii/"
dir_prep "$mods_folder/Primehack" "/var/data/primehack/Load/GraphicMods"
dir_prep "$texture_packs_folder/Primehack" "/var/data/primehack/Load/Textures"
set_setting_value "$primehackconf" "ISOPath0" "$roms_folder/gc" "primehack" "General"
fi
fi
@ -1745,6 +1757,7 @@ prepare_emulator() {
dir_prep "$bios_folder/switch/registered" "/var/data/yuzu/nand/system/Contents/registered"
dir_prep "$logs_folder/yuzu" "/var/data/yuzu/log"
dir_prep "$screenshots_folder" "/var/data/yuzu/screenshots"
dir_prep "$mods_folder/Yuzu" "/var/data/yuzu/load"
# removing dead symlinks as they were present in a past version
if [ -d $bios_folder/switch ]; then
find $bios_folder/switch -xtype l -exec rm {} \;
@ -1757,6 +1770,7 @@ prepare_emulator() {
dir_prep "$saves_folder/switch/yuzu/sdmc" "/var/data/yuzu/sdmc"
dir_prep "$logs_folder/yuzu" "/var/data/yuzu/log"
dir_prep "$screenshots_folder" "/var/data/yuzu/screenshots"
dir_prep "$mods_folder/Yuzu" "/var/data/yuzu/load"
set_setting_value "$yuzuconf" "nand_directory" "$saves_folder/switch/yuzu/nand" "yuzu" "Data%20Storage"
set_setting_value "$yuzuconf" "sdmc_directory" "$saves_folder/switch/yuzu/sdmc" "yuzu" "Data%20Storage"
set_setting_value "$yuzuconf" "Paths\gamedirs\4\path" "$roms_folder/switch" "yuzu" "UI"

View file

@ -34,12 +34,6 @@ helper_files_list="$emuconfigs/defaults/retrodeck/reference_lists/helper_files_l
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"
# Options list for users to pick from during finit
# Syntax is "enabled_by_default" "Option name" "Option description" "option_flag_to_be_checked_for"
finit_options_list=("false" "RPCS3 Firmware Install" "Install firmware needed for PS3 emulation during first install" "rpcs3_firmware" \
"false" "RetroDECK Controller Profile" "Install custom RetroDECK controller profile (stored in shared Steam directory)" "rd_controller_profile")
# Config files for emulators with single config files
cemuconf="/var/config/Cemu/settings.xml"

View file

@ -77,6 +77,7 @@ post_update() {
# - 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)
# - Move Dolphin and Primehack save folder names
# - Offer user option of installing custom controller config
mkdir -p "$mods_folder"
@ -133,6 +134,19 @@ post_update() {
rm -rf /var/config/retrodeck/tools
rm -rf /var/config/emulationstation/.emulationstation/gamelists/tools/
mv "$saves_folder/gc/dolphin/EUR" "$saves_folder/gc/dolphin/EU"
mv "$saves_folder/gc/dolphin/USA" "$saves_folder/gc/dolphin/US"
mv "$saves_folder/gc/dolphin/JAP" "$saves_folder/gc/dolphin/JP"
dir_prep "$saves_folder/gc/dolphin/EU" "/var/data/dolphin-emu/GC/EUR"
dir_prep "$saves_folder/gc/dolphin/US" "/var/data/dolphin-emu/GC/USA"
dir_prep "$saves_folder/gc/dolphin/JP" "/var/data/dolphin-emu/GC/JAP"
mv "$saves_folder/gc/primehack/EUR" "$saves_folder/gc/primehack/EU"
mv "$saves_folder/gc/primehack/USA" "$saves_folder/gc/primehack/US"
mv "$saves_folder/gc/primehack/JAP" "$saves_folder/gc/primehack/JP"
dir_prep "$saves_folder/gc/primehack/EU" "/var/data/primehack/GC/EUR"
dir_prep "$saves_folder/gc/primehack/US" "/var/data/primehack/GC/USA"
dir_prep "$saves_folder/gc/primehack/JP" "/var/data/primehack/GC/JAP"
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
install_retrodeck_controller_profile
@ -144,6 +158,9 @@ post_update() {
if [[ -d "/var/data/dolphin-emu/Load/DynamicInputTextures" ]]; then # Refresh installed textures if they have been enabled
rsync -a "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/dolphin-emu/Load/DynamicInputTextures/"
fi
if [[ -d "/var/data/primehack/Load/DynamicInputTextures" ]]; then # Refresh installed textures if they have been enabled
rsync -a "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/primehack/Load/DynamicInputTextures/"
fi
update_splashscreens
update_rd_conf

View file

@ -17,6 +17,8 @@ source /app/libexec/functions.sh
# - Login prompt
# - Dolphin Presets
# - Enable/Disable Custom Input Textures
# - Primehack Presets
# - Enable/Disable Custom Input Textures
# - Emulator Options (Behind one-time power user warning dialog)
# - Launch RetroArch
# - Launch Cemu
@ -337,7 +339,7 @@ configurator_retroarch_presets_dialog() {
}
configurator_dolphin_presets_dialog() {
choice=$(zenity --list --title="RetroDECK Configurator Utility - Dolphin Options" --cancel-label="Back" \
choice=$(zenity --list --title="RetroDECK Configurator Utility - Dolphin Presets" --cancel-label="Back" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
--column="Choice" --column="Action" \
"Change Custom Input Textures Setting" "Enable or disable custom input textures for supported games in Dolphin." )
@ -393,6 +395,63 @@ configurator_dolphin_input_textures_dialog() {
fi
}
configurator_primehack_presets_dialog() {
choice=$(zenity --list --title="RetroDECK Configurator Utility - Primehack Presets" --cancel-label="Back" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
--column="Choice" --column="Action" \
"Change Custom Input Textures Setting" "Enable or disable custom input textures for supported games in Primehack." )
case $choice in
"Change Custom Input Textures Setting" )
configurator_primehack_input_textures_dialog
;;
"" ) # No selection made or Back button clicked
configurator_welcome_dialog
;;
esac
}
configurator_primehack_input_textures_dialog() {
if [[ -d "/var/data/primehack/Load/DynamicInputTextures" ]]; then
zenity --question \
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Configurator - Dolphin Custom Input Textures" \
--text="Custom input textures are currently enabled. Do you want to disable them?."
if [ $? == 0 ]
then
set_setting_value $primehackgfxconf "HiresTextures" "False" primehack
rm -rf "/var/data/primehack/Load/DynamicInputTextures"
configurator_process_complete_dialog "disabling Primehack custom input textures"
else
configurator_primehack_presets_dialog
fi
else
zenity --question \
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Configurator - Primehack Custom Input Textures" \
--text="Custom input textures are currently disabled. Do you want to enable them?.\n\nThis process may take several minutes to complete."
if [ $? == 0 ]
then
set_setting_value $primehackgfxconf "HiresTextures" "True" primehack
(
mkdir "/var/data/primehack/Load/DynamicInputTextures"
cp -rf "/app/retrodeck/extras/DynamicInputTextures/*" "/var/data/primehack/Load/DynamicInputTextures/"
) |
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 Configurator Utility - Primehack Custom Input Textures Install"
configurator_process_complete_dialog "enabling Primehack custom input textures"
else
configurator_primehack_presets_dialog
fi
fi
}
configurator_compress_single_game_dialog() {
local file=$(file_browse "Game to compress")
if [[ ! -z "$file" ]]; then
@ -1070,12 +1129,16 @@ configurator_developer_dialog() {
configurator_welcome_dialog() {
if [[ $developer_options == "true" ]]; then
welcome_menu_options=("RetroArch Presets" "Change RetroArch presets, log into RetroAchievements etc." \
"Dolphin Presets" "Change available Dolphin presets" \
"Primehack Presets" "Change available Primehack presets" \
"Emulator Options" "Launch and configure each emulators settings (for advanced users)" \
"Tools and Troubleshooting" "Move RetroDECK to a new location, compress games and perform basic troubleshooting" \
"Reset" "Reset specific parts or all of RetroDECK" \
"Developer Options" "Welcome to the DANGER ZONE")
else
welcome_menu_options=("RetroArch Presets" "Change RetroArch presets, log into RetroAchievements etc." \
"Dolphin Presets" "Change available Dolphin presets" \
"Primehack Presets" "Change available Primehack presets" \
"Emulator Options" "Launch and configure each emulators settings (for advanced users)" \
"Tools and Troubleshooting" "Move RetroDECK to a new location, compress games and perform basic troubleshooting" \
"Reset" "Reset specific parts or all of RetroDECK" )
@ -1096,6 +1159,10 @@ configurator_welcome_dialog() {
configurator_dolphin_presets_dialog
;;
"Primehack Presets" )
configurator_primehack_presets_dialog
;;
"Emulator Options" )
configurator_power_user_warning_dialog
;;