Merge branch 'cooker-0.8.0b' into feat/esde-3.0

This commit is contained in:
XargonWan 2024-02-21 20:52:19 +01:00
commit 4414be0fd1
13 changed files with 2672 additions and 66 deletions

View file

@ -122,7 +122,7 @@ jobs:
# if the branch is coming from a PR the tag should be manually built
- name: "Generate version tag"
run: |
if [[ "$BRANCH_NAME" == 'ref/'* ]]; then
if [[ "$BRANCH_NAME" == 'refs/'* ]]; then
pr_number=$(echo ${{env.BRANCH_NAME}} | awk -F'/' '{print $3}')
original_branch=$(git ls-remote --heads origin "refs/pull/$pr_number/head" | cut -d'/' -f3)
echo "TAG=PR-$pr_number-$original_branch-${{ env.buildid }}" >> $GITHUB_ENV

View file

@ -40,3 +40,4 @@ sega32xjp
sega32xna
snes
snesna
tg16

View file

@ -2,3 +2,4 @@
0209^0212^0000^2359^rd-lunar-dragon-splash.svg
0214^0214^0001^2359^rd-valentines-splash.svg
0317^0317^0000^2359^rd-stpatricks-splash.svg
0429^0505^0000^2359^rd-kodomo-golden.svg

View file

@ -40,7 +40,9 @@
.msa
.nds
.nes
.ngc
.o
.pce
.prg
.rom
.sfc
@ -58,3 +60,4 @@
.unif
.xex
.xfd
.z64

View file

