mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 14:05:39 +00:00
Merge pull request #380 from icenine451/cooker-0.7.0b-icenine451
Cooker 0.7.0b icenine451
This commit is contained in:
commit
17717cb339
2
.github/workflows/cooker-selfhosted.yml
vendored
2
.github/workflows/cooker-selfhosted.yml
vendored
|
@ -39,7 +39,7 @@ jobs:
|
||||||
word2=$(curl -s https://random-word-api.herokuapp.com/word?length=5 | tr -d '[]"')
|
word2=$(curl -s https://random-word-api.herokuapp.com/word?length=5 | tr -d '[]"')
|
||||||
capitalized_word2="$(tr '[:lower:]' '[:upper:]' <<< ${word2:0:1})${word2:1}"
|
capitalized_word2="$(tr '[:lower:]' '[:upper:]' <<< ${word2:0:1})${word2:1}"
|
||||||
result=$capitalized_word1$capitalized_word2
|
result=$capitalized_word1$capitalized_word2
|
||||||
echo $result >> ${GITHUB_WORKSPACE}/buildid
|
echo $result > ${GITHUB_WORKSPACE}/buildid
|
||||||
ls -lah ${GITHUB_WORKSPACE} # DEBUG
|
ls -lah ${GITHUB_WORKSPACE} # DEBUG
|
||||||
cat ${GITHUB_WORKSPACE}/buildid # DEBUG
|
cat ${GITHUB_WORKSPACE}/buildid # DEBUG
|
||||||
echo "buildid=$result" >> $GITHUB_ENV
|
echo "buildid=$result" >> $GITHUB_ENV
|
||||||
|
|
|
@ -4,3 +4,4 @@ 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^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^DUCKSTATIONSHAPLACEHOLDER^https://github.com/stenzek/duckstation/releases/download/preview/DuckStation-x64.AppImage
|
||||||
latestcommit^UNIVERSALDYNAMICINPUTCOMMITPLACEHOLDER^https://github.com/Venomalia/UniversalDynamicInput^main
|
latestcommit^UNIVERSALDYNAMICINPUTCOMMITPLACEHOLDER^https://github.com/Venomalia/UniversalDynamicInput^main
|
||||||
|
outside_info^VERSIONPLACEHOLDER^${GITHUB_WORKSPACE}/buildid
|
||||||
|
|
|
@ -53,6 +53,15 @@ do
|
||||||
appimagehash=$(curl -sL "$appimageurl" | sha256sum | cut -d ' ' -f1)
|
appimagehash=$(curl -sL "$appimageurl" | sha256sum | cut -d ' ' -f1)
|
||||||
echo "AppImage hash found: $appimagehash"
|
echo "AppImage hash found: $appimagehash"
|
||||||
/bin/sed -i 's^'"HASHFOR$placeholder"'^'"$appimagehash"'^' $rd_manifest
|
/bin/sed -i 's^'"HASHFOR$placeholder"'^'"$appimagehash"'^' $rd_manifest
|
||||||
|
elif [[ "$action" == "outside_info" ]]; then
|
||||||
|
if [[ "$url" = \$* ]]; then # If value is a reference to a variable name
|
||||||
|
eval url="$url"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
echo "Placeholder text: $placeholder"
|
||||||
|
echo "Information being injected: $(cat $url)"
|
||||||
|
echo
|
||||||
|
/bin/sed -i 's^'"$placeholder"'^'"$(cat $url)"'^' $rd_manifest
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < "$automation_task_list"
|
done < "$automation_task_list"
|
||||||
|
|
184
functions.sh
184
functions.sh
|
@ -323,7 +323,7 @@ set_setting_value() {
|
||||||
if [[ -z $current_section_name ]]; then
|
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
|
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
|
fi
|
||||||
if [[ "$4" == "retrodeck" ]]; then # If a RetroDECK setting is being changed, also write it to memory for immediate use
|
if [[ "$4" == "retrodeck" ]]; 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"
|
eval "$setting_name_to_change=$setting_value_to_change"
|
||||||
|
@ -334,7 +334,7 @@ set_setting_value() {
|
||||||
if [[ -z $current_section_name ]]; then
|
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
|
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
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ set_setting_value() {
|
||||||
if [[ -z $current_section_name ]]; then
|
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
|
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
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -432,9 +432,9 @@ get_setting_value() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
add_setting() {
|
add_setting_line() {
|
||||||
# This function will add a setting line to a file. This is useful for dynamically generated config files where a setting line may not exist until the setting is changed from the default.
|
# This function will add a setting line to a file. This is useful for dynamically generated config files where a setting line may not exist until the setting is changed from the default.
|
||||||
# USAGE: add_setting $setting_file $setting_line $system $section (optional)
|
# USAGE: add_setting_line $setting_file $setting_line $system $section (optional)
|
||||||
|
|
||||||
local current_setting_line=$(sed -e 's^\\^\\\\^g;s^`^\\`^g' <<< "$2")
|
local current_setting_line=$(sed -e 's^\\^\\\\^g;s^`^\\`^g' <<< "$2")
|
||||||
local current_section_name=$(sed -e 's/%/\\%/g' <<< "$4")
|
local current_section_name=$(sed -e 's/%/\\%/g' <<< "$4")
|
||||||
|
@ -443,7 +443,11 @@ add_setting() {
|
||||||
|
|
||||||
* )
|
* )
|
||||||
if [[ -z $current_section_name ]]; then
|
if [[ -z $current_section_name ]]; then
|
||||||
|
if [[ -f "$1" ]]; then
|
||||||
sed -i '$ a '"$current_setting_line"'' $1
|
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
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
sed -i '/^\s*?\['"$current_section_name"'\]|\b'"$current_section_name"':$/a '"$current_setting_line"'' $1
|
sed -i '/^\s*?\['"$current_section_name"'\]|\b'"$current_section_name"':$/a '"$current_setting_line"'' $1
|
||||||
fi
|
fi
|
||||||
|
@ -511,12 +515,17 @@ enable_file() {
|
||||||
generate_single_patch() {
|
generate_single_patch() {
|
||||||
# generate_single_patch $original_file $modified_file $patch_file $system
|
# generate_single_patch $original_file $modified_file $patch_file $system
|
||||||
|
|
||||||
rm $3 # Remove old patch file (maybe change this to create a backup instead?)
|
local original_file="$1"
|
||||||
|
local modified_file="$2"
|
||||||
|
local patch_file="$3"
|
||||||
|
local system="$4"
|
||||||
|
|
||||||
|
rm "$patch_file" # Remove old patch file (maybe change this to create a backup instead?)
|
||||||
|
|
||||||
while read -r current_setting_line; # Look for changes from the original file to the modified one
|
while read -r current_setting_line; # Look for changes from the original file to the modified one
|
||||||
do
|
do
|
||||||
|
|
||||||
printf -v escaped_setting_line '%q' "$current_setting_line" # Take care of special characters before they mess with future commands
|
printf -v escaped_setting_line '%q' "$current_setting_line" # Take care of special characters before they mess with future commands
|
||||||
|
escaped_setting_line=$(sed -E 's^\+^\\+^g' <<< "$escaped_setting_line") # Need to escape plus signs as well
|
||||||
|
|
||||||
if [[ (! -z $current_setting_line) && (! $current_setting_line == "#!/bin/bash") && (! $current_setting_line == "[]") ]]; then # Ignore empty lines, empty arrays or Bash start lines
|
if [[ (! -z $current_setting_line) && (! $current_setting_line == "#!/bin/bash") && (! $current_setting_line == "[]") ]]; then # Ignore empty lines, empty arrays or Bash start lines
|
||||||
if [[ ! -z $(grep -o -P "^\[.+?\]$" <<< "$current_setting_line") || ! -z $(grep -o -P "^\b.+?:$" <<< "$current_setting_line") ]]; then # Capture section header lines
|
if [[ ! -z $(grep -o -P "^\[.+?\]$" <<< "$current_setting_line") || ! -z $(grep -o -P "^\b.+?:$" <<< "$current_setting_line") ]]; then # Capture section header lines
|
||||||
|
@ -529,45 +538,45 @@ generate_single_patch() {
|
||||||
fi
|
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 $(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 } }' $2) ]]; then # If disabled line is not disabled in new file...
|
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"
|
action="disable_setting"
|
||||||
echo $action"^"$current_section"^"$(sed -n -E 's^\s*?#(.*?)$^\1^p' <<< $(sed -E 's/^[ \t]*//' <<< "$current_setting_line")) >> $3
|
echo $action"^"$current_section"^"$(sed -n -E 's^\s*?#(.*?)$^\1^p' <<< $(sed -E 's/^[ \t]*//' <<< "$current_setting_line")) >> "$patch_file"
|
||||||
fi
|
fi
|
||||||
elif [[ ! -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 } }' $2) ]]; then # Check if line is disabled in new file
|
elif [[ ! -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 # Check if line is disabled in new file
|
||||||
action="enable_setting"
|
action="enable_setting"
|
||||||
echo $action"^"$current_section"^"$current_setting_line >> $3
|
echo $action"^"$current_section"^"$current_setting_line >> "$patch_file"
|
||||||
else # Look for setting value differences
|
else # Look for setting value differences
|
||||||
current_setting_name=$(get_setting_name "$escaped_setting_line" $4)
|
current_setting_name=$(get_setting_name "$escaped_setting_line" "$system")
|
||||||
if [[ (-z $(sed -n -E '\^\['"$current_section"'\]|\b'"$current_section"':$^,\^\b'"$current_setting_name"'.*^{ \^\['"$current_section"'\]|\b'"$current_section"':$^! { \^\b'"$(sed -E 's/^[ \t]*//;' <<< "$escaped_setting_line")"'$^ p } }' $2)) ]]; 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'"$(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"'^{ \^\['"$current_section"'\]|\b'"$current_section"':$^! { \^\b'"$current_setting_name"'^ p } }' $2) ]]; then # But the setting exists in that section, only with a different value...
|
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" $4 $current_section)
|
new_setting_value=$(get_setting_value $2 "$current_setting_name" "$system" $current_section)
|
||||||
action="change"
|
action="change"
|
||||||
echo $action"^"$current_section"^"$(sed -e 's%\\\\%\\%g' <<< "$current_setting_name")"^"$new_setting_value"^"$4 >> $3
|
echo $action"^"$current_section"^"$(sed -e 's%\\\\%\\%g' <<< "$current_setting_name")"^"$new_setting_value"^"$system >> "$patch_file"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
elif [[ (-z $current_section) ]]; then # If line is not in a section...
|
elif [[ -z "$current_section" ]]; then # If line is not in a section...
|
||||||
if [[ ! -z $(grep -o -P "^\s*?#.*?$" <<< "$current_setting_line") ]]; then # Check for disabled lines
|
if [[ ! -z $(grep -o -P "^\s*?#.*?$" <<< "$current_setting_line") ]]; then # Check for disabled lines
|
||||||
if [[ -z $(grep -o -P "^\s*?$current_setting_line$" $2) ]]; then # If disabled line is not disabled in new file...
|
if [[ -z $(grep -o -P "^\s*?$current_setting_line$" "$modified_file") ]]; then # If disabled line is not disabled in new file...
|
||||||
action="disable_setting"
|
action="disable_setting"
|
||||||
echo $action"^"$current_section"^"$(sed -n -E 's^\s*?#(.*?)$^\1^p' <<< "$current_setting_line") >> $3
|
echo $action"^"$current_section"^"$(sed -n -E 's^\s*?#(.*?)$^\1^p' <<< "$current_setting_line") >> "$patch_file"
|
||||||
fi
|
fi
|
||||||
elif [[ ! -z $(sed -n -E '\^\s*?#'"$(sed -E 's/^[ \t]*//' <<< "$escaped_setting_line")"'$^p' $2) ]]; then # Check if line is disabled in new file
|
elif [[ ! -z $(sed -n -E '\^\s*?#'"$(sed -E 's/^[ \t]*//' <<< "$escaped_setting_line")"'$^p' "$modified_file") ]]; then # Check if line is disabled in new file
|
||||||
action="enable_setting"
|
action="enable_setting"
|
||||||
echo $action"^"$current_section"^"$current_setting_line >> $3
|
echo $action"^"$current_section"^"$current_setting_line >> "$patch_file"
|
||||||
else # Look for setting value differences
|
else # Look for setting value differences
|
||||||
if [[ (-z $(sed -n -E '\^\s*?\b'"$(sed -E 's/^[ \t]*//' <<< "$escaped_setting_line")"'$^p' $2)) ]]; then # If the same setting line is not found in the modified file...
|
if [[ (-z $(sed -n -E '\^\s*?\b'"$(sed -E 's/^[ \t]*//' <<< "$escaped_setting_line")"'$^p' "$modified_file")) ]]; then # If the same setting line is not found in the modified file...
|
||||||
current_setting_name=$(get_setting_name "$escaped_setting_line" "$4")
|
current_setting_name=$(get_setting_name "$escaped_setting_line" "$system")
|
||||||
if [[ ! -z $(sed -n -E '\^\s*?\b'"$current_setting_name"'\s*?[:=]^p' $2) ]]; then # But the setting exists, only with a different value...
|
if [[ ! -z $(sed -n -E '\^\s*?\b'"$current_setting_name"'\s*?[:=]^p' "$modified_file") ]]; then # But the setting exists, only with a different value...
|
||||||
new_setting_value=$(get_setting_value $2 "$current_setting_name" $4)
|
new_setting_value=$(get_setting_value $2 "$current_setting_name" "$system")
|
||||||
action="change"
|
action="change"
|
||||||
echo $action"^"$current_section"^"$(sed -e 's%\\\\%\\%g' <<< "$current_setting_name")"^"$new_setting_value"^"$4 >> $3
|
echo $action"^"$current_section"^"$(sed -e 's%\\\\%\\%g' <<< "$current_setting_name")"^"$new_setting_value"^"$system >> "$patch_file"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < $1
|
done < "$original_file"
|
||||||
|
|
||||||
# Reset the variables for reuse
|
# Reset the variables for reuse
|
||||||
action=""
|
action=""
|
||||||
|
@ -585,27 +594,25 @@ generate_single_patch() {
|
||||||
if [[ $current_setting_line =~ ^\[.+\] ]]; then # If normal section line
|
if [[ $current_setting_line =~ ^\[.+\] ]]; then # If normal section line
|
||||||
action="section"
|
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
|
||||||
echo "Section found:" "$current_section""."
|
|
||||||
elif [[ ! -z $(grep -o -P "^\b.+?:$" <<< "$current_setting_line") ]]; then # If RPCS3 section name
|
elif [[ ! -z $(grep -o -P "^\b.+?:$" <<< "$current_setting_line") ]]; then # If RPCS3 section name
|
||||||
action="section"
|
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
|
||||||
echo "Section found:" "$current_section""."
|
|
||||||
fi
|
fi
|
||||||
elif [[ (! -z $current_section) ]]; then
|
elif [[ (! -z $current_section) ]]; then
|
||||||
current_setting_name=$(get_setting_name "$escaped_setting_line" "$4")
|
current_setting_name=$(get_setting_name "$escaped_setting_line" "$4")
|
||||||
if [[ -z $(sed -n -E '\^\['"$current_section"'\]|\b'"$current_section"':$^,\^\b'"$current_setting_name"'.*^{ \^\['"$current_section"'\]|\b'"$current_section"':$^! { \^\b'"$current_setting_name"'^p } }' $1 ) ]]; then # If setting name is not found in this section of the original file...
|
if [[ -z $(sed -n -E '\^\['"$current_section"'\]|\b'"$current_section"':$^,\^\b'"$current_setting_name"'.*^{ \^\['"$current_section"'\]|\b'"$current_section"':$^! { \^\b'"$current_setting_name"'^p } }' $1 ) ]]; then # If setting name is not found in this section of the original file...
|
||||||
action="add_setting"
|
action="add_setting_line" # TODO: This should include the previous line, so that new lines can be inserted in the correct place rather than at the end.
|
||||||
echo $action"^"$current_section"^"$current_setting_line"^^"$4 >> $3
|
echo $action"^"$current_section"^"$current_setting_line"^^"$4 >> $3
|
||||||
fi
|
fi
|
||||||
elif [[ (-z $current_section) ]]; then
|
elif [[ (-z $current_section) ]]; then
|
||||||
current_setting_name=$(get_setting_name "$escaped_setting_line" "$4")
|
current_setting_name=$(get_setting_name "$escaped_setting_line" "$4")
|
||||||
if [[ -z $(sed -n -E '\^\s*?\b'"$current_setting_name"'\s*?[:=]^p' $1) ]]; then # If setting name is not found in the original file...
|
if [[ -z $(sed -n -E '\^\s*?\b'"$current_setting_name"'\s*?[:=]^p' $1) ]]; then # If setting name is not found in the original file...
|
||||||
action="add_setting"
|
action="add_setting_line" # TODO: This should include the previous line, so that new lines can be inserted in the correct place rather than at the end.
|
||||||
echo $action"^"$current_section"^"$current_setting_line"^^"$4 >> $3
|
echo $action"^"$current_section"^"$current_setting_line"^^"$4 >> $3
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < $2
|
done < "$modified_file"
|
||||||
}
|
}
|
||||||
|
|
||||||
deploy_single_patch() {
|
deploy_single_patch() {
|
||||||
|
@ -628,8 +635,8 @@ do
|
||||||
eval enable_file "$setting_name"
|
eval enable_file "$setting_name"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"add_setting" )
|
"add_setting_line" )
|
||||||
eval add_setting $3 "$setting_name" $system_name $current_section
|
eval add_setting_line $3 "$setting_name" $system_name $current_section
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"disable_setting" )
|
"disable_setting" )
|
||||||
|
@ -641,7 +648,10 @@ do
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"change" )
|
"change" )
|
||||||
eval set_setting_value $3 "$setting_name" "$setting_value" $system_name $current_section
|
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
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*"#"* )
|
*"#"* )
|
||||||
|
@ -675,8 +685,8 @@ do
|
||||||
eval enable_file "$config_file"
|
eval enable_file "$config_file"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"add_setting" )
|
"add_setting_line" )
|
||||||
eval add_setting "$config_file" "$setting_name" $system_name $current_section
|
eval add_setting_line "$config_file" "$setting_name" $system_name $current_section
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"disable_setting" )
|
"disable_setting" )
|
||||||
|
@ -688,7 +698,10 @@ do
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"change" )
|
"change" )
|
||||||
eval set_setting_value "$config_file" "$setting_name" "$setting_value" $system_name $current_section
|
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
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*"#"* )
|
*"#"* )
|
||||||
|
@ -733,7 +746,7 @@ check_for_version_update() {
|
||||||
set_setting_value $rd_conf "update_ignore" "$online_version" retrodeck "options" # Store version to ignore for future checks
|
set_setting_value $rd_conf "update_ignore" "$online_version" retrodeck "options" # Store version to ignore for future checks
|
||||||
fi
|
fi
|
||||||
else # User clicked "Yes"
|
else # User clicked "Yes"
|
||||||
configurator_generic_dialog "The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version."
|
configurator_generic_dialog "RetroDECK Online Update" "The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version."
|
||||||
(
|
(
|
||||||
flatpak-spawn --host flatpak update --noninteractive -y net.retrodeck.retrodeck
|
flatpak-spawn --host flatpak update --noninteractive -y net.retrodeck.retrodeck
|
||||||
) |
|
) |
|
||||||
|
@ -741,7 +754,7 @@ check_for_version_update() {
|
||||||
--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 Updater" \
|
--title "RetroDECK Updater" \
|
||||||
--text="RetroDECK is updating to the latest version, please wait."
|
--text="RetroDECK is updating to the latest version, please wait."
|
||||||
configurator_generic_dialog "The update process is now complete!\n\nPlease restart RetroDECK to keep the fun going."
|
configurator_generic_dialog "RetroDECK Online Update" "The update process is now complete!\n\nPlease restart RetroDECK to keep the fun going."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [[ "$update_repo" == "RetroDECK-cooker" ]] && [[ ! $current_version == $online_version ]]; then
|
elif [[ "$update_repo" == "RetroDECK-cooker" ]] && [[ ! $current_version == $online_version ]]; then
|
||||||
|
@ -755,7 +768,7 @@ check_for_version_update() {
|
||||||
set_setting_value $rd_conf "update_ignore" "$online_version" retrodeck "options" # Store version to ignore for future checks.
|
set_setting_value $rd_conf "update_ignore" "$online_version" retrodeck "options" # Store version to ignore for future checks.
|
||||||
fi
|
fi
|
||||||
else # User clicked "Yes"
|
else # User clicked "Yes"
|
||||||
configurator_generic_dialog "The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version."
|
configurator_generic_dialog "RetroDECK Online Update" "The update process may take several minutes.\n\nAfter the update is complete, RetroDECK will close. When you run it again you will be using the latest version."
|
||||||
(
|
(
|
||||||
local latest_cooker_download=$(curl --silent https://api.github.com/repos/XargonWan/$update_repo/releases/latest | grep '"browser_download_url":' | sed -E 's/.*"([^"]+)".*/\1/')
|
local latest_cooker_download=$(curl --silent https://api.github.com/repos/XargonWan/$update_repo/releases/latest | grep '"browser_download_url":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||||
mkdir -p "$rdhome/RetroDECK_Updates"
|
mkdir -p "$rdhome/RetroDECK_Updates"
|
||||||
|
@ -767,7 +780,7 @@ check_for_version_update() {
|
||||||
--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 Updater" \
|
--title "RetroDECK Updater" \
|
||||||
--text="RetroDECK is updating to the latest version, please wait."
|
--text="RetroDECK is updating to the latest version, please wait."
|
||||||
configurator_generic_dialog "The update process is now complete!\n\nPlease restart RetroDECK to keep the fun going."
|
configurator_generic_dialog "RetroDECK Online Update" "The update process is now complete!\n\nPlease restart RetroDECK to keep the fun going."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -788,10 +801,21 @@ update_rd_conf() {
|
||||||
# This function will import a default retrodeck.cfg file and update it with any current settings. This will allow us to expand the file over time while retaining current user settings.
|
# This function will import a default retrodeck.cfg file and update it with any current settings. This will allow us to expand the file over time while retaining current user settings.
|
||||||
# USAGE: update_rd_conf
|
# USAGE: update_rd_conf
|
||||||
|
|
||||||
|
# STAGE 1: For current files that haven't been broken into sections yet, where every setting name is unique
|
||||||
|
|
||||||
conf_read # Read current settings into memory
|
conf_read # Read current settings into memory
|
||||||
mv -f $rd_conf $rd_conf_backup # Backup config file before update
|
mv -f $rd_conf $rd_conf_backup # Backup config file before update
|
||||||
cp $rd_defaults $rd_conf # Copy defaults file into place
|
cp $rd_defaults $rd_conf # Copy defaults file into place
|
||||||
conf_write # Write old values into new default file
|
conf_write # Write old values into new default file
|
||||||
|
|
||||||
|
# STAGE 2: To handle feature sections that use duplicate setting names
|
||||||
|
|
||||||
|
mv -f $rd_conf $rd_conf_backup # Backup config file agiain before update but after Stage 1 expansion
|
||||||
|
generate_single_patch $rd_defaults $rd_conf_backup $rd_update_patch retrodeck # Create a patch file for differences between defaults and current user settings
|
||||||
|
sed -i '/change^^version/d' $rd_update_patch # Remove version line from temporary patch file
|
||||||
|
deploy_single_patch $rd_defaults $rd_update_patch $rd_conf # Re-apply user settings to defaults file
|
||||||
|
set_setting_value $rd_conf "version" "$hard_version" retrodeck # Set version of currently running RetroDECK to updated retrodeck.cfg
|
||||||
|
rm -f $rd_update_patch # Cleanup temporary patch file
|
||||||
conf_read # Read all settings into memory
|
conf_read # Read all settings into memory
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -854,11 +878,11 @@ echo "$chosen_user"
|
||||||
|
|
||||||
multi_user_enable_multi_user_mode() {
|
multi_user_enable_multi_user_mode() {
|
||||||
if [[ -z "$SteamAppUser" ]]; then
|
if [[ -z "$SteamAppUser" ]]; then
|
||||||
configurator_generic_dialog "The Steam username of the current user could not be determined from the system.\n\nThis can happen when running in Desktop mode.\n\nYou will be asked to specify the Steam username (not profile name) of the current user in the next dialog."
|
configurator_generic_dialog "RetroDECK Multi-User Mode" "The Steam username of the current user could not be determined from the system.\n\nThis can happen when running in Desktop mode.\n\nYou will be asked to specify the Steam username (not profile name) of the current user in the next dialog."
|
||||||
fi
|
fi
|
||||||
if [[ -d "$multi_user_data_folder" && $(ls -1 "$multi_user_data_folder" | wc -l) -gt 0 ]]; then # If multi-user data folder exists from prior use and is not empty
|
if [[ -d "$multi_user_data_folder" && $(ls -1 "$multi_user_data_folder" | wc -l) -gt 0 ]]; then # If multi-user data folder exists from prior use and is not empty
|
||||||
if [[ -d "$multi_user_data_folder/$SteamAppUser" ]]; then # Current user has an existing save folder
|
if [[ -d "$multi_user_data_folder/$SteamAppUser" ]]; then # Current user has an existing save folder
|
||||||
configurator_generic_dialog "The current user $SteamAppUser has an existing folder in the multi-user data folder.\n\nThe saves here are likely older than the ones currently used by RetroDECK.\n\nThe old saves will be backed up to $backups_folder and the current saves will be loaded into the multi-user data folder."
|
configurator_generic_dialog "RetroDECK Multi-User Mode" "The current user $SteamAppUser has an existing folder in the multi-user data folder.\n\nThe saves here are likely older than the ones currently used by RetroDECK.\n\nThe old saves will be backed up to $backups_folder and the current saves will be loaded into the multi-user data folder."
|
||||||
mkdir -p "$backups_folder"
|
mkdir -p "$backups_folder"
|
||||||
tar -C "$multi_user_data_folder" -cahf "$backups_folder/multi-user-backup_$SteamAppUser_$(date +"%Y_%m_%d").zip" "$SteamAppUser"
|
tar -C "$multi_user_data_folder" -cahf "$backups_folder/multi-user-backup_$SteamAppUser_$(date +"%Y_%m_%d").zip" "$SteamAppUser"
|
||||||
rm -rf "$multi_user_data_folder/$SteamAppUser" # Remove stale data after backup
|
rm -rf "$multi_user_data_folder/$SteamAppUser" # Remove stale data after backup
|
||||||
|
@ -869,7 +893,7 @@ multi_user_enable_multi_user_mode() {
|
||||||
if [[ -d "$multi_user_data_folder/$SteamAppUser" ]]; then
|
if [[ -d "$multi_user_data_folder/$SteamAppUser" ]]; then
|
||||||
configurator_process_complete_dialog "enabling multi-user support"
|
configurator_process_complete_dialog "enabling multi-user support"
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "It looks like something went wrong while enabling multi-user mode."
|
configurator_generic_dialog "RetroDECK Multi-User Mode" "It looks like something went wrong while enabling multi-user mode."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -893,7 +917,7 @@ multi_user_disable_multi_user_mode() {
|
||||||
set_setting_value $rd_conf "multi_user_mode" "false" retrodeck "options"
|
set_setting_value $rd_conf "multi_user_mode" "false" retrodeck "options"
|
||||||
configurator_process_complete_dialog "disabling multi-user support"
|
configurator_process_complete_dialog "disabling multi-user support"
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "No single user was selected, please try the process again."
|
configurator_generic_dialog "RetroDECK Multi-User Mode" "No single user was selected, please try the process again."
|
||||||
configurator_retrodeck_multiuser_dialog
|
configurator_retrodeck_multiuser_dialog
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -916,12 +940,12 @@ multi_user_determine_current_user() {
|
||||||
else # Unable to find Steam user ID
|
else # Unable to find Steam user ID
|
||||||
if [[ $(ls -1 "$multi_user_data_folder" | wc -l) -gt 1 ]]; then
|
if [[ $(ls -1 "$multi_user_data_folder" | wc -l) -gt 1 ]]; then
|
||||||
if [[ -z $default_user ]]; then # And a default user is not set
|
if [[ -z $default_user ]]; then # And a default user is not set
|
||||||
configurator_generic_dialog "The current user could not be determined from the system, and there are multiple users registered.\n\nPlease select which user is currently playing in the next dialog."
|
configurator_generic_dialog "RetroDECK Multi-User Mode" "The current user could not be determined from the system, and there are multiple users registered.\n\nPlease select which user is currently playing in the next dialog."
|
||||||
SteamAppUser=$(multi_user_choose_current_user_dialog)
|
SteamAppUser=$(multi_user_choose_current_user_dialog)
|
||||||
if [[ ! -z $SteamAppUser ]]; then # User was chosen from dialog
|
if [[ ! -z $SteamAppUser ]]; then # User was chosen from dialog
|
||||||
multi_user_link_current_user_files
|
multi_user_link_current_user_files
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "No user was chosen, RetroDECK will launch with the files from the user who played most recently."
|
configurator_generic_dialog "RetroDECK Multi-User Mode" "No user was chosen, RetroDECK will launch with the files from the user who played most recently."
|
||||||
fi
|
fi
|
||||||
else # The default user is set
|
else # The default user is set
|
||||||
if [[ ! -z $(ls -1 $multi_user_data_folder | grep "$default_user") ]]; then # Confirm user data folder exists
|
if [[ ! -z $(ls -1 $multi_user_data_folder | grep "$default_user") ]]; then # Confirm user data folder exists
|
||||||
|
@ -940,7 +964,7 @@ multi_user_determine_current_user() {
|
||||||
if [[ ! -z "$SteamAppUser" ]]; then
|
if [[ ! -z "$SteamAppUser" ]]; then
|
||||||
multi_user_setup_new_user
|
multi_user_setup_new_user
|
||||||
else # If running in Desktop mode for the first time
|
else # If running in Desktop mode for the first time
|
||||||
configurator_generic_dialog "The current user could not be determined from the system and there is no existing userlist.\n\nPlease enter the Steam account username (not profile name) into the next dialog, or run RetroDECK in game mode."
|
configurator_generic_dialog "RetroDECK Multi-User Mode" "The current user could not be determined from the system and there is no existing userlist.\n\nPlease enter the Steam account username (not profile name) into the next dialog, or run RetroDECK in game mode."
|
||||||
if zenity --entry \
|
if zenity --entry \
|
||||||
--title="Specify Steam username" \
|
--title="Specify Steam username" \
|
||||||
--text="Enter Steam username:"
|
--text="Enter Steam username:"
|
||||||
|
@ -949,17 +973,17 @@ multi_user_determine_current_user() {
|
||||||
if [[ ! -z "$SteamAppUser" ]]; then
|
if [[ ! -z "$SteamAppUser" ]]; then
|
||||||
multi_user_setup_new_user
|
multi_user_setup_new_user
|
||||||
else # But dialog box was blank
|
else # But dialog box was blank
|
||||||
configurator_generic_dialog "No username was entered, so multi-user data folder cannot be created.\n\nDisabling multi-user mode, please try the process again."
|
configurator_generic_dialog "RetroDECK Multi-User Mode" "No username was entered, so multi-user data folder cannot be created.\n\nDisabling multi-user mode, please try the process again."
|
||||||
set_setting_value $rd_conf "multi_user_mode" "false" retrodeck "options"
|
set_setting_value $rd_conf "multi_user_mode" "false" retrodeck "options"
|
||||||
fi
|
fi
|
||||||
else # User clicked "Cancel"
|
else # User clicked "Cancel"
|
||||||
configurator_generic_dialog "Cancelling multi-user mode activation."
|
configurator_generic_dialog "RetroDECK Multi-User Mode" "Cancelling multi-user mode activation."
|
||||||
set_setting_value $rd_conf "multi_user_mode" "false" retrodeck "options"
|
set_setting_value $rd_conf "multi_user_mode" "false" retrodeck "options"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "Multi-user mode is not currently enabled"
|
configurator_generic_dialog "RetroDECK Multi-User Mode" "Multi-user mode is not currently enabled"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1071,14 +1095,16 @@ conf_write() {
|
||||||
if [[ ! -z $(grep -o -P "^\[.+?\]$" <<< "$current_setting_line") ]]; then # If the line is a section header
|
if [[ ! -z $(grep -o -P "^\[.+?\]$" <<< "$current_setting_line") ]]; then # If the line is a section header
|
||||||
local current_section=$(sed 's^[][]^^g' <<< $current_setting_line) # Remove brackets from section name
|
local current_section=$(sed 's^[][]^^g' <<< $current_setting_line) # Remove brackets from section name
|
||||||
else
|
else
|
||||||
|
if [[ "$current_section" == "" || "$current_section" == "paths" || "$current_section" == "options" ]]; then
|
||||||
local current_setting_name=$(get_setting_name "$current_setting_line" "retrodeck") # Read the variable name from the current line
|
local current_setting_name=$(get_setting_name "$current_setting_line" "retrodeck") # Read the variable name from the current line
|
||||||
local current_setting_value=$(get_setting_value "$rd_conf" "$current_setting_name" "retrodeck" "$current_section") # Read the variables value from retrodeck.cfg
|
local current_setting_value=$(get_setting_value "$rd_conf" "$current_setting_name" "retrodeck" "$current_section") # Read the variables value from retrodeck.cfg
|
||||||
local memory_setting_value=$(eval "echo \$${current_setting_name}") # Read the variable names' value from memory
|
local memory_setting_value=$(eval "echo \$${current_setting_name}") # Read the variable names' value from memory
|
||||||
if [[ ! "$current_setting_value" == "$memory_setting_value" ]]; then # If the values are different...
|
if [[ ! "$current_setting_value" == "$memory_setting_value" && ! -z "$memory_setting_value" ]]; then # If the values are different...
|
||||||
set_setting_value "$rd_conf" "$current_setting_name" "$memory_setting_value" "retrodeck" "$current_section" # Update the value in retrodeck.cfg
|
set_setting_value "$rd_conf" "$current_setting_name" "$memory_setting_value" "retrodeck" "$current_section" # Update the value in retrodeck.cfg
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done < $rd_conf
|
done < $rd_conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1092,11 +1118,13 @@ conf_read() {
|
||||||
if [[ ! -z $(grep -o -P "^\[.+?\]$" <<< "$current_setting_line") ]]; then # If the line is a section header
|
if [[ ! -z $(grep -o -P "^\[.+?\]$" <<< "$current_setting_line") ]]; then # If the line is a section header
|
||||||
local current_section=$(sed 's^[][]^^g' <<< $current_setting_line) # Remove brackets from section name
|
local current_section=$(sed 's^[][]^^g' <<< $current_setting_line) # Remove brackets from section name
|
||||||
else
|
else
|
||||||
|
if [[ "$current_section" == "" || "$current_section" == "paths" || "$current_section" == "options" ]]; then
|
||||||
local current_setting_name=$(get_setting_name "$current_setting_line" "retrodeck") # Read the variable name from the current line
|
local current_setting_name=$(get_setting_name "$current_setting_line" "retrodeck") # Read the variable name from the current line
|
||||||
local current_setting_value=$(get_setting_value "$rd_conf" "$current_setting_name" "retrodeck" "$current_section") # Read the variables value from retrodeck.cfg
|
local current_setting_value=$(get_setting_value "$rd_conf" "$current_setting_name" "retrodeck" "$current_section") # Read the variables value from retrodeck.cfg
|
||||||
eval "$current_setting_name=$current_setting_value" # Write the current setting name and value to memory
|
eval "$current_setting_name=$current_setting_value" # Write the current setting name and value to memory
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done < $rd_conf
|
done < $rd_conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1256,7 +1284,7 @@ prepare_emulator() {
|
||||||
cp -fv $emuconfigs/retroarch/retroarch.cfg /var/config/retroarch/
|
cp -fv $emuconfigs/retroarch/retroarch.cfg /var/config/retroarch/
|
||||||
cp -fv $emuconfigs/retroarch/retroarch-core-options.cfg /var/config/retroarch/
|
cp -fv $emuconfigs/retroarch/retroarch-core-options.cfg /var/config/retroarch/
|
||||||
mkdir -pv /var/config/retroarch/config/
|
mkdir -pv /var/config/retroarch/config/
|
||||||
cp -rf $emuconfigs/retroarch/core-overrides/* /var/config/retroarch/config
|
cp -rf "$emuconfigs/retroarch/core-overrides/"* /var/config/retroarch/config
|
||||||
dir_prep "$borders_folder" "/var/config/retroarch/borders"
|
dir_prep "$borders_folder" "/var/config/retroarch/borders"
|
||||||
cp -rt /var/config/retroarch/borders/ /app/retrodeck/emu-configs/retroarch/borders/*
|
cp -rt /var/config/retroarch/borders/ /app/retrodeck/emu-configs/retroarch/borders/*
|
||||||
set_setting_value "$raconf" "savefile_directory" "$saves_folder" "retroarch"
|
set_setting_value "$raconf" "savefile_directory" "$saves_folder" "retroarch"
|
||||||
|
@ -1381,7 +1409,7 @@ prepare_emulator() {
|
||||||
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
||||||
rm -rf "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu"
|
rm -rf "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu"
|
||||||
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu"
|
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu"
|
||||||
cp -fvr $emuconfigs/dolphin/* "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu/"
|
cp -fvr "$emuconfigs/dolphin/"* "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu/"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu/Dolphin.ini" "BIOS" "$bios_folder" "dolphin" "GBA"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu/Dolphin.ini" "BIOS" "$bios_folder" "dolphin" "GBA"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu/Dolphin.ini" "SavesPath" "$saves_folder/gba" "dolphin" "GBA"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu/Dolphin.ini" "SavesPath" "$saves_folder/gba" "dolphin" "GBA"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu/Dolphin.ini" "ISOPath0" "$roms_folder/wii" "dolphin" "General"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/dolphin-emu/Dolphin.ini" "ISOPath0" "$roms_folder/wii" "dolphin" "General"
|
||||||
|
@ -1432,7 +1460,7 @@ prepare_emulator() {
|
||||||
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
||||||
rm -rf "$multi_user_data_folder/$SteamAppUser/config/duckstation"
|
rm -rf "$multi_user_data_folder/$SteamAppUser/config/duckstation"
|
||||||
mkdir -p "$multi_user_data_folder/$SteamAppUser/data/duckstation/"
|
mkdir -p "$multi_user_data_folder/$SteamAppUser/data/duckstation/"
|
||||||
cp -fv $emuconfigs/duckstation/* "$multi_user_data_folder/$SteamAppUser/data/duckstation"
|
cp -fv "$emuconfigs/duckstation/"* "$multi_user_data_folder/$SteamAppUser/data/duckstation"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "SearchDirectory" "$bios_folder" "duckstation" "BIOS"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "SearchDirectory" "$bios_folder" "duckstation" "BIOS"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "Card2Path" "$saves_folder/psx/duckstation/memcards/shared_card_2.mcd" "duckstation" "MemoryCards"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/data/duckstation/settings.ini" "Card2Path" "$saves_folder/psx/duckstation/memcards/shared_card_2.mcd" "duckstation" "MemoryCards"
|
||||||
|
@ -1441,7 +1469,7 @@ prepare_emulator() {
|
||||||
else # Single-user actions
|
else # Single-user actions
|
||||||
rm -rf /var/config/duckstation
|
rm -rf /var/config/duckstation
|
||||||
mkdir -p /var/data/duckstation/
|
mkdir -p /var/data/duckstation/
|
||||||
cp -fv $emuconfigs/duckstation/* /var/data/duckstation
|
cp -fv "$emuconfigs/duckstation/"* /var/data/duckstation
|
||||||
set_setting_value "$duckstationconf" "SearchDirectory" "$bios_folder" "duckstation" "BIOS"
|
set_setting_value "$duckstationconf" "SearchDirectory" "$bios_folder" "duckstation" "BIOS"
|
||||||
set_setting_value "$duckstationconf" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
|
set_setting_value "$duckstationconf" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
|
||||||
set_setting_value "$duckstationconf" "Card2Path" "$saves_folder/psx/duckstation/memcards/shared_card_2.mcd" "duckstation" "MemoryCards"
|
set_setting_value "$duckstationconf" "Card2Path" "$saves_folder/psx/duckstation/memcards/shared_card_2.mcd" "duckstation" "MemoryCards"
|
||||||
|
@ -1507,7 +1535,7 @@ prepare_emulator() {
|
||||||
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
||||||
rm -rf "$multi_user_data_folder/$SteamAppUser/config/PCSX2"
|
rm -rf "$multi_user_data_folder/$SteamAppUser/config/PCSX2"
|
||||||
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/PCSX2/inis"
|
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/PCSX2/inis"
|
||||||
cp -fvr $emuconfigs/PCSX2/* "$multi_user_data_folder/$SteamAppUser/config/PCSX2/inis/"
|
cp -fvr "$emuconfigs/PCSX2/"* "$multi_user_data_folder/$SteamAppUser/config/PCSX2/inis/"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/PCSX2/inis/PCSX2.ini" "Bios" "$bios_folder" "pcsx2" "Folders"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/PCSX2/inis/PCSX2.ini" "Bios" "$bios_folder" "pcsx2" "Folders"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/PCSX2/inis/PCSX2.ini" "Snapshots" "$screenshots_folder" "pcsx2" "Folders"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/PCSX2/inis/PCSX2.ini" "Snapshots" "$screenshots_folder" "pcsx2" "Folders"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/PCSX2/inis/PCSX2.ini" "SaveStates" "$states_folder/ps2/pcsx2" "pcsx2" "Folders"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/PCSX2/inis/PCSX2.ini" "SaveStates" "$states_folder/ps2/pcsx2" "pcsx2" "Folders"
|
||||||
|
@ -1517,7 +1545,7 @@ prepare_emulator() {
|
||||||
else # Single-user actions
|
else # Single-user actions
|
||||||
rm -rf /var/config/PCSX2
|
rm -rf /var/config/PCSX2
|
||||||
mkdir -pv "/var/config/PCSX2/inis"
|
mkdir -pv "/var/config/PCSX2/inis"
|
||||||
cp -fvr $emuconfigs/PCSX2/* /var/config/PCSX2/inis/
|
cp -fvr "$emuconfigs/PCSX2/"* /var/config/PCSX2/inis/
|
||||||
set_setting_value "$pcsx2conf" "Bios" "$bios_folder" "pcsx2" "Folders"
|
set_setting_value "$pcsx2conf" "Bios" "$bios_folder" "pcsx2" "Folders"
|
||||||
set_setting_value "$pcsx2conf" "Snapshots" "$screenshots_folder" "pcsx2" "Folders"
|
set_setting_value "$pcsx2conf" "Snapshots" "$screenshots_folder" "pcsx2" "Folders"
|
||||||
set_setting_value "$pcsx2conf" "SaveStates" "$states_folder/ps2/pcsx2" "pcsx2" "Folders"
|
set_setting_value "$pcsx2conf" "SaveStates" "$states_folder/ps2/pcsx2" "pcsx2" "Folders"
|
||||||
|
@ -1553,13 +1581,13 @@ prepare_emulator() {
|
||||||
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
||||||
rm -rf "$multi_user_data_folder/$SteamAppUser/config/ppsspp"
|
rm -rf "$multi_user_data_folder/$SteamAppUser/config/ppsspp"
|
||||||
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/ppsspp/PSP/SYSTEM/"
|
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/ppsspp/PSP/SYSTEM/"
|
||||||
cp -fv $emuconfigs/ppssppsdl/* "$multi_user_data_folder/$SteamAppUser/config/ppsspp/PSP/SYSTEM/"
|
cp -fv "$emuconfigs/ppssppsdl/"* "$multi_user_data_folder/$SteamAppUser/config/ppsspp/PSP/SYSTEM/"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/ppsspp/PSP/SYSTEM/ppsspp.ini" "CurrentDirectory" "$roms_folder/psp" "ppsspp" "General"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/ppsspp/PSP/SYSTEM/ppsspp.ini" "CurrentDirectory" "$roms_folder/psp" "ppsspp" "General"
|
||||||
dir_prep "$multi_user_data_folder/$SteamAppUser/config/ppsspp" "/var/config/ppsspp"
|
dir_prep "$multi_user_data_folder/$SteamAppUser/config/ppsspp" "/var/config/ppsspp"
|
||||||
else # Single-user actions
|
else # Single-user actions
|
||||||
rm -rf /var/config/ppsspp
|
rm -rf /var/config/ppsspp
|
||||||
mkdir -p /var/config/ppsspp/PSP/SYSTEM/
|
mkdir -p /var/config/ppsspp/PSP/SYSTEM/
|
||||||
cp -fv $emuconfigs/ppssppsdl/* /var/config/ppsspp/PSP/SYSTEM/
|
cp -fv "$emuconfigs/ppssppsdl/"* /var/config/ppsspp/PSP/SYSTEM/
|
||||||
set_setting_value "$ppssppconf" "CurrentDirectory" "$roms_folder/psp" "ppsspp" "General"
|
set_setting_value "$ppssppconf" "CurrentDirectory" "$roms_folder/psp" "ppsspp" "General"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1576,7 +1604,7 @@ prepare_emulator() {
|
||||||
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
||||||
rm -rf "$multi_user_data_folder/$SteamAppUser/config/primehack"
|
rm -rf "$multi_user_data_folder/$SteamAppUser/config/primehack"
|
||||||
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/primehack"
|
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/primehack"
|
||||||
cp -fvr $emuconfigs/primehack/* "$multi_user_data_folder/$SteamAppUser/config/primehack/"
|
cp -fvr "$emuconfigs/primehack/"* "$multi_user_data_folder/$SteamAppUser/config/primehack/"
|
||||||
set_setting_value ""$multi_user_data_folder/$SteamAppUser/config/primehack/Dolphin.ini"" "ISOPath0" "$roms_folder/gc" "primehack" "General"
|
set_setting_value ""$multi_user_data_folder/$SteamAppUser/config/primehack/Dolphin.ini"" "ISOPath0" "$roms_folder/gc" "primehack" "General"
|
||||||
dir_prep "$multi_user_data_folder/$SteamAppUser/config/primehack" "/var/config/primehack"
|
dir_prep "$multi_user_data_folder/$SteamAppUser/config/primehack" "/var/config/primehack"
|
||||||
else # Single-user actions
|
else # Single-user actions
|
||||||
|
@ -1617,7 +1645,7 @@ prepare_emulator() {
|
||||||
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
||||||
rm -rf "$multi_user_data_folder/$SteamAppUser/config/rpcs3"
|
rm -rf "$multi_user_data_folder/$SteamAppUser/config/rpcs3"
|
||||||
mkdir -pv "$multi_user_data_folder/$SteamAppUser/config/rpcs3/"
|
mkdir -pv "$multi_user_data_folder/$SteamAppUser/config/rpcs3/"
|
||||||
cp -fr $emuconfigs/rpcs3/* "$multi_user_data_folder/$SteamAppUser/config/rpcs3/"
|
cp -fr "$emuconfigs/rpcs3/"* "$multi_user_data_folder/$SteamAppUser/config/rpcs3/"
|
||||||
# This is an unfortunate one-off because set_setting_value does not currently support settings with $ in the name.
|
# This is an unfortunate one-off because set_setting_value does not currently support settings with $ in the name.
|
||||||
sed -i 's^\^$(EmulatorDir): .*^$(EmulatorDir): '"$bios_folder/rpcs3/"'^' "$multi_user_data_folder/$SteamAppUser/config/rpcs3/vfs.yml"
|
sed -i 's^\^$(EmulatorDir): .*^$(EmulatorDir): '"$bios_folder/rpcs3/"'^' "$multi_user_data_folder/$SteamAppUser/config/rpcs3/vfs.yml"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/rpcs3/vfs.yml" "/games/" "$roms_folder/ps3/" "rpcs3"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/rpcs3/vfs.yml" "/games/" "$roms_folder/ps3/" "rpcs3"
|
||||||
|
@ -1625,7 +1653,7 @@ prepare_emulator() {
|
||||||
else # Single-user actions
|
else # Single-user actions
|
||||||
rm -rf /var/config/rpcs3
|
rm -rf /var/config/rpcs3
|
||||||
mkdir -pv /var/config/rpcs3/
|
mkdir -pv /var/config/rpcs3/
|
||||||
cp -fr $emuconfigs/rpcs3/* /var/config/rpcs3/
|
cp -fr "$emuconfigs/rpcs3/"* /var/config/rpcs3/
|
||||||
# This is an unfortunate one-off because set_setting_value does not currently support settings with $ in the name.
|
# This is an unfortunate one-off because set_setting_value does not currently support settings with $ in the name.
|
||||||
sed -i 's^\^$(EmulatorDir): .*^$(EmulatorDir): '"$bios_folder/rpcs3/"'^' "$rpcs3vfsconf"
|
sed -i 's^\^$(EmulatorDir): .*^$(EmulatorDir): '"$bios_folder/rpcs3/"'^' "$rpcs3vfsconf"
|
||||||
set_setting_value "$rpcs3vfsconf" "/games/" "$roms_folder/ps3/" "rpcs3"
|
set_setting_value "$rpcs3vfsconf" "/games/" "$roms_folder/ps3/" "rpcs3"
|
||||||
|
@ -1735,7 +1763,7 @@ prepare_emulator() {
|
||||||
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
|
||||||
rm -rf "$multi_user_data_folder/$SteamAppUser/config/yuzu"
|
rm -rf "$multi_user_data_folder/$SteamAppUser/config/yuzu"
|
||||||
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/yuzu"
|
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/yuzu"
|
||||||
cp -fvr $emuconfigs/yuzu/* "$multi_user_data_folder/$SteamAppUser/config/yuzu/"
|
cp -fvr "$emuconfigs/yuzu/"* "$multi_user_data_folder/$SteamAppUser/config/yuzu/"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/yuzu/qt-config.ini" "nand_directory" "$saves_folder/switch/yuzu/nand" "yuzu" "Data%20Storage"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/yuzu/qt-config.ini" "nand_directory" "$saves_folder/switch/yuzu/nand" "yuzu" "Data%20Storage"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/yuzu/qt-config.ini" "sdmc_directory" "$saves_folder/switch/yuzu/sdmc" "yuzu" "Data%20Storage"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/yuzu/qt-config.ini" "sdmc_directory" "$saves_folder/switch/yuzu/sdmc" "yuzu" "Data%20Storage"
|
||||||
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/yuzu/qt-config.ini" "Paths\gamedirs\4\path" "$roms_folder/switch" "yuzu" "UI"
|
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/yuzu/qt-config.ini" "Paths\gamedirs\4\path" "$roms_folder/switch" "yuzu" "UI"
|
||||||
|
@ -1744,7 +1772,7 @@ prepare_emulator() {
|
||||||
else # Single-user actions
|
else # Single-user actions
|
||||||
rm -rf /var/config/yuzu
|
rm -rf /var/config/yuzu
|
||||||
mkdir -pv /var/config/yuzu/
|
mkdir -pv /var/config/yuzu/
|
||||||
cp -fvr $emuconfigs/yuzu/* /var/config/yuzu/
|
cp -fvr "$emuconfigs/yuzu/"* /var/config/yuzu/
|
||||||
set_setting_value "$yuzuconf" "nand_directory" "$saves_folder/switch/yuzu/nand" "yuzu" "Data%20Storage"
|
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" "sdmc_directory" "$saves_folder/switch/yuzu/sdmc" "yuzu" "Data%20Storage"
|
||||||
set_setting_value "$yuzuconf" "Paths\gamedirs\4\path" "$roms_folder/switch" "yuzu" "UI"
|
set_setting_value "$yuzuconf" "Paths\gamedirs\4\path" "$roms_folder/switch" "yuzu" "UI"
|
||||||
|
@ -1814,9 +1842,11 @@ install_retrodeck_starterpack() {
|
||||||
install_retrodeck_controller_profile() {
|
install_retrodeck_controller_profile() {
|
||||||
# This function will install the needed files for the custom RetroDECK controller profile
|
# This function will install the needed files for the custom RetroDECK controller profile
|
||||||
# NOTE: These files need to be stored in shared locations for Steam, outside of the normal RetroDECK folders and should always be an optional user choice
|
# NOTE: These files need to be stored in shared locations for Steam, outside of the normal RetroDECK folders and should always be an optional user choice
|
||||||
|
# BIGGER NOTE: As part of this process, all emulators have their configs hard-reset to match the controller mappings of the profile
|
||||||
# USAGE: install_retrodeck_controller_profile
|
# USAGE: install_retrodeck_controller_profile
|
||||||
rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/"
|
rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/"
|
||||||
cp -f "$emuconfigs/defaults/retrodeck/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf"
|
cp -f "$emuconfigs/defaults/retrodeck/RetroDECK_controller_config.vdf" "$HOME/.steam/steam/controller_base/templates/RetroDECK_controller_config.vdf"
|
||||||
|
prepare_emulator "all" "reset"
|
||||||
}
|
}
|
||||||
|
|
||||||
create_lock() {
|
create_lock() {
|
||||||
|
@ -2230,11 +2260,11 @@ configurator_process_complete_dialog() {
|
||||||
|
|
||||||
configurator_generic_dialog() {
|
configurator_generic_dialog() {
|
||||||
# This dialog is for showing temporary messages before another process happens.
|
# This dialog is for showing temporary messages before another process happens.
|
||||||
# USAGE: configurator_generic_dialog "info text"
|
# USAGE: configurator_generic_dialog "title text" "info text"
|
||||||
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" \
|
--title "$1" \
|
||||||
--text="$1"
|
--text="$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
configurator_generic_question_dialog() {
|
configurator_generic_question_dialog() {
|
||||||
|
@ -2303,17 +2333,17 @@ configurator_move_folder_dialog() {
|
||||||
elif [[ "$choice" == "SD Card" ]]; then # If the user wants to move the folder to the predefined SD card location, set the target as sdcard from retrodeck.cfg
|
elif [[ "$choice" == "SD Card" ]]; then # If the user wants to move the folder to the predefined SD card location, set the target as sdcard from retrodeck.cfg
|
||||||
local dest_root="$sdcard"
|
local dest_root="$sdcard"
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "Select the parent folder you would like to store the $(basename $dir_to_move) folder in."
|
configurator_generic_dialog "RetroDECK Configurator - Move Folder" "Select the parent folder you would like to store the $(basename $dir_to_move) folder in."
|
||||||
local dest_root=$(directory_browse "RetroDECK directory location") # Set the destination root as the selected custom location
|
local dest_root=$(directory_browse "RetroDECK directory location") # Set the destination root as the selected custom location
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ (! -z "$dest_root") && ( -w "$dest_root") ]]; then # If user picked a destination and it is writable
|
if [[ (! -z "$dest_root") && ( -w "$dest_root") ]]; then # If user picked a destination and it is writable
|
||||||
if [[ (-d "$dest_root/$rd_dir_path") && (! -L "$dest_root/$rd_dir_path") && (! $rd_dir_name == "rdhome") ]] || [[ "$(realpath $dir_to_move)" == "$dest_root/$rd_dir_path" ]]; then # If the user is trying to move the folder to where it already is (excluding symlinks that will be unlinked)
|
if [[ (-d "$dest_root/$rd_dir_path") && (! -L "$dest_root/$rd_dir_path") && (! $rd_dir_name == "rdhome") ]] || [[ "$(realpath $dir_to_move)" == "$dest_root/$rd_dir_path" ]]; then # If the user is trying to move the folder to where it already is (excluding symlinks that will be unlinked)
|
||||||
configurator_generic_dialog "The $(basename $dir_to_move) folder is already at that location, please pick a new one."
|
configurator_generic_dialog "RetroDECK Configurator - Move Folder" "The $(basename $dir_to_move) folder is already at that location, please pick a new one."
|
||||||
configurator_move_folder_dialog "$rd_dir_name"
|
configurator_move_folder_dialog "$rd_dir_name"
|
||||||
else
|
else
|
||||||
if [[ $(verify_space "$(echo $dir_to_move | sed 's/\/$//')" "$dest_root") ]]; then # Make sure there is enough space at the destination
|
if [[ $(verify_space "$(echo $dir_to_move | sed 's/\/$//')" "$dest_root") ]]; then # Make sure there is enough space at the destination
|
||||||
configurator_generic_dialog "Moving $(basename $dir_to_move) folder to $choice"
|
configurator_generic_dialog "RetroDECK Configurator - Move Folder" "Moving $(basename $dir_to_move) folder to $choice"
|
||||||
unlink "$dest_root/$rd_dir_path" # In case there is already a symlink at the picked destination
|
unlink "$dest_root/$rd_dir_path" # In case there is already a symlink at the picked destination
|
||||||
move "$dir_to_move" "$dest_root/$rd_dir_path"
|
move "$dir_to_move" "$dest_root/$rd_dir_path"
|
||||||
if [[ -d "$dest_root/$rd_dir_path" ]]; then # If the move succeeded
|
if [[ -d "$dest_root/$rd_dir_path" ]]; then # If the move succeeded
|
||||||
|
@ -2328,7 +2358,7 @@ configurator_move_folder_dialog() {
|
||||||
fi
|
fi
|
||||||
configurator_process_complete_dialog "moving the RetroDECK data directory to internal storage"
|
configurator_process_complete_dialog "moving the RetroDECK data directory to internal storage"
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "The moving process was not completed, please try again."
|
configurator_generic_dialog "RetroDECK Configurator - Move Folder" "The moving process was not completed, please try again."
|
||||||
fi
|
fi
|
||||||
else # If there isn't enough space in the picked destination
|
else # If there isn't enough space in the picked destination
|
||||||
zenity --icon-name=net.retrodeck.retrodeck --error --no-wrap \
|
zenity --icon-name=net.retrodeck.retrodeck --error --no-wrap \
|
||||||
|
@ -2339,21 +2369,21 @@ configurator_move_folder_dialog() {
|
||||||
fi
|
fi
|
||||||
else # If the user didn't pick any custom destination, or the destination picked is unwritable
|
else # If the user didn't pick any custom destination, or the destination picked is unwritable
|
||||||
if [[ ! -z "$dest_root" ]]; then
|
if [[ ! -z "$dest_root" ]]; then
|
||||||
configurator_generic_dialog "No destination was chosen, so no files have been moved."
|
configurator_generic_dialog "RetroDECK Configurator - Move Folder" "No destination was chosen, so no files have been moved."
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "The chosen destination is not writable.\nNo files have been moved.\n\nThis can happen when trying to select a location that RetroDECK does not have permission to write.\nThis can normally be fixed by adding the desired path to the RetroDECK permissions with Flatseal."
|
configurator_generic_dialog "RetroDECK Configurator - Move Folder" "The chosen destination is not writable.\nNo files have been moved.\n\nThis can happen when trying to select a location that RetroDECK does not have permission to write.\nThis can normally be fixed by adding the desired path to the RetroDECK permissions with Flatseal."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
else # The folder to move was not found at the path pulled from retrodeck.cfg and it needs to be reconfigured manually.
|
else # The folder to move was not found at the path pulled from retrodeck.cfg and it needs to be reconfigured manually.
|
||||||
configurator_generic_dialog "The $(basename $dir_to_move) folder was not found at the expected location.\n\nThis may have happened if the folder was moved manually.\n\nPlease select the current location of the folder."
|
configurator_generic_dialog "RetroDECK Configurator - Move Folder" "The $(basename $dir_to_move) folder was not found at the expected location.\n\nThis may have happened if the folder was moved manually.\n\nPlease select the current location of the folder."
|
||||||
dir_to_move=$(directory_browse "RetroDECK $(basename $dir_to_move) directory location")
|
dir_to_move=$(directory_browse "RetroDECK $(basename $dir_to_move) directory location")
|
||||||
eval "$rd_dir_name"="$dir_to_move"
|
eval "$rd_dir_name"="$dir_to_move"
|
||||||
prepare_emulator "postmove" "all"
|
prepare_emulator "postmove" "all"
|
||||||
conf_write
|
conf_write
|
||||||
configurator_generic_dialog "RetroDECK $(basename $dir_to_move) folder now configured at\n$dir_to_move."
|
configurator_generic_dialog "RetroDECK Configurator - Move Folder" "RetroDECK $(basename $dir_to_move) folder now configured at\n$dir_to_move."
|
||||||
configurator_move_folder_dialog "$rd_dir_name"
|
configurator_move_folder_dialog "$rd_dir_name"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ if [[ ! -f "$rd_conf" ]]; then
|
||||||
|
|
||||||
# Check if SD card path has changed from SteamOS update
|
# Check if SD card path has changed from SteamOS update
|
||||||
if [[ ! -d $default_sd && "$(ls -A /run/media/deck/)" ]]; then
|
if [[ ! -d $default_sd && "$(ls -A /run/media/deck/)" ]]; then
|
||||||
configurator_generic_dialog "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 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\"."
|
||||||
default_sd=$(directory_browse "SD Card Location")
|
default_sd=$(directory_browse "SD Card Location")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ else
|
||||||
# Verify rdhome is where it is supposed to be.
|
# Verify rdhome is where it is supposed to be.
|
||||||
if [[ ! -d $rdhome ]]; then
|
if [[ ! -d $rdhome ]]; then
|
||||||
prev_home_path=$rdhome
|
prev_home_path=$rdhome
|
||||||
configurator_generic_dialog "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."
|
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")
|
new_home_path=$(directory_browse "RetroDECK folder location")
|
||||||
set_setting_value $rd_conf "rdhome" "$new_home_path" retrodeck "paths"
|
set_setting_value $rd_conf "rdhome" "$new_home_path" retrodeck "paths"
|
||||||
conf_read
|
conf_read
|
||||||
|
|
|
@ -78,7 +78,7 @@ modules:
|
||||||
mkdir -p ${FLATPAK_DEST}/retrodeck/
|
mkdir -p ${FLATPAK_DEST}/retrodeck/
|
||||||
if [[ $VERSION == *"cooker"* ]];
|
if [[ $VERSION == *"cooker"* ]];
|
||||||
then
|
then
|
||||||
VERSION="$VERSION[$(cat ./buildid)]"
|
VERSION="$VERSION[VERSIONPLACEHOLDER]"
|
||||||
fi
|
fi
|
||||||
echo $VERSION >> ${FLATPAK_DEST}/retrodeck/version
|
echo $VERSION >> ${FLATPAK_DEST}/retrodeck/version
|
||||||
cat ${FLATPAK_DEST}/retrodeck/version
|
cat ${FLATPAK_DEST}/retrodeck/version
|
||||||
|
|
|
@ -45,9 +45,9 @@ post_update() {
|
||||||
dir_prep "$bios_folder/pico-8" "$HOME/.lexaloffle/pico-8" # Store binary and config files together. The .lexaloffle directory is a hard-coded location for the PICO-8 config file, cannot be changed
|
dir_prep "$bios_folder/pico-8" "$HOME/.lexaloffle/pico-8" # Store binary and config files together. The .lexaloffle directory is a hard-coded location for the PICO-8 config file, cannot be changed
|
||||||
dir_prep "$saves_folder/pico-8" "$bios_folder/pico-8/cdata" # PICO-8 saves folder structure was backwards, fixing for consistency.
|
dir_prep "$saves_folder/pico-8" "$bios_folder/pico-8/cdata" # PICO-8 saves folder structure was backwards, fixing for consistency.
|
||||||
|
|
||||||
cp -f $emuconfigs/citra/qt-config.ini /var/config/citra-emu/qt-config.ini
|
cp -f "$emuconfigs/citra/qt-config.ini" /var/config/citra-emu/qt-config.ini
|
||||||
sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/citra-emu/qt-config.ini
|
sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/citra-emu/qt-config.ini
|
||||||
cp -fr $emuconfigs/yuzu/* /var/config/yuzu/
|
cp -fr "$emuconfigs/yuzu/"* /var/config/yuzu/
|
||||||
sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/yuzu/qt-config.ini
|
sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/yuzu/qt-config.ini
|
||||||
|
|
||||||
# Remove unneeded tools folder, as location has changed to RO space
|
# Remove unneeded tools folder, as location has changed to RO space
|
||||||
|
@ -69,19 +69,36 @@ post_update() {
|
||||||
fi
|
fi
|
||||||
if [[ $prev_version -le "070" ]]; then
|
if [[ $prev_version -le "070" ]]; then
|
||||||
# In version 0.7.0b, the following changes were made that required config file updates/reset or other changes to the filesystem:
|
# In version 0.7.0b, the following changes were made that required config file updates/reset or other changes to the filesystem:
|
||||||
|
# - Update retrodeck.cfg and set new paths to $rdhome by default
|
||||||
|
# - Update PCSX2 and Duckstation configs to latest templates (to accomadate RetroAchievements feature)
|
||||||
# - New ~/retrodeck/mods and ~/retrodeck/texture_packs directories are added and symlinked to multiple different emulators (where supported)
|
# - New ~/retrodeck/mods and ~/retrodeck/texture_packs directories are added and symlinked to multiple different emulators (where supported)
|
||||||
# - Expose ES-DE gamelists folder to user at ~/retrodeck/gamelists
|
# - Expose ES-DE gamelists folder to user at ~/retrodeck/gamelists
|
||||||
# - Add new sections [paths] and [options] headers to retrodeck.cfg
|
|
||||||
# - Prepackaged DOOM!
|
|
||||||
# - Update RPCS3 vfs file contents. migrate from old location if needed
|
# - Update RPCS3 vfs file contents. migrate from old location if needed
|
||||||
# - Disable ESDE update checks for existing installs
|
# - Disable ESDE update checks for existing installs
|
||||||
# - Move Duckstation saves and states to new locations
|
# - Move Duckstation saves and states to new locations
|
||||||
# - Clean up legacy tools files (Configurator is now accessible through the main ES-DE menu)
|
# - Clean up legacy tools files (Configurator is now accessible through the main ES-DE menu)
|
||||||
# - Move Dolphin and Primehack save folder names
|
# - Move Dolphin and Primehack save folder names
|
||||||
# - Offer user option of installing custom controller config
|
|
||||||
|
update_rd_conf # Expand retrodeck.cfg to latest template
|
||||||
|
set_setting_value $rd_conf "screenshots_folder" "$rdhome/screenshots"
|
||||||
|
set_setting_value $rd_conf "mods_folder" "$rdhome/mods"
|
||||||
|
set_setting_value $rd_conf "texture_packs_folder" "$rdhome/texture_packs"
|
||||||
|
set_setting_value $rd_conf "borders_folder" "$rdhome/borders"
|
||||||
|
conf_read
|
||||||
|
|
||||||
|
mv -f "$pcsx2qtconf" "$pcsx2qtconf.bak"
|
||||||
|
generate_single_patch "$emuconfigs/PCSX2/PCSX2.ini" "$pcsx2qtconf.bak" "/var/config/PCSX2/inis/PCSX2-cheevos-upgrade.patch" pcsx2
|
||||||
|
deploy_single_patch "$emuconfigs/PCSX2/PCSX2.ini" "/var/config/PCSX2/inis/PCSX2-cheevos-upgrade.patch" "$pcsx2qtconf"
|
||||||
|
rm -f "/var/config/PCSX2/inis/PCSX2-cheevos-upgrade.patch"
|
||||||
|
mv -f "$duckstationconf" "$duckstationconf.bak"
|
||||||
|
generate_single_patch "$emuconfigs/duckstation/settings.ini" "$duckstationconf.bak" "/var/data/duckstation/duckstation-cheevos-upgrade.patch" pcsx2
|
||||||
|
deploy_single_patch "$emuconfigs/duckstation/settings.ini" "/var/data/duckstation/duckstation-cheevos-upgrade.patch" "$duckstationconf"
|
||||||
|
rm -f "/var/data/duckstation/duckstation-cheevos-upgrade.patch"
|
||||||
|
|
||||||
mkdir -p "$mods_folder"
|
mkdir -p "$mods_folder"
|
||||||
mkdir -p "$texture_packs_folder"
|
mkdir -p "$texture_packs_folder"
|
||||||
|
mkdir -p "$borders_folder"
|
||||||
|
|
||||||
dir_prep "$mods_folder/Primehack" "/var/data/primehack/Load/GraphicMods"
|
dir_prep "$mods_folder/Primehack" "/var/data/primehack/Load/GraphicMods"
|
||||||
dir_prep "$texture_packs_folder/Primehack" "/var/data/primehack/Load/Textures"
|
dir_prep "$texture_packs_folder/Primehack" "/var/data/primehack/Load/Textures"
|
||||||
dir_prep "$mods_folder/Dolphin" "/var/data/dolphin-emu/Load/GraphicMods"
|
dir_prep "$mods_folder/Dolphin" "/var/data/dolphin-emu/Load/GraphicMods"
|
||||||
|
@ -101,7 +118,7 @@ post_update() {
|
||||||
set_setting_value "$rpcs3vfsconf" "/games/" "$roms_folder/ps3/" "rpcs3"
|
set_setting_value "$rpcs3vfsconf" "/games/" "$roms_folder/ps3/" "rpcs3"
|
||||||
if [[ -d "$roms_folder/ps3/emudir" ]]; then # The old location exists, meaning the emulator was run at least once.
|
if [[ -d "$roms_folder/ps3/emudir" ]]; then # The old location exists, meaning the emulator was run at least once.
|
||||||
mkdir "$bios_folder/rpcs3"
|
mkdir "$bios_folder/rpcs3"
|
||||||
mv "$roms_folder/ps3/emudir/*" "$bios_folder/rpcs3/"
|
mv "$roms_folder/ps3/emudir/"* "$bios_folder/rpcs3/"
|
||||||
rm "$roms_folder/ps3/emudir"
|
rm "$roms_folder/ps3/emudir"
|
||||||
configurator_generic_dialog "RetroDECK 0.7.0b Upgrade" "As part of this update and due to a RPCS3 config upgrade, the files that used to exist at\n\n~/retrodeck/roms/ps3/emudir\n\nare now located at\n\n~/retrodeck/bios/rpcs3.\nYour existing files have been moved automatically."
|
configurator_generic_dialog "RetroDECK 0.7.0b Upgrade" "As part of this update and due to a RPCS3 config upgrade, the files that used to exist at\n\n~/retrodeck/roms/ps3/emudir\n\nare now located at\n\n~/retrodeck/bios/rpcs3.\nYour existing files have been moved automatically."
|
||||||
fi
|
fi
|
||||||
|
@ -120,7 +137,7 @@ post_update() {
|
||||||
configurator_generic_dialog "RetroDECK 0.7.0b Upgrade" "As part of this update, the location of saves and states for Duckstation has been changed.\n\nYour files will be moved automatically, and can now be found at\n\n~.../saves/psx/duckstation/memcards/\nand\n~.../states/psx/duckstation/"
|
configurator_generic_dialog "RetroDECK 0.7.0b Upgrade" "As part of this update, the location of saves and states for Duckstation has been changed.\n\nYour files will be moved automatically, and can now be found at\n\n~.../saves/psx/duckstation/memcards/\nand\n~.../states/psx/duckstation/"
|
||||||
fi
|
fi
|
||||||
mkdir -p "$saves_folder/psx/duckstation/memcards"
|
mkdir -p "$saves_folder/psx/duckstation/memcards"
|
||||||
mv "$saves_folder/duckstation/*" "$saves_folder/psx/duckstation/memcards/"
|
mv "$saves_folder/duckstation/"* "$saves_folder/psx/duckstation/memcards/"
|
||||||
rmdir "$saves_folder/duckstation" # File-safe folder cleanup
|
rmdir "$saves_folder/duckstation" # File-safe folder cleanup
|
||||||
unlink "/var/data/duckstation/memcards"
|
unlink "/var/data/duckstation/memcards"
|
||||||
set_setting_value "$duckstationconf" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
|
set_setting_value "$duckstationconf" "Card1Path" "$saves_folder/psx/duckstation/memcards/shared_card_1.mcd" "duckstation" "MemoryCards"
|
||||||
|
@ -146,11 +163,6 @@ post_update() {
|
||||||
dir_prep "$saves_folder/gc/primehack/EU" "/var/data/primehack/GC/EUR"
|
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/US" "/var/data/primehack/GC/USA"
|
||||||
dir_prep "$saves_folder/gc/primehack/JP" "/var/data/primehack/GC/JAP"
|
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
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The following commands are run every time.
|
# The following commands are run every time.
|
||||||
|
@ -163,7 +175,6 @@ post_update() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
update_splashscreens
|
update_splashscreens
|
||||||
update_rd_conf
|
|
||||||
) |
|
) |
|
||||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
||||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 717b78093797270877ec416e58082f1c71d435d8
|
Subproject commit 0b1cfb79e591e10488a3262d6b38db843c39a409
|
|
@ -145,7 +145,7 @@ else
|
||||||
if [[ $(check_network_connectivity) == "true" ]]; then
|
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
finit # Executing First/Force init
|
finit # Executing First/Force init
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "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."
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -100,11 +100,11 @@ configurator_reset_dialog() {
|
||||||
prepare_emulator "reset" "$emulator_to_reset" "configurator"
|
prepare_emulator "reset" "$emulator_to_reset" "configurator"
|
||||||
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "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_generic_dialog "RetroDeck Configurator - 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
|
configurator_reset_dialog
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "Reset process cancelled."
|
configurator_generic_dialog "RetroDeck Configurator - Reset" "Reset process cancelled."
|
||||||
configurator_reset_dialog
|
configurator_reset_dialog
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -114,7 +114,7 @@ configurator_reset_dialog() {
|
||||||
prepare_emulator "reset" "$emulator_to_reset" "configurator"
|
prepare_emulator "reset" "$emulator_to_reset" "configurator"
|
||||||
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
configurator_process_complete_dialog "resetting $emulator_to_reset"
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "Reset process cancelled."
|
configurator_generic_dialog "RetroDeck Configurator - Reset" "Reset process cancelled."
|
||||||
configurator_reset_dialog
|
configurator_reset_dialog
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -132,11 +132,11 @@ configurator_reset_dialog() {
|
||||||
prepare_emulator "reset" "all"
|
prepare_emulator "reset" "all"
|
||||||
configurator_process_complete_dialog "resetting all emulators"
|
configurator_process_complete_dialog "resetting all emulators"
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "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_generic_dialog "RetroDeck Configurator - 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
|
configurator_reset_dialog
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "Reset process cancelled."
|
configurator_generic_dialog "RetroDeck Configurator - Reset" "Reset process cancelled."
|
||||||
configurator_reset_dialog
|
configurator_reset_dialog
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -151,7 +151,7 @@ configurator_reset_dialog() {
|
||||||
rm -f "$rd_conf"
|
rm -f "$rd_conf"
|
||||||
configurator_process_complete_dialog "resetting RetroDECK"
|
configurator_process_complete_dialog "resetting RetroDECK"
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "Reset process cancelled."
|
configurator_generic_dialog "RetroDeck Configurator - Reset" "Reset process cancelled."
|
||||||
configurator_reset_dialog
|
configurator_reset_dialog
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -488,15 +488,15 @@ configurator_compress_single_game_dialog() {
|
||||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
||||||
--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 - Compression in Progress"
|
--title "RetroDECK Configurator Utility - Compression in Progress"
|
||||||
configurator_generic_dialog "The compression process is complete!"
|
configurator_generic_dialog "RetroDECK Configurator - ROM Compressor" "The compression process is complete!"
|
||||||
configurator_compress_games_dialog
|
configurator_compress_games_dialog
|
||||||
|
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "The selected file does not have any compatible compressed format."
|
configurator_generic_dialog "RetroDECK Configurator - ROM Compressor" "The selected file does not have any compatible compressed format."
|
||||||
configurator_compress_games_dialog
|
configurator_compress_games_dialog
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "No file selected, returning to main menu"
|
configurator_generic_dialog "RetroDECK Configurator - ROM Compressor" "No file selected, returning to main menu"
|
||||||
configurator_welcome_dialog
|
configurator_welcome_dialog
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -601,7 +601,7 @@ configurator_compress_some_games_dialog() {
|
||||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \
|
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \
|
||||||
--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 - Compression in Progress"
|
--title "RetroDECK Configurator Utility - Compression in Progress"
|
||||||
configurator_generic_dialog "The compression process is complete!"
|
configurator_generic_dialog "RetroDECK Configurator - ROM Compressor" "The compression process is complete!"
|
||||||
configurator_compress_games_dialog
|
configurator_compress_games_dialog
|
||||||
else
|
else
|
||||||
configurator_compress_games_dialog
|
configurator_compress_games_dialog
|
||||||
|
@ -658,10 +658,10 @@ configurator_compress_all_games_dialog() {
|
||||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \
|
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --auto-close \
|
||||||
--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 - Compression in Progress"
|
--title "RetroDECK Configurator Utility - Compression in Progress"
|
||||||
configurator_generic_dialog "The compression process is complete!"
|
configurator_generic_dialog "RetroDECK Configurator - ROM Compressor" "The compression process is complete!"
|
||||||
configurator_compress_games_dialog
|
configurator_compress_games_dialog
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "There were no games found that could be compressed."
|
configurator_generic_dialog "RetroDECK Configurator - ROM Compressor" "There were no games found that could be compressed."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -731,40 +731,13 @@ configurator_check_multifile_game_structure() {
|
||||||
--title "RetroDECK" \
|
--title "RetroDECK" \
|
||||||
--text="The following games were found to have the incorrect folder structure:\n\n$(find $roms_folder -maxdepth 2 -mindepth 2 -type d ! -name "*.m3u" ! -name "*.ps3")\n\nIncorrect folder structure can result in failure to launch games or saves being in the incorrect location.\n\nPlease see the RetroDECK wiki for more details!\n\nYou can find this list of games in ~/retrodeck/.logs"
|
--text="The following games were found to have the incorrect folder structure:\n\n$(find $roms_folder -maxdepth 2 -mindepth 2 -type d ! -name "*.m3u" ! -name "*.ps3")\n\nIncorrect folder structure can result in failure to launch games or saves being in the incorrect location.\n\nPlease see the RetroDECK wiki for more details!\n\nYou can find this list of games in ~/retrodeck/.logs"
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "No incorrect multi-file game folder structures found."
|
configurator_generic_dialog "RetroDECK Configurator - Multi-file Game Structure" "No incorrect multi-file game folder structures found."
|
||||||
fi
|
fi
|
||||||
configurator_tools_and_troubleshooting_dialog
|
configurator_tools_and_troubleshooting_dialog
|
||||||
}
|
}
|
||||||
|
|
||||||
configurator_check_bios_files_basic() {
|
configurator_check_bios_files() {
|
||||||
configurator_generic_dialog "This check will look for BIOS files that RetroDECK has identified as working.\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."
|
configurator_generic_dialog "RetroDECK Configurator - BIOS File Check" "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
|
|
||||||
if [[ $bios_file_found == "Yes" && ($bios_hash_matched == "Yes" || $bios_hash_matched == "Unknown") && ! " ${bios_checked_list[*]} " =~ " ${bios_system} " ]]; then
|
|
||||||
bios_checked_list=("${bios_checked_list[@]}" "$bios_system" )
|
|
||||||
fi
|
|
||||||
done < $bios_checklist
|
|
||||||
systems_with_bios=${bios_checked_list[@]}
|
|
||||||
|
|
||||||
configurator_generic_dialog "The following systems have been found to have at least one valid BIOS file.\n\n$systems_with_bios\n\nFor more information on the BIOS files found please use the Advanced check tool."
|
|
||||||
|
|
||||||
configurator_tools_and_troubleshooting_dialog
|
|
||||||
}
|
|
||||||
|
|
||||||
configurator_check_bios_files_advanced() {
|
|
||||||
configurator_generic_dialog "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=()
|
bios_checked_list=()
|
||||||
|
|
||||||
while IFS="^" read -r bios_file bios_subdir bios_hash bios_system bios_desc
|
while IFS="^" read -r bios_file bios_subdir bios_hash bios_system bios_desc
|
||||||
|
@ -843,7 +816,7 @@ configurator_online_theme_downloader() {
|
||||||
--no-cancel \
|
--no-cancel \
|
||||||
--auto-close
|
--auto-close
|
||||||
|
|
||||||
configurator_generic_dialog "The theme downloads and updates have been completed.\n\nYou may need to exit RetroDECK and start it again for the new themes to be available."
|
configurator_generic_dialog "RetroDECK Configurator - Online Theme Downloader" "The theme downloads and updates have been completed.\n\nYou may need to exit RetroDECK and start it again for the new themes to be available."
|
||||||
configurator_tools_and_troubleshooting_dialog
|
configurator_tools_and_troubleshooting_dialog
|
||||||
else
|
else
|
||||||
configurator_tools_and_troubleshooting_dialog
|
configurator_tools_and_troubleshooting_dialog
|
||||||
|
@ -851,7 +824,7 @@ configurator_online_theme_downloader() {
|
||||||
}
|
}
|
||||||
|
|
||||||
configurator_rpcs3_firmware_updater() {
|
configurator_rpcs3_firmware_updater() {
|
||||||
configurator_generic_dialog "This tool will download firmware required by RPCS3 to emulate PS3 games.\n\nThe process will take several minutes, and the emulator will launch to finish the installation.\nPlease close RPCS3 manually once the installation is complete."
|
configurator_generic_dialog "RetroDECK Configurator - RPCS3 Firmware Update" "This tool will download firmware required by RPCS3 to emulate PS3 games.\n\nThe process will take several minutes, and the emulator will launch to finish the installation.\nPlease close RPCS3 manually once the installation is complete."
|
||||||
(
|
(
|
||||||
update_rpcs3_firmware
|
update_rpcs3_firmware
|
||||||
) |
|
) |
|
||||||
|
@ -869,8 +842,7 @@ configurator_tools_and_troubleshooting_dialog() {
|
||||||
--column="Choice" --column="Action" \
|
--column="Choice" --column="Action" \
|
||||||
"Move RetroDECK Folders" "Move RetroDECK folders between internal/SD card or to a custom location" \
|
"Move RetroDECK Folders" "Move RetroDECK folders between internal/SD card or to a custom location" \
|
||||||
"Multi-file game structure check" "Verify the proper structure of multi-file or multi-disc games" \
|
"Multi-file game structure check" "Verify the proper structure of multi-file or multi-disc games" \
|
||||||
"Basic BIOS file check" "Show a list of systems that BIOS files are found for" \
|
"BIOS file check" "Show information about common BIOS files" \
|
||||||
"Advanced BIOS file check" "Show advanced information about common BIOS files" \
|
|
||||||
"Compress Games" "Compress games to CHD format for systems that support it" \
|
"Compress Games" "Compress games to CHD format for systems that support it" \
|
||||||
"Download PS3 Firmware" "Download PS3 firmware for use with the RPCS3 emulator" \
|
"Download PS3 Firmware" "Download PS3 firmware for use with the RPCS3 emulator" \
|
||||||
"Install RetroDECK controller profile" "Install the custom RetroDECK controller profile and required icons" \
|
"Install RetroDECK controller profile" "Install the custom RetroDECK controller profile and required icons" \
|
||||||
|
@ -887,12 +859,8 @@ configurator_tools_and_troubleshooting_dialog() {
|
||||||
configurator_check_multifile_game_structure
|
configurator_check_multifile_game_structure
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Basic BIOS file check" )
|
"BIOS file check" )
|
||||||
configurator_check_bios_files_basic
|
configurator_check_bios_files
|
||||||
;;
|
|
||||||
|
|
||||||
"Advanced BIOS file check" )
|
|
||||||
configurator_check_bios_files_advanced
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Compress Games" )
|
"Compress Games" )
|
||||||
|
@ -903,17 +871,17 @@ configurator_tools_and_troubleshooting_dialog() {
|
||||||
if [[ $(check_network_connectivity) == "true" ]]; then
|
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
configurator_rpcs3_firmware_updater
|
configurator_rpcs3_firmware_updater
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "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_generic_dialog "RetroDECK Configurator - RPCS3 Firmware Update" "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_tools_and_troubleshooting_dialog
|
configurator_tools_and_troubleshooting_dialog
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Install RetroDECK controller profile" )
|
"Install RetroDECK controller profile" )
|
||||||
configurator_generic_dialog "Starting with version 0.7.0b, 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.\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"
|
configurator_generic_dialog "RetroDECK Configurator - Custom Controller Profile" "Starting with version 0.7.0b, 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.\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
|
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
|
install_retrodeck_controller_profile
|
||||||
fi
|
fi
|
||||||
configurator_generic_dialog "The RetroDECK controller profile install is complete.\nSee the Wiki for more details on how to use it to its fullest potential!"
|
configurator_generic_dialog "RetroDECK Configurator - Custom Controller Profile" "The RetroDECK controller profile install is complete.\nSee the Wiki for more details on how to use it to its fullest potential!"
|
||||||
configurator_tools_and_troubleshooting_dialog
|
configurator_tools_and_troubleshooting_dialog
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -924,7 +892,7 @@ configurator_tools_and_troubleshooting_dialog() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Backup RetroDECK Userdata" )
|
"Backup RetroDECK Userdata" )
|
||||||
configurator_generic_dialog "This tool will compress important RetroDECK userdata (basically everything except the ROMs folder) into a zip file.\n\nThis process can take several minutes, and the resulting zip file can be found in the ~/retrodeck/backups folder."
|
configurator_generic_dialog "RetroDECK Configurator - Userdata Backup" "This tool will compress important RetroDECK userdata (basically everything except the ROMs folder) into a zip file.\n\nThis process can take several minutes, and the resulting zip file can be found in the ~/retrodeck/backups folder."
|
||||||
(
|
(
|
||||||
backup_retrodeck_userdata
|
backup_retrodeck_userdata
|
||||||
) |
|
) |
|
||||||
|
@ -933,9 +901,9 @@ configurator_tools_and_troubleshooting_dialog() {
|
||||||
--title "RetroDECK Configurator Utility - Backup in Progress" \
|
--title "RetroDECK Configurator Utility - Backup in Progress" \
|
||||||
--text="Backing up RetroDECK userdata, please wait..."
|
--text="Backing up RetroDECK userdata, please wait..."
|
||||||
if [[ -f $backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip ]]; then
|
if [[ -f $backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip ]]; then
|
||||||
configurator_generic_dialog "The backup process is now complete."
|
configurator_generic_dialog "RetroDECK Configurator - Userdata Backup" "The backup process is now complete."
|
||||||
else
|
else
|
||||||
configurator_generic_dialog "The backup process could not be completed,\nplease check the logs folder for more information."
|
configurator_generic_dialog "RetroDECK Configurator - Userdata Backup" "The backup process could not be completed,\nplease check the logs folder for more information."
|
||||||
fi
|
fi
|
||||||
configurator_tools_and_troubleshooting_dialog
|
configurator_tools_and_troubleshooting_dialog
|
||||||
;;
|
;;
|
||||||
|
@ -1176,7 +1144,7 @@ configurator_welcome_dialog() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Developer Options" )
|
"Developer Options" )
|
||||||
configurator_generic_dialog "The following features and options are potentially VERY DANGEROUS for your RetroDECK install!\n\nThey should be considered the bleeding-edge of upcoming RetroDECK features, and never used when you have important saves/states/roms that are not backed up!\n\nYOU HAVE BEEN WARNED!"
|
configurator_generic_dialog "RetroDECK Configurator - Developer Options" "The following features and options are potentially VERY DANGEROUS for your RetroDECK install!\n\nThey should be considered the bleeding-edge of upcoming RetroDECK features, and never used when you have important saves/states/roms that are not backed up!\n\nYOU HAVE BEEN WARNED!"
|
||||||
configurator_developer_dialog
|
configurator_developer_dialog
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue