diff --git a/automation_tools/automation_task_list.cfg b/automation_tools/automation_task_list.cfg index cd5908d4..be0c0ca2 100644 --- a/automation_tools/automation_task_list.cfg +++ b/automation_tools/automation_task_list.cfg @@ -4,5 +4,8 @@ hash^DOOMSHAPLACEHOLDER^https://buildbot.libretro.com/assets/cores/DOOM/Doom%20% hash^VITASHAPLACEHOLDER^https://github.com/Vita3K/Vita3K/releases/download/continuous/ubuntu-latest.zip hash^DUCKSTATIONSHAPLACEHOLDER^https://github.com/stenzek/duckstation/releases/download/preview/DuckStation-x64.AppImage hash^SAMEDUCKSHAPLACEHOLDER^https://buildbot.libretro.com/nightly/linux/x86_64/latest/sameduck_libretro.so.zip +hash^PPSSPPBIOSHASHPLACEHOLDER^https://github.com/hrydgard/ppsspp/archive/refs/heads/master.zip +hash^MSXBIOSHASHPLACEHOLDER^http://bluemsx.msxblue.com/rel_download/blueMSXv282full.zip +hash^XEMUHDDHASHPLACEHOLDER^https://github.com/mborgerson/xemu-hdd-image/releases/latest/download/xbox_hdd.qcow2.zip latestcommit^UNIVERSALDYNAMICINPUTCOMMITPLACEHOLDER^https://github.com/Venomalia/UniversalDynamicInput^main outside_info^VERSIONPLACEHOLDER^${GITHUB_WORKSPACE}/buildid diff --git a/emu-configs/defaults/retrodeck/presets/gg_presets.cfg b/emu-configs/defaults/retrodeck/presets/gg_presets.cfg index fc1b2efa..1fc0ebb7 100644 --- a/emu-configs/defaults/retrodeck/presets/gg_presets.cfg +++ b/emu-configs/defaults/retrodeck/presets/gg_presets.cfg @@ -1,7 +1,7 @@ config_file_format^retroarch target_file^/var/config/retroarch/config/Genesis Plus GX/gg.cfg defaults_file^$emuconfigs/retroarch/retroarch.cfg -change^borders^input_overlay^aspect_ratio_index^23 +change^borders^aspect_ratio_index^23 change^borders^custom_viewport_width^800 change^borders^custom_viewport_x^240 change^borders^custom_viewport_y^43 diff --git a/functions/patching.sh b/functions/patching.sh index 8a40059c..9d4ec3c6 100644 --- a/functions/patching.sh +++ b/functions/patching.sh @@ -12,9 +12,9 @@ set_setting_value() { "retrodeck" | "citra" | "melonds" | "yuzu" ) if [[ -z $current_section_name ]]; then - sed -i 's^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' $1 + sed -i 's^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' "$1" else - sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"'=^s^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' $1 + sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"'=^s^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' "$1" fi if [[ "$4" == "retrodeck" && ("$current_section_name" == "" || "$current_section_name" == "paths" || "$current_section_name" == "options") ]]; then # If a RetroDECK setting is being changed, also write it to memory for immediate use eval "$setting_name_to_change=$setting_value_to_change" @@ -23,25 +23,25 @@ set_setting_value() { "retroarch" ) if [[ -z $current_section_name ]]; then - sed -i 's^\^'"$setting_name_to_change"' = \".*\"^'"$setting_name_to_change"' = \"'"$setting_value_to_change"'\"^' $1 + sed -i 's^\^'"$setting_name_to_change"' = \".*\"^'"$setting_name_to_change"' = \"'"$setting_value_to_change"'\"^' "$1" else - sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"' = ^s^\^'"$setting_name_to_change"' = \".*\"^'"$setting_name_to_change"' = \"'"$setting_value_to_change"'\"^' $1 + sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"' = ^s^\^'"$setting_name_to_change"' = \".*\"^'"$setting_name_to_change"' = \"'"$setting_value_to_change"'\"^' "$1" fi ;; "dolphin" | "duckstation" | "pcsx2" | "ppsspp" | "primehack" | "xemu" ) if [[ -z $current_section_name ]]; then - sed -i 's^\^'"$setting_name_to_change"' =.*^'"$setting_name_to_change"' = '"$setting_value_to_change"'^' $1 + sed -i 's^\^'"$setting_name_to_change"' =.*^'"$setting_name_to_change"' = '"$setting_value_to_change"'^' "$1" else - sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"' =^s^\^'"$setting_name_to_change"' =.*^'"$setting_name_to_change"' = '"$setting_value_to_change"'^' $1 + sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"' =^s^\^'"$setting_name_to_change"' =.*^'"$setting_name_to_change"' = '"$setting_value_to_change"'^' "$1" fi ;; "rpcs3" ) # This does not currently work for settings with a $ in them if [[ -z $current_section_name ]]; then - sed -i 's^\^'"$setting_name_to_change"': .*^'"$setting_name_to_change"': '"$setting_value_to_change"'^' $1 + sed -i 's^\^'"$setting_name_to_change"': .*^'"$setting_name_to_change"': '"$setting_value_to_change"'^' "$1" else - sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"'.*^s^\^'"$setting_name_to_change"': .*^'"$setting_name_to_change"': '"$setting_value_to_change"'^' $1 + sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"'.*^s^\^'"$setting_name_to_change"': .*^'"$setting_name_to_change"': '"$setting_value_to_change"'^' "$1" fi ;; @@ -54,7 +54,7 @@ set_setting_value() { ;; "es_settings" ) - sed -i 's^'"$setting_name_to_change"'" value=".*"^'"$setting_name_to_change"'" value="'"$setting_value_to_change"'"^' $1 + sed -i 's^'"$setting_name_to_change"'" value=".*"^'"$setting_name_to_change"'" value="'"$setting_value_to_change"'"^' "$1" ;; esac @@ -94,17 +94,17 @@ get_setting_value() { "retrodeck" | "citra" | "melonds" | "yuzu" ) # For files with this syntax - setting_name=setting_value if [[ -z $current_section_name ]]; then - echo $(grep -o -P "(?<=^$current_setting_name=).*" $1) + echo $(grep -o -P "(?<=^$current_setting_name=).*" "$1") else - sed -n -E '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'|\[^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' $1 | grep -o -P "(?<=^$current_setting_name=).*" + sed -n -E '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'|\[^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' "$1" | grep -o -P "(?<=^$current_setting_name=).*" fi ;; "retroarch" ) # For files with this syntax - setting_name = "setting_value" if [[ -z $current_section_name ]]; then - echo $(grep -o -P "(?<=^$current_setting_name = \").*(?=\")" $1) + echo $(grep -o -P "(?<=^$current_setting_name = \").*(?=\")" "$1") else - sed -n -E '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'|\[^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' $1 | grep -o -P "(?<=^$current_setting_name = \").*(?=\")" + sed -n -E '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'|\[^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' "$1" | grep -o -P "(?<=^$current_setting_name = \").*(?=\")" fi ;; @@ -112,28 +112,28 @@ get_setting_value() { if [[ -z $current_section_name ]]; then echo $(grep -o -P "(?<=^$current_setting_name = ).*" $1) else - sed -n -E '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'|\[^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' $1 | grep -o -P "(?<=^$current_setting_name = ).*" + sed -n -E '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'|\[^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' "$1" | grep -o -P "(?<=^$current_setting_name = ).*" fi ;; "rpcs3" ) # For files with this syntax - setting_name: setting_value if [[ -z $current_section_name ]]; then - echo $(grep -o -P "(?<=$current_setting_name: ).*" $1) + echo $(grep -o -P "(?<=$current_setting_name: ).*" "$1") else - sed -n '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' $1 | grep -o -P "(?<=$current_setting_name: ).*" + sed -n '\^\['"$current_section_name"'\]^,\^\^'"$current_setting_name"'^{ \^\['"$current_section_name"'\]^! { \^\^'"$current_setting_name"'^ p } }' "$1" | grep -o -P "(?<=$current_setting_name: ).*" fi ;; "cemu" ) if [[ -z "$current_section_name" ]]; then - echo $(xml sel -t -v "//$current_setting_name" $1) + echo $(xml sel -t -v "//$current_setting_name" "$1") else - echo $(xml sel -t -v "//$current_section_name/$current_setting_name" $1) + echo $(xml sel -t -v "//$current_section_name/$current_setting_name" "$1") fi ;; "es_settings" ) - echo $(grep -o -P "(?<=$current_setting_name\" value=\").*(?=\")" $1) + echo $(grep -o -P "(?<=$current_setting_name\" value=\").*(?=\")" "$1") ;; esac @@ -153,7 +153,7 @@ add_setting_line() { if [[ -f "$1" ]]; then sed -i '$ a '"$current_setting_line"'' "$1" else # If the file doesn't exist, sed add doesn't work for the first line - echo "$current_setting_line" > $1 + echo "$current_setting_line" > "$1" fi else sed -i '/^\s*?\['"$current_section_name"'\]|\b'"$current_section_name"':$/a '"$current_setting_line"'' "$1" @@ -278,12 +278,12 @@ generate_single_patch() { if [[ ! -z $(grep -o -P "^\[.+?\]$" <<< "$current_setting_line") || ! -z $(grep -o -P "^\b.+?:$" <<< "$current_setting_line") ]]; then # Capture section header lines if [[ $current_setting_line =~ ^\[.+\] ]]; then # If normal section line action="section" - current_section=$(sed 's^[][]^^g' <<< $current_setting_line) # Remove brackets from section name + current_section=$(sed 's^[][]^^g' <<< "$current_setting_line") # Remove brackets from section name elif [[ ! -z $(grep -o -P "^\b.+?:$" <<< "$current_setting_line") ]]; then # If RPCS3 section name action="section" - current_section=$(sed 's^:$^^' <<< $current_setting_line) # Remove colon from section name + current_section=$(sed 's^:$^^' <<< "$current_setting_line") # Remove colon from section name fi - elif [[ (! -z $current_section) ]]; then # If line is in a section... + elif [[ (! -z "$current_section") ]]; then # If line is in a section... if [[ ! -z $(grep -o -P "^\s*?#.*?$" <<< "$current_setting_line") ]]; then # Check for disabled lines if [[ -z $(sed -n -E '\^\['"$current_section"'\]|\b'"$current_section"':$^,\^\s*?'"$(sed -E 's/^[ \t]*//;' <<< "$escaped_setting_line")"'^{ \^\['"$current_section"'\]|\b'"$current_section"':$^! { \^\s*?'"$(sed -E 's/^[ \t]*//' <<< "$escaped_setting_line")"'^ p } }' "$modified_file") ]]; then # If disabled line is not disabled in new file... action="disable_setting" @@ -296,7 +296,7 @@ generate_single_patch() { current_setting_name=$(get_setting_name "$escaped_setting_line" "$system") if [[ (-z $(sed -n -E '\^\['"$current_section"'\]|\b'"$current_section"':$^,\^\b'"$current_setting_name"'\s*?[:=]^{ \^\['"$current_section"'\]|\b'"$current_section"':$^! { \^\b'"$(sed -E 's/^[ \t]*//;' <<< "$escaped_setting_line")"'$^ p } }' "$modified_file")) ]]; then # If the same setting line is not found in the same section of the modified file... if [[ ! -z $(sed -n -E '\^\['"$current_section"'\]|\b'"$current_section"':$^,\^\b'"$current_setting_name"'\s*?[:=]^{ \^\['"$current_section"'\]|\b'"$current_section"':$^! { \^\b'"$current_setting_name"'\s*?[:=]^ p } }' "$modified_file") ]]; then # But the setting exists in that section, only with a different value... - new_setting_value=$(get_setting_value $2 "$current_setting_name" "$system" $current_section) + new_setting_value=$(get_setting_value "$2" "$current_setting_name" "$system" $current_section) action="change" echo $action"^"$current_section"^"$(sed -e 's%\\\\%\\%g' <<< "$current_setting_name")"^"$new_setting_value"^"$system >> "$patch_file" fi @@ -367,7 +367,7 @@ deploy_single_patch() { # This function will take an "original" file and a patch file and generate a ready to use modified file # USAGE: deploy_single_patch $original_file $patch_file $output_file -cp -fv $1 $3 # Create a copy of the original file to be patched +cp -fv "$1" "$3" # Create a copy of the original file to be patched while IFS="^" read -r action current_section setting_name setting_value system_name do @@ -383,22 +383,22 @@ do ;; "add_setting_line" ) - add_setting_line $3 "$setting_name" $system_name $current_section + add_setting_line "$3" "$setting_name" "$system_name" "$current_section" ;; "disable_setting" ) - disable_setting $3 "$setting_name" $system_name $current_section + disable_setting "$3" "$setting_name" "$system_name" "$current_section" ;; "enable_setting" ) - enable_setting $3 "$setting_name" $system_name $current_section + enable_setting "$3" "$setting_name" "$system_name" "$current_section" ;; "change" ) if [[ "$setting_value" = \$* ]]; then # If patch setting value is a reference to an internal variable name eval setting_value="$setting_value" fi - set_setting_value $3 "$setting_name" "$setting_value" $system_name $current_section + set_setting_value "$3" "$setting_name" "$setting_value" "$system_name" "$current_section" ;; *"#"* ) @@ -410,7 +410,7 @@ do ;; esac -done < $2 +done < "$2" } deploy_multi_patch() { @@ -442,28 +442,28 @@ do if [[ "$config_file" = \$* ]]; then # If patch setting value is a reference to an internal variable name eval config_file="$config_file" fi - add_setting_line "$config_file" "$setting_name" $system_name $current_section + add_setting_line "$config_file" "$setting_name" "$system_name" "$current_section" ;; "disable_setting" ) if [[ "$config_file" = \$* ]]; then # If patch setting value is a reference to an internal variable name eval config_file="$config_file" fi - disable_setting "$config_file" "$setting_name" $system_name $current_section + disable_setting "$config_file" "$setting_name" "$system_name" "$current_section" ;; "enable_setting" ) if [[ "$config_file" = \$* ]]; then # If patch setting value is a reference to an internal variable name eval config_file="$config_file" fi - enable_setting "$config_file" "$setting_name" $system_name $current_section + enable_setting "$config_file" "$setting_name" "$system_name" "$current_section" ;; "change" ) if [[ "$setting_value" = \$* ]]; then # If patch setting value is a reference to an internal variable name eval setting_value="$setting_value" fi - set_setting_value "$config_file" "$setting_name" "$setting_value" $system_name $current_section + set_setting_value "$config_file" "$setting_name" "$setting_value" "$system_name" "$current_section" ;; *"#"* ) @@ -475,5 +475,5 @@ do ;; esac -done < $1 +done < "$1" } diff --git a/functions/post_update.sh b/functions/post_update.sh index 618d84b9..98a219ca 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -182,6 +182,7 @@ post_update() { set_setting_value "$es_settings" "ROMDirectory" "$roms_folder" "es_settings" set_setting_value "$es_settings" "MediaDirectory" "$media_folder" "es_settings" + sed -i '$ a ' "$es_settings" # Add new default line to existing file set_setting_value "$es_settings" "UserThemeDirectory" "$themes_folder" "es_settings" unlink "/var/config/emulationstation/ROMs" unlink "/var/config/emulationstation/.emulationstation/downloaded_media" @@ -191,6 +192,7 @@ post_update() { set_setting_value "$raconf" "savestate_auto_save" "false" "retroarch" set_setting_value "$pcsx2conf" "SaveStateOnShutdown" "false" "pcsx2" "EmuCore" set_setting_value "$duckstationconf" "SaveStateOnExit" "false" "duckstation" "Main" + set_setting_value "$duckstationconf" "Enabled" "false" "duckstation" "Cheevos" prepare_emulator "reset" "cemu" fi diff --git a/functions/prepare_emulator.sh b/functions/prepare_emulator.sh index 5eb651d2..9fc314c9 100644 --- a/functions/prepare_emulator.sh +++ b/functions/prepare_emulator.sh @@ -59,66 +59,52 @@ prepare_emulator() { if [[ "$emulator" =~ ^(retroarch|RetroArch|all)$ ]]; then if [[ "$action" == "reset" ]]; then # Run reset-only commands - if [[ $(check_network_connectivity) == "true" ]]; then - if [[ $multi_user_mode == "true" ]]; then - rm -rf "$multi_user_data_folder/$SteamAppUser/config/retroarch" - mkdir -p "$multi_user_data_folder/$SteamAppUser/config/retroarch" - cp -fv $emuconfigs/retroarch/retroarch.cfg "$multi_user_data_folder/$SteamAppUser/config/retroarch/" - cp -fv $emuconfigs/retroarch/retroarch-core-options.cfg "$multi_user_data_folder/$SteamAppUser/config/retroarch/" - else - rm -rf /var/config/retroarch - mkdir -p /var/config/retroarch - dir_prep "$bios_folder" "/var/config/retroarch/system" - dir_prep "$logs_folder/retroarch" "/var/config/retroarch/logs" - mkdir -pv /var/config/retroarch/shaders/ - cp -rf /app/share/libretro/shaders /var/config/retroarch/ - dir_prep "$rdhome/shaders/retroarch" "/var/config/retroarch/shaders" - rsync -a --mkpath "/app/share/libretro/cores/" "/var/config/retroarch/cores/" - cp -fv $emuconfigs/retroarch/retroarch.cfg /var/config/retroarch/ - cp -fv $emuconfigs/retroarch/retroarch-core-options.cfg /var/config/retroarch/ - rsync -a --mkpath "$emuconfigs/retroarch/core-overrides/" "/var/config/retroarch/config/" - rsync -a --mkpath "$emuconfigs/defaults/retrodeck/presets/remaps/" "/var/config/retroarch/config/remaps/" - dir_prep "$borders_folder" "/var/config/retroarch/overlays/borders" - rsync -a --mkpath "/app/retrodeck/emu-configs/retroarch/borders/" "/var/config/retroarch/overlays/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" - set_setting_value "$raconf" "log_dir" "$logs_folder" "retroarch" - fi - - # PPSSPP - echo "--------------------------------" - echo "Initializing PPSSPP_LIBRETRO" - echo "--------------------------------" - if [ -d $bios_folder/PPSSPP/flash0/font ] - then - mv -fv $bios_folder/PPSSPP/flash0/font $bios_folder/PPSSPP/flash0/font.bak - fi - mkdir -p $bios_folder/PPSSPP - wget "https://github.com/hrydgard/ppsspp/archive/refs/heads/master.zip" -P $bios_folder/PPSSPP - unzip -q "$bios_folder/PPSSPP/master.zip" -d $bios_folder/PPSSPP/ - mv -f "$bios_folder/PPSSPP/ppsspp-master/assets/"* "$bios_folder/PPSSPP/" - rm -rfv "$bios_folder/PPSSPP/master.zip" - rm -rfv "$bios_folder/PPSSPP/ppsspp-master" - if [ -d $bios_folder/PPSSPP/flash0/font.bak ] - then - mv -f $bios_folder/PPSSPP/flash0/font.bak $bios_folder/PPSSPP/flash0/font - fi - - # MSX / SVI / ColecoVision / SG-1000 - echo "-----------------------------------------------------------" - echo "Initializing MSX / SVI / ColecoVision / SG-1000 LIBRETRO" - echo "-----------------------------------------------------------" - wget "http://bluemsx.msxblue.com/rel_download/blueMSXv282full.zip" -P $bios_folder/MSX - unzip -q "$bios_folder/MSX/blueMSXv282full.zip" -d $bios_folder/MSX - mv -f $bios_folder/MSX/Databases $bios_folder/Databases - mv -f $bios_folder/MSX/Machines $bios_folder/Machines - rm -rf $bios_folder/MSX + if [[ $multi_user_mode == "true" ]]; then + rm -rf "$multi_user_data_folder/$SteamAppUser/config/retroarch" + mkdir -p "$multi_user_data_folder/$SteamAppUser/config/retroarch" + cp -fv $emuconfigs/retroarch/retroarch.cfg "$multi_user_data_folder/$SteamAppUser/config/retroarch/" + cp -fv $emuconfigs/retroarch/retroarch-core-options.cfg "$multi_user_data_folder/$SteamAppUser/config/retroarch/" else - if [[ "$call_source" == "cli" ]]; then - printf "You do not appear to be connected to a network with internet access.\n\nThe RetroArch reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available.\n" - fi + rm -rf /var/config/retroarch + mkdir -p /var/config/retroarch + dir_prep "$bios_folder" "/var/config/retroarch/system" + dir_prep "$logs_folder/retroarch" "/var/config/retroarch/logs" + mkdir -pv /var/config/retroarch/shaders/ + cp -rf /app/share/libretro/shaders /var/config/retroarch/ + dir_prep "$rdhome/shaders/retroarch" "/var/config/retroarch/shaders" + rsync -a --mkpath "/app/share/libretro/cores/" "/var/config/retroarch/cores/" + cp -fv $emuconfigs/retroarch/retroarch.cfg /var/config/retroarch/ + cp -fv $emuconfigs/retroarch/retroarch-core-options.cfg /var/config/retroarch/ + rsync -a --mkpath "$emuconfigs/retroarch/core-overrides/" "/var/config/retroarch/config/" + rsync -a --mkpath "$emuconfigs/defaults/retrodeck/presets/remaps/" "/var/config/retroarch/config/remaps/" + dir_prep "$borders_folder" "/var/config/retroarch/overlays/borders" + rsync -a --mkpath "/app/retrodeck/emu-configs/retroarch/borders/" "/var/config/retroarch/overlays/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" + set_setting_value "$raconf" "log_dir" "$logs_folder" "retroarch" fi + + # PPSSPP + echo "--------------------------------" + echo "Initializing PPSSPP_LIBRETRO" + echo "--------------------------------" + if [ -d $bios_folder/PPSSPP/flash0/font ] + then + mv -fv $bios_folder/PPSSPP/flash0/font $bios_folder/PPSSPP/flash0/font.bak + fi + cp -rf "/app/retrodeck/extras/PPSSPP" "$bios_folder/PPSSPP" + if [ -d $bios_folder/PPSSPP/flash0/font.bak ] + then + mv -f $bios_folder/PPSSPP/flash0/font.bak $bios_folder/PPSSPP/flash0/font + fi + + # MSX / SVI / ColecoVision / SG-1000 + echo "-----------------------------------------------------------" + echo "Initializing MSX / SVI / ColecoVision / SG-1000 LIBRETRO" + echo "-----------------------------------------------------------" + cp -rf "/app/retrodeck/extras/MSX/Databases" "$bios_folder/Databases" + cp -rf "/app/retrodeck/extras/MSX/Machines" "$bios_folder/Machines" fi if [[ "$action" == "postmove" ]]; then # Run only post-move commands dir_prep "$bios_folder" "/var/config/retroarch/system" @@ -147,8 +133,8 @@ prepare_emulator() { rm -rf /var/config/Cemu mkdir -pv /var/config/Cemu/ cp -fr "$emuconfigs/cemu/"* /var/config/Cemu/ - set_setting_value "$multi_user_data_folder/$SteamAppUser/config/Cemu/settings.ini" "mlc_path" "$bios_folder/cemu" "cemu" - set_setting_value "$multi_user_data_folder/$SteamAppUser/config/Cemu/settings.ini" "Entry" "$roms_folder/wiiu" "cemu" "GamePaths" + set_setting_value "$cemuconf" "mlc_path" "$bios_folder/cemu" "cemu" + set_setting_value "$cemuconf" "Entry" "$roms_folder/wiiu" "cemu" "GamePaths" fi # Shared actions dir_prep "$saves_folder/wiiu/cemu" "$bios_folder/cemu/usr/save" @@ -514,46 +500,38 @@ prepare_emulator() { if [[ "$emulator" =~ ^(xemu|XEMU|all)$ ]]; then if [[ "$action" == "reset" ]]; then # Run reset-only commands - if [[ $(check_network_connectivity) == "true" ]]; then - echo "------------------------" - echo "Initializing XEMU" - echo "------------------------" - if [[ $multi_user_mode == "true" ]]; then # Multi-user actions - rm -rf /var/config/xemu - rm -rf /var/data/xemu - rm -rf "$multi_user_data_folder/$SteamAppUser/config/xemu" - mkdir -pv "$multi_user_data_folder/$SteamAppUser/config/xemu/" - cp -fv $emuconfigs/xemu/xemu.toml "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" - set_setting_value "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" "screenshot_dir" "'$screenshots_folder'" "xemu" "General" - set_setting_value "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" "bootrom_path" "'$bios_folder/mcpx_1.0.bin'" "xemu" "sys.files" - set_setting_value "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" "flashrom_path" "'$bios_folder/Complex.bin'" "xemu" "sys.files" - set_setting_value "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" "eeprom_path" "$saves_folder/xbox/xemu/xbox-eeprom.bin" "xemu" "sys.files" - set_setting_value "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" "hdd_path" "'$bios_folder/xbox_hdd.qcow2'" "xemu" "sys.files" - dir_prep "$multi_user_data_folder/$SteamAppUser/config/xemu" "/var/config/xemu" # Creating config folder in /var/config for consistentcy and linking back to original location where emulator will look - dir_prep "$multi_user_data_folder/$SteamAppUser/config/xemu" "/var/data/xemu" - else # Single-user actions - rm -rf /var/config/xemu - rm -rf /var/data/xemu - dir_prep "/var/config/xemu" "/var/data/xemu" # Creating config folder in /var/config for consistentcy and linking back to original location where emulator will look - cp -fv $emuconfigs/xemu/xemu.toml "$xemuconf" - set_setting_value "$xemuconf" "screenshot_dir" "'$screenshots_folder'" "xemu" "General" - set_setting_value "$xemuconf" "bootrom_path" "'$bios_folder/mcpx_1.0.bin'" "xemu" "sys.files" - set_setting_value "$xemuconf" "flashrom_path" "'$bios_folder/Complex.bin'" "xemu" "sys.files" - set_setting_value "$xemuconf" "eeprom_path" "$saves_folder/xbox/xemu/xbox-eeprom.bin" "xemu" "sys.files" - set_setting_value "$xemuconf" "hdd_path" "'$bios_folder/xbox_hdd.qcow2'" "xemu" "sys.files" - fi # Shared actions - mkdir -pv $saves_folder/xbox/xemu/ - # Preparing HD dummy Image if the image is not found - if [ ! -f $bios_folder/xbox_hdd.qcow2 ] - then - wget "https://github.com/mborgerson/xemu-hdd-image/releases/latest/download/xbox_hdd.qcow2.zip" -P $bios_folder/ - unzip -q $bios_folder/xbox_hdd.qcow2.zip -d $bios_folder/ - rm -rfv $bios_folder/xbox_hdd.qcow2.zip - fi - else - if [[ "$call_source" == "cli" ]]; then - printf "You do not appear to be connected to a network with internet access.\n\nThe Xemu reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available.\n" - fi + echo "------------------------" + echo "Initializing XEMU" + echo "------------------------" + if [[ $multi_user_mode == "true" ]]; then # Multi-user actions + rm -rf /var/config/xemu + rm -rf /var/data/xemu + rm -rf "$multi_user_data_folder/$SteamAppUser/config/xemu" + mkdir -pv "$multi_user_data_folder/$SteamAppUser/config/xemu/" + cp -fv $emuconfigs/xemu/xemu.toml "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" + set_setting_value "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" "screenshot_dir" "'$screenshots_folder'" "xemu" "General" + set_setting_value "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" "bootrom_path" "'$bios_folder/mcpx_1.0.bin'" "xemu" "sys.files" + set_setting_value "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" "flashrom_path" "'$bios_folder/Complex.bin'" "xemu" "sys.files" + set_setting_value "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" "eeprom_path" "$saves_folder/xbox/xemu/xbox-eeprom.bin" "xemu" "sys.files" + set_setting_value "$multi_user_data_folder/$SteamAppUser/config/xemu/xemu.toml" "hdd_path" "'$bios_folder/xbox_hdd.qcow2'" "xemu" "sys.files" + dir_prep "$multi_user_data_folder/$SteamAppUser/config/xemu" "/var/config/xemu" # Creating config folder in /var/config for consistentcy and linking back to original location where emulator will look + dir_prep "$multi_user_data_folder/$SteamAppUser/config/xemu" "/var/data/xemu" + else # Single-user actions + rm -rf /var/config/xemu + rm -rf /var/data/xemu + dir_prep "/var/config/xemu" "/var/data/xemu" # Creating config folder in /var/config for consistentcy and linking back to original location where emulator will look + cp -fv $emuconfigs/xemu/xemu.toml "$xemuconf" + set_setting_value "$xemuconf" "screenshot_dir" "'$screenshots_folder'" "xemu" "General" + set_setting_value "$xemuconf" "bootrom_path" "'$bios_folder/mcpx_1.0.bin'" "xemu" "sys.files" + set_setting_value "$xemuconf" "flashrom_path" "'$bios_folder/Complex.bin'" "xemu" "sys.files" + set_setting_value "$xemuconf" "eeprom_path" "$saves_folder/xbox/xemu/xbox-eeprom.bin" "xemu" "sys.files" + set_setting_value "$xemuconf" "hdd_path" "'$bios_folder/xbox_hdd.qcow2'" "xemu" "sys.files" + fi # Shared actions + mkdir -pv $saves_folder/xbox/xemu/ + # Preparing HD dummy Image if the image is not found + if [ ! -f $bios_folder/xbox_hdd.qcow2 ] + then + cp -f "/app/retrodeck/extras/XEMU/xbox_hdd.qcow2" "$bios_folder/xbox_hdd.qcow2" fi fi if [[ "$action" == "postmove" ]]; then # Run only post-move commands diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 1b5a4c34..1143e6e1 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -463,6 +463,27 @@ modules: url: https://buildbot.libretro.com/nightly/linux/x86_64/latest/sameduck_libretro.so.zip sha256: SAMEDUCKSHAPLACEHOLDER + - name: ppsspp-bios + buildsystem: simple + build-commands: + - mkdir -p ${FLATPAK_DEST}/retrodeck/extras/PPSSPP + - mv -f "ppsspp-master/assets/"* "${FLATPAK_DEST}/retrodeck/extras/PPSSPP/" + sources: + - type: archive + url: https://github.com/hrydgard/ppsspp/archive/refs/heads/master.zip + sha256: PPSSPPBIOSHASHPLACEHOLDER + + - name: msx-bios + buildsystem: simple + build-commands: + - mkdir -p ${FLATPAK_DEST}/retrodeck/extras/MSX + - mv -f Databases ${FLATPAK_DEST}/retrodeck/extras/MSX/Databases + - mv -f Machines ${FLATPAK_DEST}/retrodeck/extras/MSX/Machines + sources: + - type: archive + url: http://bluemsx.msxblue.com/rel_download/blueMSXv282full.zip + sha256: MSXBIOSHASHPLACEHOLDER + - name: doom-shareware buildsystem: simple build-commands: @@ -790,6 +811,16 @@ modules: timestamp-query: .published_at version-query: .tag_name + - name: xemu-dummy-hdd + buildsystem: simple + build-commands: + - mkdir -p ${FLATPAK_DEST}/retrodeck/extras/XEMU + - mv -f "xbox_hdd.qcow2" "${FLATPAK_DEST}/retrodeck/extras/XEMU/xbox_hdd.qcow2" + sources: + - type: archive + url: https://github.com/mborgerson/xemu-hdd-image/releases/latest/download/xbox_hdd.qcow2.zip + sha256: XEMUHDDHASHPLACEHOLDER + # XEMU - END # MELONDS - START diff --git a/retrodeck.sh b/retrodeck.sh index 47faaeda..e6297aed 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -140,12 +140,7 @@ if [ -f "$lockfile" ]; then # if the lock file doesn't exist at all means that it's a fresh install or a triggered reset else echo "Lockfile not found" - if [[ $(check_network_connectivity) == "true" ]]; then - finit # Executing First/Force init - else - configurator_generic_dialog "RetroDECK Setup" "You do not appear to be connected to a network with internet access.\n\nThe initial RetroDECK setup requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available." - exit 1 - fi + finit # Executing First/Force init fi if [[ $multi_user_mode == "true" ]]; then diff --git a/tools/configurator.sh b/tools/configurator.sh index 5c77d71c..45333176 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -943,13 +943,8 @@ configurator_reset_dialog() { "RetroArch" | "XEMU" ) # Emulators that require network access if [[ $(configurator_reset_confirmation_dialog "$emulator_to_reset" "Are you sure you want to reset the $emulator_to_reset emulator to default settings?\n\nThis process cannot be undone.") == "true" ]]; then - if [[ $(check_network_connectivity) == "true" ]]; then - prepare_emulator "reset" "$emulator_to_reset" "configurator" - configurator_process_complete_dialog "resetting $emulator_to_reset" - else - configurator_generic_dialog "RetroDeck Configurator - RetroDECK: Reset" "You do not appear to be connected to a network with internet access.\n\nThe $emulator_to_reset reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available." - configurator_reset_dialog - fi + prepare_emulator "reset" "$emulator_to_reset" "configurator" + configurator_process_complete_dialog "resetting $emulator_to_reset" else configurator_generic_dialog "RetroDeck Configurator - RetroDECK: Reset" "Reset process cancelled." configurator_reset_dialog @@ -975,19 +970,14 @@ configurator_reset_dialog() { "Reset All Emulators" ) if [[ $(configurator_reset_confirmation_dialog "all emulators" "Are you sure you want to reset all emulators to default settings?\n\nThis process cannot be undone.") == "true" ]]; then - if [[ $(check_network_connectivity) == "true" ]]; then - ( - prepare_emulator "reset" "all" - ) | - 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 Finishing Initialization" \ - --text="RetroDECK is finishing the reset process, please wait." - configurator_process_complete_dialog "resetting all emulators" - else - configurator_generic_dialog "RetroDeck Configurator - RetroDECK: Reset" "You do not appear to be connected to a network with internet access.\n\nThe all-emulator reset process requires some files from the internet to function properly.\n\nPlease retry this process once a network connection is available." - configurator_reset_dialog - fi + ( + prepare_emulator "reset" "all" + ) | + 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 Finishing Initialization" \ + --text="RetroDECK is finishing the reset process, please wait." + configurator_process_complete_dialog "resetting all emulators" else configurator_generic_dialog "RetroDeck Configurator - RetroDECK: Reset" "Reset process cancelled." configurator_reset_dialog