@ -275,7 +275,7 @@ dir_prep() {
if [ -d "$symlink.old" ];
then
echo "Moving the data from $symlink.old to $real" #DEBUG
mv -f "$symlink.old"/{.[!.],}* $real
mv -f "$symlink.old"/{.[!.],}* "$real"
echo "Removing $symlink.old" #DEBUG
rm -rf "$symlink.old"
fi
@ -283,6 +283,29 @@ dir_prep() {
echo -e "$symlink is now $real\n"
}
check_bios_files() {
# This function validates all the BIOS files listed in the $bios_checklist and adds the results to an array called bios_checked_list which can be used elsewhere
rm -f "$godot_bios_files_checked" # Godot data transfer temp files
touch "$godot_bios_files_checked"
while IFS="^" read -r bios_file bios_subdir bios_hash bios_system bios_desc
do
bios_file_found="No"
bios_hash_matched="No"
if [[ -f "$bios_folder/$bios_subdir$bios_file" ]]; then
bios_file_found="Yes"
if [[ $bios_hash == "Unknown" ]]; then
bios_hash_matched="Unknown"
elif [[ $(md5sum "$bios_folder/$bios_subdir$bios_file" | awk '{ print $1 }') == "$bios_hash" ]]; then
bios_hash_matched="Yes"
fi
fi
bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc")
echo "$bios_file"^"$bios_system"^"$bios_file_found"^"$bios_hash_matched"^"$bios_desc" >> "$godot_bios_files_checked" # Godot data transfer temp file
done < $bios_checklist
}
update_rpcs3_firmware() {
mkdir -p "$roms_folder/ps3/tmp"
chmod 777 "$roms_folder/ps3/tmp"
@ -368,9 +391,6 @@ finit() {
echo "Executing finit"
# Placing the default retrodeck.cfg
cp -vf $rd_defaults $rd_conf
# Internal or SD Card?
local finit_dest_choice=$(configurator_destination_choice_dialog "RetroDECK data" "Welcome to the first configuration of RetroDECK.\nThe setup will be quick but please READ CAREFULLY each message in order to avoid misconfigurations.\n\nWhere do you want your RetroDECK data folder to be located?\n\nThis folder will contain all ROMs, BIOSs and scraped data." )
echo "Choice is $finit_dest_choice"

View file

@ -47,6 +47,10 @@ presets_dir="$emuconfigs/defaults/retrodeck/presets"
incompatible_presets_reference_list="$emuconfigs/defaults/retrodeck/reference_lists/incompatible_presets.cfg" # A config file listing all incompatible presets for reference (eg. cannot have borders and widescreen enabled simultaniously)
pretty_system_names_reference_list="$emuconfigs/defaults/retrodeck/reference_lists/pretty_system_names.cfg" # An internal translation list for turning internal names (eg. gbc) to "pretty" names (Nintendo GameBoy Color)
# Godot data transfer temp files
godot_bios_files_checked="var/config/retrodeck/godot/godot_bios_files_checked.tmp"
# Config files for emulators with single config files
citraconf="/var/config/citra-emu/qt-config.ini"
@ -109,8 +113,7 @@ vita3kconf="/var/data/Vita3K/config.yml"
vita3kusrconfdir="$bios_folder/Vita3K/Vita3K"
# We moved the lockfile in /var/config/retrodeck in order to solve issue #53 - Remove in a few versions
if [ -f "$HOME/retrodeck/.lock" ]
then
if [[ -f "$HOME/retrodeck/.lock" ]]; then
mv "$HOME/retrodeck/.lock" $lockfile
fi
@ -121,10 +124,12 @@ if [[ ! -f "$rd_conf" ]]; then
echo "Initializing"
# if we are here means that the we are in a new installation, so the version is valorized with the hardcoded one
# Initializing the variables
if [ -z $version]; then
if [[ -z "$version" ]]; then
if [[ -f "$lockfile" ]]; then
if [[ $(cat $lockfile) == *"0.4."* ]] || [[ $(cat $lockfile) == *"0.3."* ]] || [[ $(cat $lockfile) == *"0.2."* ]] || [[ $(cat $lockfile) == *"0.1."* ]]; then # If the previous version is very out of date, pre-rd_conf
echo "Running version workaround"
version=$(cat $lockfile)
fi
else
version="$hard_version"
fi
@ -135,7 +140,7 @@ if [[ ! -f "$rd_conf" ]]; 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)"
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 expected location.\nThis may happen when SteamOS is updated.\n\nPlease browse to the current location of the SD card.\n\nIf you are not using an SD card, please click \"Cancel\"."
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")"
fi
fi
@ -171,8 +176,8 @@ else
conf_read
# Verify rdhome is where it is supposed to be.
if [[ ! -d $rdhome ]]; then
prev_home_path=$rdhome
if [[ ! -d "$rdhome" ]]; then
prev_home_path="$rdhome"
configurator_generic_dialog "RetroDECK Setup" "The RetroDECK data folder was not found in the expected location.\nThis may happen when SteamOS is updated.\n\nPlease browse to the current location of the \"retrodeck\" folder."
new_home_path=$(directory_browse "RetroDECK folder location")
set_setting_value $rd_conf "rdhome" "$new_home_path" retrodeck "paths"

View file

@ -53,6 +53,11 @@ set_setting_value() {
fi
;;
"mame" ) # This only works for mame .ini files, not the .cfg XML files
local mame_current_value=$(get_setting_value $1 "$setting_name_to_change" $4)
sed -i '\^\^'"$setting_name_to_change"'\s^s^'"$mame_current_value"'^'"$setting_value_to_change"'^' "$1"
;;
"es_settings" )
sed -i 's^'"$setting_name_to_change"'" value=".*"^'"$setting_name_to_change"'" value="'"$setting_value_to_change"'"^' "$1"
;;
@ -76,6 +81,10 @@ get_setting_name() {
echo "$current_setting_line" | grep -o -P "^\s*?.*?(?=\s?:\s?)" | sed -e 's/^[ \t]*//;s^\\ ^ ^g'
;;
"mame" ) # This only works for mame .ini files, not the .cfg XML files
echo "$current_setting_line" | awk '{print $1}'
;;
* )
echo "$current_setting_line" | grep -o -P "^\s*?.*?(?=\s?=\s?)" | sed -e 's/^[ \t]*//;s^\\ ^ ^g;s^\\$^^'
;;
@ -132,6 +141,10 @@ get_setting_value() {
fi
;;
"mame" ) # This only works for mame .ini files, not the .cfg XML files
echo $(sed -n '\^\^'"$current_setting_name"'\s^p' "$1" | awk '{print $2}')
;;
"es_settings" )
echo $(grep -o -P "(?<=$current_setting_name\" value=\").*(?=\")" "$1")
;;

View file

@ -23,6 +23,7 @@ prepare_component() {
mkdir -p "$rdhome/$(basename $current_setting_value)"
fi
done < <(grep -v '^\s*$' $rd_conf | awk '/^\[paths\]/{f=1;next} /^\[/{f=0} f')
mkdir -p "/var/config/retrodeck/godot"
fi
if [[ "$action" == "postmove" ]]; then # Update the paths of any folders that came with the retrodeck folder during a move
while read -r config_line; do
@ -678,10 +679,7 @@ prepare_component() {
else # Single-user actions
# NOTE: the component is writing in "." so it must be placed in the rw filesystem. A symlink of the binary is already placed in /app/bin/Vita3K
rm -rf "/var/data/Vita3K"
mkdir -p "/var/data/Vita3K"
unzip "/app/retrodeck/vita3k.zip" -d "/var/data/Vita3K"
chmod +x "/var/data/Vita3K/Vita3K"
rm -f "/var/data/Vita3K/update-vita3k.sh"
mkdir -p "/var/data/Vita3K/Vita3K"
cp -fvr "$emuconfigs/vita3k/config.yml" "/var/data/Vita3K" # component config
cp -fvr "$emuconfigs/vita3k/ux0" "$bios_folder/Vita3K/Vita3K" # User config
set_setting_value "$vita3kconf" "pref-path" "$rdhome/bios/Vita3K/Vita3K/" "vita3k"

View file

@ -112,11 +112,11 @@ build_preset_config() {
"change" )
if [[ "$read_preset" == "$current_preset" ]]; then
if [[ "$target_file" = \$* ]]; then # Read current target file and resolve if it is a variable
declare -g "target_file=$target_file"
eval target_file=$target_file
fi
local read_target_file="$target_file"
if [[ "$defaults_file" = \$* ]]; then #Read current defaults file and resolve if it is a variable
declare -g "defaults_file=$defaults_file"
eval defaults_file=$defaults_file
fi
local read_defaults_file="$defaults_file"
if [[ "$read_system_enabled" == "true" ]]; then

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 133 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View file

@ -58,7 +58,7 @@ https://retrodeck.net
echo "You are about to reset one or more RetroDECK components or emulators."
echo "Available options are: es-de, retroarch, cemu, citra, dolphin, duckstation, melonds, pcsx3, pico8, ppsspp, primehack, rpcs3, xemu, yuzu, vita3k, mame, gzdoom, boilr, all"
read -p "Please enter the component you would like to reset: " component
if [[ "$emulator" =~ ^(es-de|retroarch|cemu|citra|dolphin|duckstation|mame|melonds|pcsx2|ppsspp|primehack|rpcs3|xemu|yuzu|all-emulators)$ ]]; then
if [[ "$component" =~ ^(es-de|retroarch|cemu|citra|dolphin|duckstation|mame|melonds|pcsx2|ppsspp|primehack|rpcs3|xemu|yuzu|all)$ ]]; then
read -p "You are about to reset $component to default settings. Enter 'y' to continue, 'n' to stop: " response
if [[ $response == [yY] ]]; then
prepare_component "reset" "$component" "cli"

View file

@ -940,20 +940,7 @@ configurator_check_bios_files() {
configurator_generic_dialog "RetroDECK Configurator - Check & Verify: BIOS Files" "This check will look for BIOS files that RetroDECK has identified as working.\n\nNot all BIOS files are required for games to work, please check the BIOS description for more information on its purpose.\n\nThere may be additional BIOS files that will function with the emulators that are not checked.\n\nSome more advanced emulators such as Yuzu will have additional methods for verifiying the BIOS files are in working order."
bios_checked_list=()
while IFS="^" read -r bios_file bios_subdir bios_hash bios_system bios_desc
do
bios_file_found="No"
bios_hash_matched="No"
if [[ -f "$bios_folder/$bios_subdir$bios_file" ]]; then
bios_file_found="Yes"
if [[ $bios_hash == "Unknown" ]]; then
bios_hash_matched="Unknown"
elif [[ $(md5sum "$bios_folder/$bios_subdir$bios_file" | awk '{ print $1 }') == "$bios_hash" ]]; then
bios_hash_matched="Yes"
fi
fi
bios_checked_list=("${bios_checked_list[@]}" "$bios_file" "$bios_system" "$bios_file_found" "$bios_hash_matched" "$bios_desc")
done < $bios_checklist
check_bios_files
zenity --list --title="RetroDECK Configurator Utility - Check & Verify: BIOS Files" --cancel-label="Back" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \