From a13d3f4bd28487f3706e46ba8aaf6a4581c177ad Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 22 Feb 2024 14:48:43 -0500 Subject: [PATCH 01/13] Add per-system compression tool option --- functions/compression.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/functions/compression.sh b/functions/compression.sh index 72876292..3d5a819f 100644 --- a/functions/compression.sh +++ b/functions/compression.sh @@ -2,7 +2,7 @@ compress_game() { # Function for compressing one or more files to .chd format - # USAGE: compress_game $format $full_path_to_input_file + # USAGE: compress_game $format $full_path_to_input_file $system(optional) local file="$2" local filename_no_path=$(basename "$file") local filename_no_extension="${filename_no_path%.*}" @@ -10,7 +10,11 @@ compress_game() { local dest_file=$(dirname "$(realpath "$file")")"/""$filename_no_extension" if [[ "$1" == "chd" ]]; then - /app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd + if [[ "$3" == "psp" ]]; then + echo "Put createdvd or maxcso here" # TODO + else + /app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd + fi elif [[ "$1" == "zip" ]]; then zip -jq9 "$dest_file".zip "$source_file" elif [[ "$1" == "rvz" ]]; then @@ -93,11 +97,11 @@ cli_compress_single_game() { read -p "RetroDECK will now attempt to compress your selected game. Press Enter key to continue..." if [[ ! -z "$file" ]]; then if [[ -f "$file" ]]; then - check_system=$(echo "$file" | grep -oE "$roms_folder/[^/]+" | grep -oE "[^/]+$") + local system=$(echo "$file" | grep -oE "$roms_folder/[^/]+" | grep -oE "[^/]+$") local compatible_compression_format=$(find_compatible_compression_format "$file") if [[ ! $compatible_compression_format == "none" ]]; then echo "$(basename "$file") can be compressed to $compatible_compression_format" - compress_game "$compatible_compression_format" "$file" + compress_game "$compatible_compression_format" "$file" "$system" if [[ $post_compression_cleanup == [yY] ]]; then # Remove file(s) if requested if [[ $(basename "$file") == *".cue" ]]; then local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file") @@ -155,7 +159,7 @@ cli_compress_all_games() { local compatible_compression_format=$(find_compatible_compression_format "$file") if [[ ! "$compatible_compression_format" == "none" ]]; then echo "$(basename "$file") can be compressed to $compatible_compression_format" - compress_game "$compatible_compression_format" "$file" + compress_game "$compatible_compression_format" "$file" "$system" if [[ $post_compression_cleanup == [yY] ]]; then # Remove file(s) if requested if [[ "$file" == *".cue" ]]; then local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file") From 100d08a23187b86c91edcb1e62e43509afaaa2fc Mon Sep 17 00:00:00 2001 From: icenine451 Date: Thu, 22 Feb 2024 14:49:08 -0500 Subject: [PATCH 02/13] Simplify Configurator single-file compression process --- tools/configurator.sh | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index edd9cf67..99d6c7b9 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -691,33 +691,24 @@ configurator_compression_tool_dialog() { configurator_compress_single_game_dialog() { local file=$(file_browse "Game to compress") if [[ ! -z "$file" ]]; then + local system=$(echo "$file" | grep -oE "$roms_folder/[^/]+" | grep -oE "[^/]+$") local compatible_compression_format=$(find_compatible_compression_format "$file") if [[ ! $compatible_compression_format == "none" ]]; then local post_compression_cleanup=$(configurator_compression_cleanup_dialog) ( - if [[ $compatible_compression_format == "chd" ]]; then - if [[ $(validate_for_chd "$file") == "true" ]]; then - echo "# Compressing $(basename "$file") to $compatible_compression_format format" - compress_game "chd" "$file" - if [[ $post_compression_cleanup == "true" ]]; then # Remove file(s) if requested - if [[ "$file" == *".cue" ]]; then - local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file") - local file_path=$(dirname "$(realpath "$file")") - while IFS= read -r line - do - rm -f "$file_path/$line" - done < <(printf '%s\n' "$cue_bin_files") - rm -f "$file" - else - rm -f "$file" - fi - fi - fi - else - echo "# Compressing $(basename "$file") to $compatible_compression_format format" - compress_game "$compatible_compression_format" "$file" - if [[ $post_compression_cleanup == "true" ]]; then # Remove file(s) if requested - rm -f "$file" + echo "# Compressing $(basename "$file") to $compatible_compression_format format" + compress_game "$compatible_compression_format" "$file" "$system" + if [[ $post_compression_cleanup == "true" ]]; then # Remove file(s) if requested + if [[ "$file" == *".cue" ]]; then + local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file") + local file_path=$(dirname "$(realpath "$file")") + while IFS= read -r line + do + rm -f "$file_path/$line" + done < <(printf '%s\n' "$cue_bin_files") + rm -f $(realpath "$file") + else + rm -f "$(realpath "$file")" fi fi ) | @@ -817,12 +808,13 @@ configurator_compress_multiple_games_dialog() { local post_compression_cleanup=$(configurator_compression_cleanup_dialog) ( for file in "${games_to_compress[@]}"; do + local system=$(echo "$file" | grep -oE "$roms_folder/[^/]+" | grep -oE "[^/]+$") local compression_format=$(find_compatible_compression_format "$file") echo "# Compressing $(basename "$file") into $compression_format format" # Update Zenity dialog text progress=$(( 100 - (( 100 / "$total_games_to_compress" ) * "$games_left_to_compress" ))) echo $progress games_left_to_compress=$((games_left_to_compress-1)) - compress_game "$compression_format" "$file" + compress_game "$compression_format" "$file" "$system" if [[ $post_compression_cleanup == "true" ]]; then # Remove file(s) if requested if [[ "$file" == *".cue" ]]; then local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file") From c89b0bf74ced17115ce44ebcdedbb060b05d9e39 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 23 Feb 2024 12:55:35 -0500 Subject: [PATCH 03/13] Fix execution flag command for tools scripts --- net.retrodeck.retrodeck.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index 5d895820..b7ab4bb8 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1325,7 +1325,7 @@ modules: # Tools - mkdir -p /app/tools - cp -r tools/** /app/tools - - find /app/tools -name '*.py|*.sh' -exec chmod +x {} \; + - find /app/tools -type f \( -name "*.sh" -o -name "*.py" \) -exec chmod +x {} \; # Function libraries - mkdir -p /app/libexec @@ -1361,4 +1361,4 @@ modules: sources: - type: git url: https://github.com/XargonWan/RetroDECK.git - branch: THISBRANCH \ No newline at end of file + branch: THISBRANCH From 4c10bd664ee06b6b3c88dcf563c802ca0a28e80a Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 23 Feb 2024 13:05:14 -0500 Subject: [PATCH 04/13] Fix download file function (the Flatpak WGET doesn't support the arguments needed for a real progress bar) --- functions/functions.sh | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/functions/functions.sh b/functions/functions.sh index ccbdcb91..58f2c026 100644 --- a/functions/functions.sh +++ b/functions/functions.sh @@ -107,34 +107,14 @@ download_file() { # file_dest is the destination the file should be in the filesystem, needs filename included! # file_name is a user-readable file name or description to be put in the Zenity dialog - # Run wget in the background and redirect the progress to a temporary file ( - wget "$1" -O "$2" -q --show-progress --progress=dot 2>&1 | sed -n -e 's/^.* \([0-9]*\)%.*$/\1/p' > "/var/cache/tmp/download_progress" & - wget_pid=$! - - progress="0" - echo "$progress" # Initial progress value. sent to Zenity - while true; do - progress=$(tail -n 2 "/var/cache/tmp/download_progress" | head -1) # Read the second-to-last value written to the pipe, to avoid reading data that is half written - echo "$progress" # Send value to Zenity - if [[ "$(tail -n 1 "/var/cache/tmp/download_progress")" == "100" ]]; then # Read last line every time to check for download completion - echo "100" - break - fi - sleep 0.5 - done - - # Wait for wget process to finish - wait "$wget_pid" + wget "$1" -O "$2" -q ) | zenity --progress \ --title="Downloading File" \ --text="Downloading $3..." \ - --percentage=0 \ + --pulsate \ --auto-close - - # Cleanup temp file - rm -f "/var/cache/tmp/download_progress" } update_rd_conf() { From 7087fc256f4fd2186fac169dd38a3676100012e3 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 23 Feb 2024 13:14:39 -0500 Subject: [PATCH 05/13] Make installing Vita3K firmware optional --- .../reference_lists/finit_options_list.cfg | 1 + functions/functions.sh | 16 +++++++++++++++ functions/prepare_component.sh | 7 ------- tools/configurator.sh | 20 +++++++++++++++++++ 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/emu-configs/defaults/retrodeck/reference_lists/finit_options_list.cfg b/emu-configs/defaults/retrodeck/reference_lists/finit_options_list.cfg index 0c1eb4f1..97689751 100644 --- a/emu-configs/defaults/retrodeck/reference_lists/finit_options_list.cfg +++ b/emu-configs/defaults/retrodeck/reference_lists/finit_options_list.cfg @@ -1,2 +1,3 @@ false^RPCS3 Firmware Install^Install firmware needed for PS3 emulation^rpcs3_firmware +false^Vita3K Firmware Install^Install firmware needed for Vita3K emulation^vita3k_firmware false^RetroDECK Controller Profile^Install custom RetroDECK controller profile^rd_controller_profile diff --git a/functions/functions.sh b/functions/functions.sh index 58f2c026..d7589ec4 100644 --- a/functions/functions.sh +++ b/functions/functions.sh @@ -294,6 +294,13 @@ update_rpcs3_firmware() { rm -rf "$roms_folder/ps3/tmp" } +update_vita3k_firmware() { + download_file "http://dus01.psv.update.playstation.net/update/psv/image/2022_0209/rel_f2c7b12fe85496ec88a0391b514d6e3b/PSVUPDAT.PUP" "/tmp/PSVUPDAT.PUP" "Vita3K Firmware file 1" + download_file "http://dus01.psp2.update.playstation.net/update/psp2/image/2019_0924/sd_8b5f60b56c3da8365b973dba570c53a5/PSP2UPDAT.PUP?dest=us" "/tmp/PSP2UPDAT.PUP" "Vita3K Firmware file 2" + Vita3K --firmware /tmp/PSVUPDAT.PUP + Vita3K --firmware /tmp/PSP2UPDAT.PUP +} + backup_retrodeck_userdata() { mkdir -p "$backups_folder" zip -rq9 "$backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip" "$saves_folder" "$states_folder" "$bios_folder" "$media_folder" "$themes_folder" "$logs_folder" "$screenshots_folder" "$mods_folder" "$texture_packs_folder" "$borders_folder" > $logs_folder/$(date +"%0m%0d")_backup_log.log @@ -449,6 +456,10 @@ finit() { 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 + if [[ "$finit_options_choices" =~ (vita3k_firmware|Enable All) ]]; then # Additional information on the firmware install process, as the emulator needs to be manually closed + configurator_generic_dialog "Vita3K Firmware Install" "You have chosen to install the Vita3K firmware during the RetroDECK first setup.\n\nThis process will take several minutes and requires network access.\n\nVita3K 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 + zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" \ --text="RetroDECK will now install the needed files, which can take up to one minute.\nRetroDECK will start once the process is completed.\n\nPress OK to continue." @@ -464,6 +475,11 @@ finit() { update_rpcs3_firmware fi fi + if [[ "$finit_options_choices" =~ (vita3k_firmware|Enable All) ]]; then + if [[ $(check_network_connectivity) == "true" ]]; then + update_vita3k_firmware + fi + fi if [[ "$finit_options_choices" =~ (rd_controller_profile|Enable All) ]]; then install_retrodeck_controller_profile fi diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index b367217b..ef2fa19f 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -686,13 +686,6 @@ prepare_component() { fi # Shared actions dir_prep "$saves_folder/psvita/vita3k" "$bios_folder/Vita3K/Vita3K/ux0/user/00/savedata" # Multi-user safe? - - # Installing firmware - # TODO: at the moment this is here instead of a tool because it seems like it cannot run without Firmware - curl "http://dus01.psv.update.playstation.net/update/psv/image/2022_0209/rel_f2c7b12fe85496ec88a0391b514d6e3b/PSVUPDAT.PUP" -po /tmp/PSVUPDAT.PUP - curl "http://dus01.psp2.update.playstation.net/update/psp2/image/2019_0924/sd_8b5f60b56c3da8365b973dba570c53a5/PSP2UPDAT.PUP?dest=us" -po /tmp/PSP2UPDAT.PUP - Vita3K --firmware /tmp/PSVUPDAT.PUP - Vita3K --firmware /tmp/PSP2UPDAT.PUP fi if [[ "$action" == "postmove" ]]; then # Run only post-move commands dir_prep "$saves_folder/psvita/vita3k" "$bios_folder/Vita3K/Vita3K/ux0/user/00/savedata" # Multi-user safe? diff --git a/tools/configurator.sh b/tools/configurator.sh index 99d6c7b9..ee5509eb 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -60,6 +60,7 @@ source /app/libexec/global.sh # - Compress All Games # - Install: RetroDECK SD Controller Profile # - Install: PS3 firmware +# - Install: PS Vita firmware # - RetroDECK: Change Update Setting # - Troubleshooting # - Backup: RetroDECK Userdata @@ -531,6 +532,7 @@ configurator_retrodeck_tools_dialog() { "Tool: Compress Games" "Compress games for systems that support it" \ "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: PS Vita Firmware" "Download and install PS Vita firmware for use with the Vita3K emulator" \ "RetroDECK: Change Update Setting" "Enable or disable online checks for new versions of RetroDECK" ) case $choice in @@ -571,6 +573,24 @@ configurator_retrodeck_tools_dialog() { fi ;; + "Install: PS Vita Firmware" ) + if [[ $(check_network_connectivity) == "true" ]]; then + configurator_generic_dialog "RetroDECK Configurator - Install: PS Vita firmware" "This tool will download firmware required by Vita3K to emulate PS Vita games.\n\nThe process will take several minutes, and the emulator will launch to finish the installation.\nPlease close Vita3K manually once the installation is complete." + ( + update_vita3k_firmware + ) | + zenity --progress --pulsate \ + --icon-name=net.retrodeck.retrodeck \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title="Downloading PS Vita Firmware" \ + --no-cancel \ + --auto-close + else + configurator_generic_dialog "RetroDECK Configurator - Install: PS Vita Firmware" "You do not appear to currently have Internet access, which is required by this tool. Please try again when network access has been restored." + configurator_retrodeck_tools_dialog + fi + ;; + "RetroDECK: Change Update Setting" ) configurator_online_update_setting_dialog ;; From e3cf79a46be7ff27b21c205e0781aafff0f90800 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 23 Feb 2024 13:37:22 -0500 Subject: [PATCH 06/13] Fix SD card detection --- functions/global.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/global.sh b/functions/global.sh index cabfb66f..e09d5e07 100644 --- a/functions/global.sh +++ b/functions/global.sh @@ -137,8 +137,8 @@ if [[ ! -f "$rd_conf" ]]; then # Check if SD card path has changed from SteamOS update if [[ ! -d "$default_sd" && "$(ls -A /run/media/deck/)" ]]; then - if [[ $(find media/deck/* -maxdepth 0 -type d -print | wc -l) -eq 1 ]]; then # If there is only one SD card found in the new SteamOS 3.5 location, assign it as the default - default_sd="$(find media/deck/* -maxdepth 0 -type d -print)" + if [[ $(find /run/media/deck/* -maxdepth 0 -type d -print | wc -l) -eq 1 ]]; then # If there is only one SD card found in the new SteamOS 3.5 location, assign it as the default + default_sd="$(find /run/media/deck/* -maxdepth 0 -type d -print)" else # If the default legacy path cannot be found, and there are multiple entries in the new Steam OS 3.5 SD card path, let the user pick which one to use configurator_generic_dialog "RetroDECK Setup" "The SD card was not found in the default location, and multiple drives were detected.\nPlease browse to the location of the desired SD card.\n\nIf you are not using an SD card, please click \"Cancel\"." default_sd="$(directory_browse "SD Card Location")" From 813e6b6e9bedcb68bad6f60b5095694b0e17958d Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 23 Feb 2024 13:41:42 -0500 Subject: [PATCH 07/13] Fix RetroDECK continuing to boot without a retrodeck.cfg after a CLI full reset --- retrodeck.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retrodeck.sh b/retrodeck.sh index 1758eee8..f80c0ea5 100644 --- a/retrodeck.sh +++ b/retrodeck.sh @@ -79,8 +79,8 @@ https://retrodeck.net if [[ $response == [yY] ]]; then rm -f "$lockfile" rm -f "$rd_conf" - read -p "The process has been completed, press Enter key to start the initial RetroDECK setup process." - shift # Continue launch after previous command is finished + read -p "The process has been completed, press Enter key to exit. Please run RetroDECK again to start the initial setup process." + exit 1 else read -p "The process has been cancelled, press Enter key to exit." exit From bd9197ca5925767ba338d473228fc764e73d762d Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 24 Feb 2024 08:57:46 +0100 Subject: [PATCH 08/13] Vita3K: minor fixes to text messages [skip ci] --- functions/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/functions.sh b/functions/functions.sh index d7589ec4..b5470eb0 100644 --- a/functions/functions.sh +++ b/functions/functions.sh @@ -295,8 +295,8 @@ update_rpcs3_firmware() { } update_vita3k_firmware() { - download_file "http://dus01.psv.update.playstation.net/update/psv/image/2022_0209/rel_f2c7b12fe85496ec88a0391b514d6e3b/PSVUPDAT.PUP" "/tmp/PSVUPDAT.PUP" "Vita3K Firmware file 1" - download_file "http://dus01.psp2.update.playstation.net/update/psp2/image/2019_0924/sd_8b5f60b56c3da8365b973dba570c53a5/PSP2UPDAT.PUP?dest=us" "/tmp/PSP2UPDAT.PUP" "Vita3K Firmware file 2" + download_file "http://dus01.psv.update.playstation.net/update/psv/image/2022_0209/rel_f2c7b12fe85496ec88a0391b514d6e3b/PSVUPDAT.PUP" "/tmp/PSVUPDAT.PUP" "Vita3K Firmware file: PSVUPDAT.PUP" + download_file "http://dus01.psp2.update.playstation.net/update/psp2/image/2019_0924/sd_8b5f60b56c3da8365b973dba570c53a5/PSP2UPDAT.PUP?dest=us" "/tmp/PSP2UPDAT.PUP" "Vita3K Firmware file: PSP2UPDAT.PUP" Vita3K --firmware /tmp/PSVUPDAT.PUP Vita3K --firmware /tmp/PSP2UPDAT.PUP } From 5fae1b986660507bc1b57bc651f9c2bb4d48fce8 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Mon, 26 Feb 2024 13:47:22 +0100 Subject: [PATCH 09/13] MAME: added wrapper --- emu-configs/mame/{cfg => }/default.cfg | 0 emu-configs/mame/mame-rdwrapper.sh | 3 +++ es-configs/es_find_rules.xml | 2 +- net.retrodeck.retrodeck.yml | 4 ++++ tools/configurator.sh | 2 +- 5 files changed, 9 insertions(+), 2 deletions(-) rename emu-configs/mame/{cfg => }/default.cfg (100%) create mode 100755 emu-configs/mame/mame-rdwrapper.sh diff --git a/emu-configs/mame/cfg/default.cfg b/emu-configs/mame/default.cfg similarity index 100% rename from emu-configs/mame/cfg/default.cfg rename to emu-configs/mame/default.cfg diff --git a/emu-configs/mame/mame-rdwrapper.sh b/emu-configs/mame/mame-rdwrapper.sh new file mode 100755 index 00000000..e6c98fcd --- /dev/null +++ b/emu-configs/mame/mame-rdwrapper.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +mame -inipath /var/config/mame \ No newline at end of file diff --git a/es-configs/es_find_rules.xml b/es-configs/es_find_rules.xml index 112a4a40..165086b4 100644 --- a/es-configs/es_find_rules.xml +++ b/es-configs/es_find_rules.xml @@ -463,7 +463,7 @@ - mame + mame-rdwrapper.sh org.mamedev.MAME diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index b7ab4bb8..d1efc458 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -1358,6 +1358,10 @@ modules: - cp emu-configs/gzdoom/gzdoom.sh ${FLATPAK_DEST}/bin/gzdoom.sh - chmod +x ${FLATPAK_DEST}/bin/gzdoom.sh + # MAME wrapper + - cp emu-configs/mame/mame-rdwrapper.sh ${FLATPAK_DEST}/bin/mame-rdwrapper.sh + - chmod +x ${FLATPAK_DEST}/bin/mame-rdwrapper.sh + sources: - type: git url: https://github.com/XargonWan/RetroDECK.git diff --git a/tools/configurator.sh b/tools/configurator.sh index ee5509eb..6ffa3b42 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -476,7 +476,7 @@ configurator_open_emulator_dialog() { ;; "MAME" ) - mame + mame-rdwrapper.sh ;; "MelonDS" ) From d8f550755f70ca8ad306a6e1ca3dd09f559ba959 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Mon, 26 Feb 2024 13:47:40 +0100 Subject: [PATCH 10/13] MAME: added folder creation --- functions/prepare_component.sh | 63 ++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 6 deletions(-) diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index ef2fa19f..ea55f3db 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -700,14 +700,65 @@ prepare_component() { echo "Initializing MAME" echo "----------------------" + # TODO: probably some of these needs to be put elsewhere mkdir -p $saves_folder/mame-sa - mkdir -p "/var/config/mame" + mkdir -p "$saves_folder/mame-sa/nvram" + mkdir -p "$states_folder/mame-sa" + mkdir -p "$rdhome/screenshots/mame-sa" + mkdir -p "$saves_folder/mame-sa/diff" + + mkdir -p "/var/config/ctrlr" + mkdir -p "/var/config/mame/ini" + mkdir -p "/var/config/mame/cfg" + mkdir -p "/var/config/mame/inp" + + mkdir -p "/var/data/mame/plugin-data" + mkdir -p "/var/data/mame/hash" + mkdir -p "/var/data/mame/assets/samples" + mkdir -p "/var/data/mame/assets/artwork" + mkdir -p "/var/data/mame/assets/fonts" + mkdir -p "/var/data/mame/cheat" + mkdir -p "/var/data/mame/assets/crosshair" + mkdir -p "/var/data/mame/plugins" + mkdir -p "/var/data/mame/assets/language" + mkdir -p "/var/data/mame/assets/software" + mkdir -p "/var/data/mame/assets/comments" + mkdir -p "/var/data/mame/assets/share" + mkdir -p "/var/data/mame/dats" + mkdir -p "/var/data/mame/folders" + mkdir -p "/var/data/mame/assets/cabinets" + mkdir -p "/var/data/mame/assets/cpanel" + mkdir -p "/var/data/mame/assets/pcb" + mkdir -p "/var/data/mame/assets/flyers" + mkdir -p "/var/data/mame/assets/titles" + mkdir -p "/var/data/mame/assets/ends" + mkdir -p "/var/data/mame/assets/marquees" + mkdir -p "/var/data/mame/assets/artwork-preview" + mkdir -p "/var/data/mame/assets/bosses" + mkdir -p "/var/data/mame/assets/logo" + mkdir -p "/var/data/mame/assets/scores" + mkdir -p "/var/data/mame/assets/versus" + mkdir -p "/var/data/mame/assets/gameover" + mkdir -p "/var/data/mame/assets/howto" + mkdir -p "/var/data/mame/assets/select" + mkdir -p "/var/data/mame/assets/icons" + mkdir -p "/var/data/mame/assets/covers" + mkdir -p "/var/data/mame/assets/ui" + dir_prep "$saves_folder/mame-sa/hiscore" "/var/config/mame/hiscore" - cp -fvr "$emuconfigs/mame/"** "/var/config/mame" - sed -i 's#RETRODECKROMSDIR#'$roms_folder'#g' "/var/config/mame/*.ini" - sed -i 's#RETRODECKHOMESDIR#'$rdhome'#g' "/var/config/mame/*.ini" - sed -i 's#RETRODECKSAVESDIR#'$rdhome'#g' "/var/config/mame/*.ini" - sed -i 's#RETRODECKSTATESDIR#'$rdhome'#g' "/var/config/mame/*.ini" + cp -fvr "$emuconfigs/mame/mame.ini" "/var/config/mame" + cp -fvr "$emuconfigs/mame/ui.ini" "/var/config/mame" + cp -fvr "$emuconfigs/mame/default.cfg" "/var/config/mame" + + sed -i 's#RETRODECKROMSDIR#'$roms_folder'#g' "/var/config/mame/mame.ini" + sed -i 's#RETRODECKHOMESDIR#'$rdhome'#g' "/var/config/mame/mame.ini" + sed -i 's#RETRODECKSAVESDIR#'$rdhome'#g' "/var/config/mame/mame.ini" + sed -i 's#RETRODECKSTATESDIR#'$rdhome'#g' "/var/config/mame/mame.ini" + + sed -i 's#RETRODECKROMSDIR#'$roms_folder'#g' "/var/config/mame/ui.ini" + sed -i 's#RETRODECKHOMESDIR#'$rdhome'#g' "/var/config/mame/ui.ini" + sed -i 's#RETRODECKSAVESDIR#'$rdhome'#g' "/var/config/mame/ui.ini" + sed -i 's#RETRODECKSTATESDIR#'$rdhome'#g' "/var/config/mame/ui.ini" fi if [[ "$component" =~ ^(gzdoom|GZDOOM|all)$ ]]; then From e0e71b984a18fd340651f44f8649e0dd45200b21 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Mon, 26 Feb 2024 13:48:44 +0100 Subject: [PATCH 11/13] POST_UPDATE: added resets for mame, vita3k and gzdoom [skip ci] --- functions/post_update.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/post_update.sh b/functions/post_update.sh index ec9acee5..104029e4 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -243,6 +243,10 @@ post_update() { sed -i 's^nintendo_button_layout^abxy_button_swap^' "$rd_conf" # This is a one-off sed statement as there are no functions for replacing section names mv -f /var/config/emulationstation/.emulationstation /var/config/emulationstation/ES-DE # in 3.0 .emulationstation was moved into ES-DE ln -s /var/config/emulationstation/ES-DE /var/config/emulationstation/.emulationstation # symlinking it to mantain the compatibility # TODO: remove this symlink n 0.9.0b + + prepare_component "reset" "mame" + prepare_component "reset" "vita3k" + prepare_component "reset" "gzdoom" fi # if [[ $prev_version -le "090" ]]; then From fb0cb02de23f1e95d3b3ee1789a1c6ef964a7428 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Mon, 26 Feb 2024 13:50:47 +0100 Subject: [PATCH 12/13] CONFIGURATOR: fixed prepare_component dialog [skip ci] --- tools/configurator.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index 6ffa3b42..92531451 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -1055,7 +1055,7 @@ configurator_reset_dialog() { --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \ --text="Which component do you want to reset to default?" \ --column="Component" --column="Action" \ - "BoilR" "Reset BoilR that manages the sync and scraping toward Steam library" \ + "BoilR" "Reset BoilR that manages the sync and scraping toward Steam library" \ "ES-DE" "Reset the ES-DE frontend" \ ) # TODO: "GyroDSU" "Reset the gyroscope manager GyroDSU" From c07daf9af7d7d5edc2d4cef2b0bc1c780fd52e2e Mon Sep 17 00:00:00 2001 From: XargonWan Date: Mon, 26 Feb 2024 14:25:08 +0100 Subject: [PATCH 13/13] RYUJINX: fixed configurator call command [skip ci] --- tools/configurator.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configurator.sh b/tools/configurator.sh index 92531451..aa4ffbb7 100644 --- a/tools/configurator.sh +++ b/tools/configurator.sh @@ -500,7 +500,7 @@ configurator_open_emulator_dialog() { ;; "Ryujinx" ) - ryujinx-wrapper + Ryujinx.sh ;; "Vita3K" )