Merge pull request #319 from icenine451/cooker-0.7.0b-icenine451
Cooker 0.7.0b icenine451
|
@ -3,3 +3,4 @@
|
|||
hash^DOOMSHAPLACEHOLDER^https://buildbot.libretro.com/assets/cores/DOOM/Doom%20%28Shareware%29.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
|
||||
latestcommit^UNIVERSALDYNAMICINPUTCOMMITPLACEHOLDER^https://github.com/Venomalia/UniversalDynamicInput^main
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
<int name="ScreensaverTimer" value="300000" />
|
||||
<int name="SoundVolumeNavigation" value="70" />
|
||||
<int name="SoundVolumeVideos" value="80" />
|
||||
<string name="ApplicationUpdaterFrequency" value="always" />
|
||||
<string name="ApplicationUpdaterFrequency" value="never" />
|
||||
<string name="ApplicationUpdaterLastCheck" value="20230331T153206" />
|
||||
<string name="ApplicationVersion" value="2.0.0" />
|
||||
<string name="CollectionCustomGrouping" value="unthemed" />
|
||||
|
|
295
functions.sh
|
@ -88,31 +88,23 @@ move() {
|
|||
# Function to move a directory from one parent to another
|
||||
# USAGE: move $source_dir $dest_dir
|
||||
|
||||
if [[ ! -d "$2/$(basename "$1")" ]]; then
|
||||
if [[ $(verify_space "$1" "$2") ]]; then
|
||||
source_dir="$(echo $1 | sed 's![^/]$!&/!')" # Add trailing slash if it is missing
|
||||
dest_dir="$(echo $2 | sed 's![^/]$!&/!')" # Add trailing slash if it is missing
|
||||
|
||||
(
|
||||
if [[ ! -d "$2" ]]; then # Create destination directory if it doesn't already exist
|
||||
mkdir -pv "$2"
|
||||
fi
|
||||
mv -v -t "$2" "$1"
|
||||
rsync -a --remove-source-files --ignore-existing --mkpath "$source_dir" "$dest_dir" # Copy files but don't overwrite conflicts
|
||||
find "$source_dir" -type d -empty -delete # Cleanup empty folders that were left behind
|
||||
) |
|
||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Configurator Utility - Move in Progress" \
|
||||
--text="Moving directory $(basename "$1") to new location of $2, please wait."
|
||||
else
|
||||
zenity --icon-name=net.retrodeck.retrodeck --error --no-wrap \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Configurator Utility - Move Directories" \
|
||||
--text="The destination directory you have selected does not have enough free space for the files you are trying to move.\n\nPlease select a new destination or free up some space."
|
||||
|
||||
configurator_move_dialog
|
||||
fi
|
||||
else
|
||||
if [[ -d "$source_dir" ]]; then # Some conflicting files remain
|
||||
zenity --icon-name=net.retrodeck.retrodeck --error --no-wrap \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Configurator Utility - Move Directories" \
|
||||
--text="The destination directory you have selected already exists.\n\nPlease select a new destination."
|
||||
--text="There were some conflicting files that were not moved.\n\nAll files that could be moved are in the new location,\nany files that already existed at the new location have not been moved and will need to be handled manually."
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -1060,11 +1052,11 @@ conf_write() {
|
|||
do
|
||||
if [[ (! -z "$current_setting_line") && (! "$current_setting_line" == "#"*) && (! "$current_setting_line" == "[]") ]]; then # If the line has a valid entry in it
|
||||
if [[ ! -z $(grep -o -P "^\[.+?\]$" <<< "$current_setting_line") ]]; then # If the line is a section header
|
||||
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
|
||||
current_setting_name=$(get_setting_name "$current_setting_line" "retrodeck") # Read the variable name from the current line
|
||||
current_setting_value=$(get_setting_value "$rd_conf" "$current_setting_name" "retrodeck" "$current_section") # Read the variables value from retrodeck.cfg
|
||||
memory_setting_value=$(eval "echo \$${current_setting_name}") # Read the variable names' value from memory
|
||||
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 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...
|
||||
set_setting_value "$rd_conf" "$current_setting_name" "$memory_setting_value" "retrodeck" "$current_section" # Update the value in retrodeck.cfg
|
||||
fi
|
||||
|
@ -1081,7 +1073,7 @@ conf_read() {
|
|||
do
|
||||
if [[ (! -z "$current_setting_line") && (! "$current_setting_line" == "#"*) && (! "$current_setting_line" == "[]") ]]; then # If the line has a valid entry in it
|
||||
if [[ ! -z $(grep -o -P "^\[.+?\]$" <<< "$current_setting_line") ]]; then # If the line is a section header
|
||||
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
|
||||
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
|
||||
|
@ -1146,19 +1138,6 @@ dir_prep() {
|
|||
echo -e "$symlink is now $real\n"
|
||||
}
|
||||
|
||||
consolidate_retrodeck_folders() {
|
||||
# This script will find folders that may have been moved out of the main RetroDECK folder individually and move them home
|
||||
# USAGE: consolidate_retrodeck_folders
|
||||
|
||||
while read -r path; do
|
||||
if realpath "$path" | grep -q "^$main_path/"; then
|
||||
echo "$path is a subfolder of $main_path"
|
||||
else
|
||||
echo "$path is not a subfolder of $main_path"
|
||||
fi
|
||||
done < <(grep -v '^\s*$' $rd_conf | awk '/^\[paths\]/{f=1;next} /^\[/{f=0} f')
|
||||
}
|
||||
|
||||
update_splashscreens() {
|
||||
# This script will purge any existing ES graphics and reload them from RO space into somewhere ES will look for it
|
||||
# USAGE: update_splashscreens
|
||||
|
@ -1195,19 +1174,52 @@ prepare_emulator() {
|
|||
emulator="$2"
|
||||
call_source="$3"
|
||||
|
||||
if [[ "$emulator" == "retrodeck" ]]; then # For use after RetroDECK is consolidated and moved
|
||||
if [[ "$emulator" == "retrodeck" ]]; then
|
||||
if [[ "$action" == "reset" ]]; then # Update the paths of all folders in retrodeck.cfg and create them
|
||||
while read -r config_line; do
|
||||
local current_setting_name=$(get_setting_name "$config_line" "retrodeck")
|
||||
if [[ ! $current_setting_name =~ (rdhome|sdcard) ]]; then # Ignore these locations
|
||||
eval "$current_setting_name=$rdhome/$(basename $current_setting_value)"
|
||||
mkdir "$rdhome/$(basename $current_setting_value)"
|
||||
fi
|
||||
done < <(grep -v '^\s*$' $rd_conf | awk '/^\[paths\]/{f=1;next} /^\[/{f=0} f')
|
||||
fi
|
||||
if [[ "$action" == "postmove" ]]; then # Update the paths of any folders that came with the retrodeck folder during a move
|
||||
while read -r config_line; do
|
||||
local current_setting_name=$(get_setting_name "$config_line" "retrodeck")
|
||||
if [[ ! $current_setting_name =~ (rdhome|sdcard) ]]; then # Ignore these locations
|
||||
local current_setting_value=$(get_setting_value "$rd_conf" "$current_setting_name" "retrodeck" "paths")
|
||||
if [[ -d "$rdhome/$(basename $current_setting_value)" ]]; then # If the folder exists at the new ~/retrodeck location
|
||||
eval "$current_setting_name=$rdhome/$(basename $current_setting_value)"
|
||||
fi
|
||||
fi
|
||||
done < <(grep -v '^\s*$' $rd_conf | awk '/^\[paths\]/{f=1;next} /^\[/{f=0} f')
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$emulator" =~ ^(emulationstation|all)$ ]]; then # For use after ESDE-related folders are moved or a reset
|
||||
if [[ "$action" == "reset" ]]; then
|
||||
rm -rf /var/config/emulationstation/
|
||||
mkdir -p /var/config/emulationstation/
|
||||
emulationstation --home /var/config/emulationstation --create-system-dirs
|
||||
update_splashscreens
|
||||
dir_prep "$roms_folder" "/var/config/emulationstation/ROMs"
|
||||
dir_prep "$media_folder" "/var/config/emulationstation/.emulationstation/downloaded_media"
|
||||
dir_prep "$themes_folder" "/var/config/emulationstation/.emulationstation/themes"
|
||||
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists"
|
||||
cp -f /app/retrodeck/es_settings.xml /var/config/emulationstation/.emulationstation/es_settings.xml
|
||||
|
||||
# RetroDECK prepack metadata
|
||||
mkdir -p "/var/config/emulationstation/.emulationstation/gamelists/doom"
|
||||
cp "/app/retrodeck/rd_prepacks/doom/gamelist.xml" "/var/config/emulationstation/.emulationstation/gamelists/doom/gamelist.xml"
|
||||
mkdir -p "$media_folder/doom"
|
||||
unzip -oq "/app/retrodeck/rd_prepacks/doom/doom.zip" -d "$media_folder/doom/"
|
||||
fi
|
||||
if [[ "$action" == "postmove" ]]; then
|
||||
roms_folder=$rdhome/roms
|
||||
saves_folder=$rdhome/saves
|
||||
states_folder=$rdhome/states
|
||||
bios_folder=$rdhome/bios
|
||||
media_folder=$rdhome/downloaded_media
|
||||
themes_folder=$rdhome/themes
|
||||
logs_folder=$rdhome/.logs
|
||||
screenshots_folder=$rdhome/screenshots
|
||||
mods_folder=$rdhome/mods
|
||||
texture_packs_folder=$rdhome/texture_packs
|
||||
borders_folder=$rdhome/borders
|
||||
dir_prep "$roms_folder" "/var/config/emulationstation/ROMs"
|
||||
dir_prep "$media_folder" "/var/config/emulationstation/.emulationstation/downloaded_media"
|
||||
dir_prep "$themes_folder" "/var/config/emulationstation/.emulationstation/themes"
|
||||
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1504,6 +1516,14 @@ prepare_emulator() {
|
|||
fi
|
||||
fi
|
||||
|
||||
if [[ "$emulator" =~ ^(pico8|pico-8|all)$ ]]; then
|
||||
if [[ ("$action" == "reset") || ("$action" == "postmove") ]]; then
|
||||
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 "$roms_folder/pico8" "$bios_folder/pico-8/carts" # Symlink default game location to RD roms for cleanliness (this location is overridden anyway by the --root_path launch argument anyway)
|
||||
dir_prep "$saves_folder/pico-8" "$bios_folder/pico-8/cdata" # PICO-8 saves folder
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$emulator" =~ ^(ppsspp|PPSSPP|all)$ ]]; then
|
||||
if [[ "$action" == "reset" ]]; then # Run reset-only commands
|
||||
echo "------------------------"
|
||||
|
@ -1782,8 +1802,7 @@ tools_init() {
|
|||
}
|
||||
|
||||
start_retrodeck() {
|
||||
echo "Checking to see if today has a surprise..."
|
||||
easter_eggs
|
||||
easter_eggs # Check if today has a surprise splashscreen and load it if so
|
||||
# normal startup
|
||||
echo "Starting RetroDECK v$version"
|
||||
emulationstation --home /var/config/emulationstation
|
||||
|
@ -1831,10 +1850,10 @@ finit() {
|
|||
echo "Executing finit"
|
||||
|
||||
# Internal or SD Card?
|
||||
choice=$(configurator_destination_choice_dialog "RetroDECK data" "Welcome to the first configuration of RetroDECK.\nThe setup will be quick but please READ CAREFULLY each message in order to avoid misconfigurations.\n\nWhere do you want your RetroDECK data folder to be located?\n\nThis folder will contain all ROMs, BIOSs and scraped data." )
|
||||
echo "Choice is $choice"
|
||||
local finit_dest_choice=$(configurator_destination_choice_dialog "RetroDECK data" "Welcome to the first configuration of RetroDECK.\nThe setup will be quick but please READ CAREFULLY each message in order to avoid misconfigurations.\n\nWhere do you want your RetroDECK data folder to be located?\n\nThis folder will contain all ROMs, BIOSs and scraped data." )
|
||||
echo "Choice is $finit_dest_choice"
|
||||
|
||||
case $choice in
|
||||
case $finit_dest_choice in
|
||||
|
||||
"" ) # Cancel or X button quits
|
||||
echo "Now quitting"
|
||||
|
@ -1844,12 +1863,6 @@ finit() {
|
|||
"Internal Storage" ) # Internal
|
||||
echo "Internal selected"
|
||||
rdhome="$HOME/retrodeck"
|
||||
roms_folder="$rdhome/roms"
|
||||
saves_folder="$rdhome/saves"
|
||||
states_folder="$rdhome/states"
|
||||
bios_folder="$rdhome/bios"
|
||||
media_folder="$rdhome/downloaded_media"
|
||||
themes_folder="$rdhome/themes"
|
||||
if [[ -L $rdhome ]]; then #Remove old symlink from existing install, if it exists
|
||||
unlink $rdhome
|
||||
fi
|
||||
|
@ -1869,12 +1882,6 @@ finit() {
|
|||
if [[ -z $rdhome ]]; then # If user hit the cancel button
|
||||
exit 2
|
||||
fi
|
||||
roms_folder="$rdhome/roms"
|
||||
saves_folder="$rdhome/saves"
|
||||
states_folder="$rdhome/states"
|
||||
bios_folder="$rdhome/bios"
|
||||
media_folder="$rdhome/downloaded_media"
|
||||
themes_folder="$rdhome/themes"
|
||||
elif [ ! -w "$sdcard" ] #SD card found but not writable
|
||||
then
|
||||
echo "Error: SD card found but not writable"
|
||||
|
@ -1887,12 +1894,6 @@ finit() {
|
|||
exit 2
|
||||
else
|
||||
rdhome="$sdcard/retrodeck"
|
||||
roms_folder="$rdhome/roms"
|
||||
saves_folder="$rdhome/saves"
|
||||
states_folder="$rdhome/states"
|
||||
bios_folder="$rdhome/bios"
|
||||
media_folder="$rdhome/downloaded_media"
|
||||
themes_folder="$rdhome/themes"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
@ -1907,76 +1908,49 @@ finit() {
|
|||
if [[ -z $rdhome ]]; then # If user hit the cancel button
|
||||
exit 2
|
||||
fi
|
||||
roms_folder="$rdhome/roms"
|
||||
saves_folder="$rdhome/saves"
|
||||
states_folder="$rdhome/states"
|
||||
bios_folder="$rdhome/bios"
|
||||
media_folder="$rdhome/downloaded_media"
|
||||
themes_folder="$rdhome/themes"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
if [[ ! "$rdhome" == "$HOME/retrodeck" && ! -L $HOME/retrodeck ]]; then # If data stored on SD card, create /home/deck/retrodeck symlink to keep things working until configs can get modified
|
||||
echo "Symlinking retrodeck directory to home directory"
|
||||
dir_prep "$rdhome" "$HOME/retrodeck"
|
||||
prepare_emulator "reset" "retrodeck" # Parse the [paths] section of retrodeck.cfg and set the value of / create all needed folders
|
||||
|
||||
conf_write # Write the new values to retrodeck.cfg
|
||||
|
||||
local finit_options_choices=$(zenity \
|
||||
--list --width=1200 --height=720 \
|
||||
--checklist --hide-column=4 --ok-label="Confirm Selections" --extra-button="Enable All" \
|
||||
--separator=" " --print-column=4 \
|
||||
--text="Choose which options to enable:" \
|
||||
--column "Enabled?" \
|
||||
--column "Option" \
|
||||
--column "Description" \
|
||||
--column "option_flag" \
|
||||
"${finit_options_list[@]}")
|
||||
|
||||
if [[ "$finit_options_choices" =~ (rpcs3_firmware|Enable All) ]]; then # Additional information on the firmware install process, as the emulator needs to be manually closed
|
||||
configurator_generic_dialog "RPCS3 Firmware Install" "You have chosen to install the RPCS3 firmware during the RetroDECK first setup.\n\nThis process will take several minutes and requires network access.\n\nRPCS3 will be launched automatically at the end of the RetroDECK setup process.\nOnce the firmware is installed, please close the emulator to finish the process.")
|
||||
fi
|
||||
|
||||
mkdir -pv $roms_folder
|
||||
|
||||
local rpcs_firmware_install=$(configurator_generic_question_dialog "RPCS3 Firmware Install" "Would you like to install the latest PS3 firmware for the RPCS3 emulator?\n\nThis process will take several minutes and requires network access.\nIf you do not plan to emulate PS3 games this can be skipped, and can always be done later through the Configurator.\n\nIf you click Yes, RPCS3 will be launched at the end of the RetroDECK setup process.\nOnce the firmware is installed, please close the emulator to finish the process.")
|
||||
|
||||
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" \
|
||||
--text="RetroDECK will now install the needed files, which can take up to one minute.\nRetroDECK will start once the process is completed.\n\nPress OK to continue."
|
||||
|
||||
(
|
||||
# Recreating the folder
|
||||
rm -rf /var/config/emulationstation/
|
||||
mkdir -p /var/config/emulationstation/
|
||||
prepare_emulator "reset" "all"
|
||||
tools_init
|
||||
|
||||
# Initializing ES-DE
|
||||
# TODO: after the next update of ES-DE this will not be needed - let's test it
|
||||
emulationstation --home /var/config/emulationstation --create-system-dirs
|
||||
update_splashscreens
|
||||
|
||||
# Initializing ROMs folder - Original in retrodeck home (or SD Card)
|
||||
dir_prep $roms_folder "/var/config/emulationstation/ROMs"
|
||||
|
||||
mkdir -pv $saves_folder
|
||||
mkdir -pv $states_folder
|
||||
mkdir -pv $screenshots_folder
|
||||
mkdir -pv $logs_folder
|
||||
mkdir -pv $mods_folder
|
||||
mkdir -pv $texture_packs_folder
|
||||
|
||||
# XMLSTARLET HERE
|
||||
cp -fv /app/retrodeck/es_settings.xml /var/config/emulationstation/.emulationstation/es_settings.xml
|
||||
|
||||
# ES-DE preparing user-exposed folders
|
||||
dir_prep "$media_folder" "/var/config/emulationstation/.emulationstation/downloaded_media"
|
||||
dir_prep "$themes_folder" "/var/config/emulationstation/.emulationstation/themes"
|
||||
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists"
|
||||
|
||||
# PICO-8
|
||||
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 "$roms_folder/pico8" "$bios_folder/pico-8/carts" # Symlink default game location to RD roms for cleanliness (this location is overridden anyway by the --root_path launch argument anyway)
|
||||
dir_prep "$saves_folder/pico-8" "$bios_folder/pico-8/cdata" # PICO-8 saves folder
|
||||
# Optional actions based on user choices
|
||||
if [[ "$finit_options_choices" =~ (rpcs3_firmware|Enable All) ]]; then
|
||||
update_rpcs3_firmware
|
||||
fi
|
||||
if [[ "$finit_options_choices" =~ (rd_controller_profile|Enable All) ]]; then
|
||||
rsync -a "/app/retrodeck/binding-icons/" "$HOME/.steam/steam/tenfoot/resource/images/library/controller/binding_icons/"
|
||||
# TODO move controller profile file to where it needs to go
|
||||
fi
|
||||
|
||||
# Add packaged extras, after the ROMS folder has been initialized
|
||||
cp /app/retrodeck/extras/doom1.wad "$roms_folder/doom/doom1.wad" # No -f in case the user already has it
|
||||
|
||||
# RetroDECK prepack metadata
|
||||
mkdir -p "/var/config/emulationstation/.emulationstation/gamelists/doom"
|
||||
cp "/app/retrodeck/rd_prepacks/doom/gamelist.xml" "/var/config/emulationstation/.emulationstation/gamelists/doom/gamelist.xml"
|
||||
mkdir -p "$media_folder/doom"
|
||||
unzip -oq "/app/retrodeck/rd_prepacks/doom/doom.zip" -d "$media_folder/doom/"
|
||||
|
||||
tools_init
|
||||
prepare_emulator "reset" "all"
|
||||
if [[ $rpcs_firmware_install == "true" ]]; then
|
||||
update_rpcs3_firmware
|
||||
fi
|
||||
) |
|
||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
|
@ -2237,3 +2211,80 @@ configurator_reset_confirmation_dialog() {
|
|||
echo "false"
|
||||
fi
|
||||
}
|
||||
|
||||
configurator_move_folder_dialog() {
|
||||
# This dialog will take a folder variable name from retrodeck.cfg and move it to a new location. The variable will be updated in retrodeck.cfg as well as any emulator configs where it occurs.
|
||||
# USAGE: configurator_move_folder_dialog "folder_variable_name"
|
||||
local rd_dir_name="$1" # The folder variable name from retrodeck.cfg
|
||||
local dir_to_move="$(get_setting_value "$rd_conf" "$rd_dir_name" "retrodeck" "paths")/" # The path of that folder variable
|
||||
local source_root="$(echo $dir_to_move | sed -e 's/\(.*\)\/retrodeck\/.*/\1/')" # The root path of the folder, excluding retrodeck/<folder name>. So /home/deck/retrodeck/roms becomes /home/deck
|
||||
if [[ ! "$rd_dir_name" == "rdhome" ]]; then # If a sub-folder is being moved, find it's path without the source_root. So /home/deck/retrodeck/roms becomes retrodeck/roms
|
||||
local rd_dir_path="$(echo "$dir_to_move" | sed "s/.*\(retrodeck\/.*\)/\1/; s/\/$//")"
|
||||
else # Otherwise just set the retrodeck root folder
|
||||
local rd_dir_path="$(basename $dir_to_move)"
|
||||
fi
|
||||
|
||||
if [[ -d "$dir_to_move" ]]; then # If the directory selected to move already exists at the expected location pulled from retrodeck.cfg
|
||||
choice=$(configurator_destination_choice_dialog "RetroDECK Data" "Please choose a destination for the $(basename $dir_to_move) folder.")
|
||||
case $choice in
|
||||
|
||||
"Internal Storage" | "SD Card" | "Custom Location" ) # If the user picks a location
|
||||
if [[ "$choice" == "Internal Storage" ]]; then # If the user wants to move the folder to internal storage, set the destination target as HOME
|
||||
local dest_root="$HOME"
|
||||
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"
|
||||
else
|
||||
configurator_generic_dialog "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
|
||||
fi
|
||||
|
||||
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)
|
||||
configurator_generic_dialog "The $(basename $dir_to_move) folder is already at that location, please pick a new one."
|
||||
configurator_move_folder_dialog "$rd_dir_name"
|
||||
else
|
||||
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"
|
||||
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"
|
||||
if [[ -d "$dest_root/$rd_dir_path" ]]; then # If the move succeeded
|
||||
eval "$rd_dir_name"="$dest_root/$rd_dir_path" # Set the new path for that folder variable in retrodeck.cfg
|
||||
if [[ "$rd_dir_name" == "rdhome" ]]; then # If the whole retrodeck folder was moved...
|
||||
prepare_emulator "postmove" "retrodeck"
|
||||
fi
|
||||
prepare_emulator "postmove" "all" # Update all the appropriate emulator path settings
|
||||
conf_write # Write the settings to retrodeck.cfg
|
||||
if [[ -z $(ls -1 "$source_root/retrodeck") ]]; then # Cleanup empty old_path/retrodeck folder if it was left behind
|
||||
rmdir "$source_root/retrodeck"
|
||||
fi
|
||||
configurator_process_complete_dialog "moving the RetroDECK data directory to internal storage"
|
||||
else
|
||||
configurator_generic_dialog "The moving process was not completed, please try again."
|
||||
fi
|
||||
else # If there isn't enough space in the picked destination
|
||||
zenity --icon-name=net.retrodeck.retrodeck --error --no-wrap \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Configurator Utility - Move Directories" \
|
||||
--text="The destination directory you have selected does not have enough free space for the files you are trying to move.\n\nPlease select a new destination or free up some space."
|
||||
fi
|
||||
fi
|
||||
else # If the user didn't pick any custom destination, or the destination picked is unwritable
|
||||
if [[ ! -z "$dest_root" ]]; then
|
||||
configurator_generic_dialog "No destination was chosen, so no files have been moved."
|
||||
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."
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
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."
|
||||
dir_to_move=$(directory_browse "RetroDECK $(basename $dir_to_move) directory location")
|
||||
eval "$rd_dir_name"="$dir_to_move"
|
||||
prepare_emulator "postmove" "all"
|
||||
conf_write
|
||||
configurator_generic_dialog "RetroDECK $(basename $dir_to_move) folder now configured at\n$dir_to_move."
|
||||
configurator_move_folder_dialog "$rd_dir_name"
|
||||
fi
|
||||
}
|
||||
|
|
12
global.sh
|
@ -32,6 +32,12 @@ helper_files_folder="$emuconfigs/defaults/retrodeck/helper_files"
|
|||
helper_files_list="$emuconfigs/defaults/retrodeck/reference_lists/helper_files_list.cfg" # The list of files to be deployed and where they go
|
||||
rpcs3_firmware="http://dus01.ps3.update.playstation.net/update/ps3/image/us/2023_0228_05fe32f5dc8c78acbcd84d36ee7fdc5b/PS3UPDAT.PUP"
|
||||
|
||||
# Options list for users to pick from during finit
|
||||
# Syntax is "enabled_by_default" "Option name" "Option description" "option_flag_to_be_checked_for"
|
||||
|
||||
finit_options_list=("false" "RPCS3 Firmware Install" "Install firmware needed for PS3 emulation during first install" "rpcs3_firmware" \
|
||||
"false" "RetroDECK Controller Profile" "Install custom RetroDECK controller profile (stored in shared Steam directory)" "rd_controller_profile")
|
||||
|
||||
# Config files for emulators with single config files
|
||||
|
||||
cemuconf="/var/config/Cemu/settings.xml"
|
||||
|
@ -112,7 +118,7 @@ then
|
|||
default_sd=$(directory_browse "SD Card Location")
|
||||
fi
|
||||
|
||||
cp $rd_defaults $rd_conf # Load default settings
|
||||
cp $rd_defaults $rd_conf # Load default settings file
|
||||
set_setting_value $rd_conf "version" "$version" retrodeck # Set current version for new installs
|
||||
set_setting_value $rd_conf "sdcard" "$default_sd" retrodeck "paths" # Set SD card location if default path has changed
|
||||
|
||||
|
@ -147,8 +153,10 @@ else
|
|||
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."
|
||||
new_home_path=$(directory_browse "RetroDECK folder location")
|
||||
sed -i 's#'$prev_home_path'#'$new_home_path'#g' $rd_conf
|
||||
set_setting_value $rd_conf "rdhome" "$new_home_path" retrodeck "paths"
|
||||
conf_read
|
||||
prepare_emulator "retrodeck" "postmove"
|
||||
prepare_emulator "all" "postmove"
|
||||
conf_write
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -167,6 +167,15 @@ modules:
|
|||
url: https://github.com/rclone/rclone/releases/download/v1.61.1/rclone-v1.61.1-linux-amd64.zip
|
||||
sha256: 6d6455e1cb69eb0615a52cc046a296395e44d50c0f32627ba8590c677ddf50a9
|
||||
|
||||
- name: rsync
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- cp local/bin/rsync ${FLATPAK_DEST}/bin/
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://download.samba.org/pub/rsync/binaries/ubuntu-22.04-x86_64/rsync-3.2.7.tar.gz
|
||||
sha256: dd2b74396c6e8d6a2d7af94cd97fad5788d888e722bc9780de1590f37a1920d6
|
||||
|
||||
- name: jq
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
|
@ -647,6 +656,16 @@ modules:
|
|||
dolphin-emu "$@"
|
||||
dest-filename: dolphin-emu-wrapper
|
||||
|
||||
- name: universal_dynamic_input
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- mkdir -p ${FLATPAK_DEST}/retrodeck/extras/DynamicInputTextures
|
||||
- cp -r * ${FLATPAK_DEST}/retrodeck/extras/DynamicInputTextures/
|
||||
sources:
|
||||
- type: git
|
||||
url: https://github.com/Venomalia/UniversalDynamicInput.git
|
||||
commit: UNIVERSALDYNAMICINPUTCOMMITPLACEHOLDER
|
||||
|
||||
# Dolphin - END
|
||||
|
||||
# XEMU - START
|
||||
|
@ -1055,6 +1074,7 @@ modules:
|
|||
- cp -f res/splash.svg ${FLATPAK_DEST}/retrodeck/graphics/splash-orig.svg
|
||||
- cp -rf res/extra-splashes/ ${FLATPAK_DEST}/retrodeck/graphics
|
||||
- cp -f res/icon.svg /app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg
|
||||
- mv -f -t ${FLATPAK_DEST}/retrodeck res/binding-icons
|
||||
|
||||
# RetroDECK core script
|
||||
- cp retrodeck.sh /app/bin/retrodeck.sh
|
||||
|
|
|
@ -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 "$saves_folder/pico-8" "$bios_folder/pico-8/cdata" # PICO-8 saves folder structure was backwards, fixing for consistency.
|
||||
|
||||
cp -fv $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
|
||||
cp -fvr $emuconfigs/yuzu/* /var/config/yuzu/
|
||||
cp -fr $emuconfigs/yuzu/* /var/config/yuzu/
|
||||
sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/yuzu/qt-config.ini
|
||||
|
||||
# Remove unneeded tools folder, as location has changed to RO space
|
||||
|
@ -74,6 +74,8 @@ post_update() {
|
|||
# - Add new sections [paths] and [options] headers to retrodeck.cfg
|
||||
# - Prepackaged DOOM!
|
||||
# - Update RPCS3 vfs file contents. migrate from old location if needed
|
||||
# - Disable ESDE update checks for existing installs
|
||||
# - Notify user of default PSX core change
|
||||
|
||||
mkdir -p "$mods_folder"
|
||||
mkdir -p "$texture_packs_folder"
|
||||
|
@ -87,7 +89,7 @@ post_update() {
|
|||
|
||||
dir_prep "$rdhome/gamelists" "/var/config/emulationstation/.emulationstation/gamelists"
|
||||
|
||||
cp /app/retrodeck/extras/doom1.wad "$roms_folder/doom/doom1.wad" # No -f in case the user already has it
|
||||
cp "/app/retrodeck/extras/doom1.wad" "$roms_folder/doom/doom1.wad" # No -f in case the user already has it
|
||||
mkdir -p "/var/config/emulationstation/.emulationstation/gamelists/doom"
|
||||
cp -f "/app/retrodeck/rd_prepacks/doom/gamelist.xml" "/var/config/emulationstation/.emulationstation/gamelists/doom/gamelist.xml"
|
||||
mkdir -p "$media_folder/doom"
|
||||
|
@ -110,10 +112,18 @@ post_update() {
|
|||
mkdir -p "$bios_folder/rpcs3/dev_bdvd"
|
||||
mkdir -p "$bios_folder/rpcs3/dev_usb000"
|
||||
dir_prep "$bios_folder/rpcs3/dev_hdd0/home/00000001/savedata" "$saves_folder/ps3/rpcs3"
|
||||
|
||||
set_setting_value $es_settings "ApplicationUpdaterFrequency" "never" "es_settings"
|
||||
|
||||
configurator_generic_dialog "As part of this update, the default PSX emulator has changed!\n\nIf you are currently playing PSX games and have not changed the default emulator on your own, you will need to switch back to the previous default emulator (Swanstation) for your existing saves to work.\nIf you have changed the default emulator yourself, please change it again to your previous choice.\n\nSee the wiki or Discord if you have more questions on this change!"
|
||||
fi
|
||||
|
||||
# The following commands are run every time.
|
||||
|
||||
if [[ -d "/var/data/dolphin-emu/Load/DynamicInputTextures" ]]; then # Refresh installed textures if they have been enabled
|
||||
rsync -a "/app/retrodeck/extras/DynamicInputTextures/" "/var/data/dolphin-emu/Load/DynamicInputTextures/"
|
||||
fi
|
||||
|
||||
tools_init
|
||||
update_splashscreens
|
||||
update_rd_conf
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 717b78093797270877ec416e58082f1c71d435d8
|
||||
Subproject commit 0b1cfb79e591e10488a3262d6b38db843c39a409
|
BIN
res/binding-icons/RD-applets-screenshooter.png
Normal file
After Width: | Height: | Size: 457 B |
BIN
res/binding-icons/RD-application-x-iso.png
Normal file
After Width: | Height: | Size: 477 B |
BIN
res/binding-icons/RD-battery-full-charging.png
Normal file
After Width: | Height: | Size: 477 B |
BIN
res/binding-icons/RD-battery-missing.png
Normal file
After Width: | Height: | Size: 460 B |
BIN
res/binding-icons/RD-camera-photo.png
Normal file
After Width: | Height: | Size: 512 B |
BIN
res/binding-icons/RD-distributor-logo-netbsd.png
Normal file
After Width: | Height: | Size: 413 B |
BIN
res/binding-icons/RD-document-save.png
Normal file
After Width: | Height: | Size: 422 B |
BIN
res/binding-icons/RD-edit-find.png
Normal file
After Width: | Height: | Size: 364 B |
BIN
res/binding-icons/RD-edit-undo.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
res/binding-icons/RD-emblem-documents.png
Normal file
After Width: | Height: | Size: 254 B |
BIN
res/binding-icons/RD-emblem-downloads.png
Normal file
After Width: | Height: | Size: 274 B |
BIN
res/binding-icons/RD-emblem-encrypted-locked.png
Normal file
After Width: | Height: | Size: 271 B |
BIN
res/binding-icons/RD-emblem-favorite.png
Normal file
After Width: | Height: | Size: 285 B |
BIN
res/binding-icons/RD-emblem-generic.png
Normal file
After Width: | Height: | Size: 309 B |
BIN
res/binding-icons/RD-emblem-new.png
Normal file
After Width: | Height: | Size: 258 B |
BIN
res/binding-icons/RD-emblem-synchronizing.png
Normal file
After Width: | Height: | Size: 308 B |
BIN
res/binding-icons/RD-emblem-unlocked.png
Normal file
After Width: | Height: | Size: 278 B |
BIN
res/binding-icons/RD-emblem-unreadable.png
Normal file
After Width: | Height: | Size: 293 B |
BIN
res/binding-icons/RD-folder-applications.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
res/binding-icons/RD-folder-blue-backup.png
Normal file
After Width: | Height: | Size: 422 B |
BIN
res/binding-icons/RD-folder-blue-games.png
Normal file
After Width: | Height: | Size: 427 B |
BIN
res/binding-icons/RD-go-next.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
res/binding-icons/RD-go-previous.png
Normal file
After Width: | Height: | Size: 372 B |
BIN
res/binding-icons/RD-godot.png
Normal file
After Width: | Height: | Size: 524 B |
BIN
res/binding-icons/RD-icon_circle_2_180x180.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
res/binding-icons/RD-io.github.antimicrox.antimicrox.png
Normal file
After Width: | Height: | Size: 439 B |
BIN
res/binding-icons/RD-list-add.png
Normal file
After Width: | Height: | Size: 324 B |
BIN
res/binding-icons/RD-list-remove.png
Normal file
After Width: | Height: | Size: 204 B |
BIN
res/binding-icons/RD-media-playback-pause.png
Normal file
After Width: | Height: | Size: 260 B |
BIN
res/binding-icons/RD-media-playback-start.png
Normal file
After Width: | Height: | Size: 320 B |
BIN
res/binding-icons/RD-notification-network-ethernet-connected.png
Normal file
After Width: | Height: | Size: 363 B |
BIN
res/binding-icons/RD-notification-network-wireless.png
Normal file
After Width: | Height: | Size: 415 B |
BIN
res/binding-icons/RD-octopi.png
Normal file
After Width: | Height: | Size: 459 B |
BIN
res/binding-icons/RD-org.xfce.session.png
Normal file
After Width: | Height: | Size: 519 B |
BIN
res/binding-icons/RD-pcsxr-icon.png
Normal file
After Width: | Height: | Size: 387 B |
BIN
res/binding-icons/RD-playonlinux.png
Normal file
After Width: | Height: | Size: 519 B |
BIN
res/binding-icons/RD-preferences-desktop-accessibility.png
Normal file
After Width: | Height: | Size: 570 B |
BIN
res/binding-icons/RD-preferences-desktop-display.png
Normal file
After Width: | Height: | Size: 344 B |
BIN
res/binding-icons/RD-preferences-desktop-emoticons.png
Normal file
After Width: | Height: | Size: 445 B |
BIN
res/binding-icons/RD-preferences-desktop-icons.png
Normal file
After Width: | Height: | Size: 614 B |
BIN
res/binding-icons/RD-preferences-desktop-keyboard.png
Normal file
After Width: | Height: | Size: 303 B |
BIN
res/binding-icons/RD-preferences-system-search.png
Normal file
After Width: | Height: | Size: 475 B |
BIN
res/binding-icons/RD-preferences-system-windows-actions.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
res/binding-icons/RD-preferences-tweaks-shadows.png
Normal file
After Width: | Height: | Size: 485 B |
BIN
res/binding-icons/RD-process-stop.png
Normal file
After Width: | Height: | Size: 402 B |
BIN
res/binding-icons/RD-pvz.png
Normal file
After Width: | Height: | Size: 568 B |
BIN
res/binding-icons/RD-retroarch.png
Normal file
After Width: | Height: | Size: 468 B |
BIN
res/binding-icons/RD-security-low.png
Normal file
After Width: | Height: | Size: 909 B |
BIN
res/binding-icons/RD-steam.png
Normal file
After Width: | Height: | Size: 515 B |
BIN
res/binding-icons/RD-supertuxkart.png
Normal file
After Width: | Height: | Size: 613 B |
BIN
res/binding-icons/RD-system-reboot.png
Normal file
After Width: | Height: | Size: 504 B |
BIN
res/binding-icons/RD-system-switch-user.png
Normal file
After Width: | Height: | Size: 459 B |
BIN
res/binding-icons/RD-tesseract.png
Normal file
After Width: | Height: | Size: 711 B |
BIN
res/binding-icons/RD-text-x-generic.png
Normal file
After Width: | Height: | Size: 414 B |
BIN
res/binding-icons/RD-tools-check-spelling.png
Normal file
After Width: | Height: | Size: 308 B |
BIN
res/binding-icons/RD-urbanterror.png
Normal file
After Width: | Height: | Size: 462 B |
BIN
res/binding-icons/RD-user-red-home.png
Normal file
After Width: | Height: | Size: 405 B |
BIN
res/binding-icons/RD-utilities-terminal.png
Normal file
After Width: | Height: | Size: 436 B |
BIN
res/binding-icons/RD-video-x-generic.png
Normal file
After Width: | Height: | Size: 383 B |
BIN
res/binding-icons/RD-view-refresh.png
Normal file
After Width: | Height: | Size: 402 B |
BIN
res/binding-icons/RD-zoom-fit-best.png
Normal file
After Width: | Height: | Size: 413 B |
BIN
res/binding-icons/RD-zoom-in.png
Normal file
After Width: | Height: | Size: 395 B |
BIN
res/binding-icons/RD-zoom-original.png
Normal file
After Width: | Height: | Size: 417 B |
BIN
res/binding-icons/RD-zoom-out.png
Normal file
After Width: | Height: | Size: 371 B |
|
@ -15,6 +15,8 @@ source /app/libexec/functions.sh
|
|||
# - Enable/Disable Rewind
|
||||
# - RetroAchivement Login
|
||||
# - Login prompt
|
||||
# - Dolphin Presets
|
||||
# - Enable/Disable Custom Input Textures
|
||||
# - Emulator Options (Behind one-time power user warning dialog)
|
||||
# - Launch RetroArch
|
||||
# - Launch Cemu
|
||||
|
@ -29,7 +31,7 @@ source /app/libexec/functions.sh
|
|||
# - Launch XEMU
|
||||
# - Launch Yuzu
|
||||
# - Tools and Troubleshooting
|
||||
# - Move RetroDECK
|
||||
# - Move RetroDECK or subfolders
|
||||
# - Multi-file game check
|
||||
# - Basic BIOS file check
|
||||
# - Advanced BIOS file check
|
||||
|
@ -291,7 +293,7 @@ configurator_retroarch_rewind_dialog() {
|
|||
set_setting_value $raconf "rewind_enable" "false" retroarch
|
||||
configurator_process_complete_dialog "disabling Rewind"
|
||||
else
|
||||
configurator_retroarch_options_dialog
|
||||
configurator_retroarch_presets_dialog
|
||||
fi
|
||||
else
|
||||
zenity --question \
|
||||
|
@ -304,12 +306,12 @@ configurator_retroarch_rewind_dialog() {
|
|||
set_setting_value $raconf "rewind_enable" "true" retroarch
|
||||
configurator_process_complete_dialog "enabling Rewind"
|
||||
else
|
||||
configurator_retroarch_options_dialog
|
||||
configurator_retroarch_presets_dialog
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
configurator_retroarch_options_dialog() {
|
||||
configurator_retroarch_presets_dialog() {
|
||||
choice=$(zenity --list --title="RetroDECK Configurator Utility - RetroArch Options" --cancel-label="Back" \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
|
||||
--column="Choice" --column="Action" \
|
||||
|
@ -333,6 +335,63 @@ configurator_retroarch_options_dialog() {
|
|||
esac
|
||||
}
|
||||
|
||||
configurator_dolphin_presets_dialog() {
|
||||
choice=$(zenity --list --title="RetroDECK Configurator Utility - Dolphin Options" --cancel-label="Back" \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
|
||||
--column="Choice" --column="Action" \
|
||||
"Change Custom Input Textures Setting" "Enable or disable custom input textures for supported games in Dolphin." )
|
||||
|
||||
case $choice in
|
||||
|
||||
"Change Custom Input Textures Setting" )
|
||||
configurator_dolphin_input_textures_dialog
|
||||
;;
|
||||
|
||||
"" ) # No selection made or Back button clicked
|
||||
configurator_welcome_dialog
|
||||
;;
|
||||
|
||||
esac
|
||||
}
|
||||
|
||||
configurator_dolphin_input_textures_dialog() {
|
||||
if [[ -d "/var/data/dolphin-emu/Load/DynamicInputTextures" ]]; then
|
||||
zenity --question \
|
||||
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Configurator - Dolphin Custom Input Textures" \
|
||||
--text="Custom input textures are currently enabled. Do you want to disable them?."
|
||||
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
set_setting_value $dolphingfxconf "HiresTextures" "False" dolphin
|
||||
rm -rf "/var/data/dolphin-emu/Load/DynamicInputTextures"
|
||||
configurator_process_complete_dialog "disabling Dolphin custom input textures"
|
||||
else
|
||||
configurator_dolphin_presets_dialog
|
||||
fi
|
||||
else
|
||||
zenity --question \
|
||||
--no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Configurator - Dolphin Custom Input Textures" \
|
||||
--text="Custom input textures are currently disabled. Do you want to enable them?.\n\nThis process may take several minutes to complete."
|
||||
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
set_setting_value $dolphingfxconf "HiresTextures" "True" dolphin
|
||||
(
|
||||
mkdir "/var/data/dolphin-emu/Load/DynamicInputTextures"
|
||||
cp -rf "/app/retrodeck/extras/DynamicInputTextures/*" "/var/data/dolphin-emu/Load/DynamicInputTextures/"
|
||||
) |
|
||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Configurator Utility - Dolphin Custom Input Textures Install"
|
||||
configurator_process_complete_dialog "enabling Dolphin custom input textures"
|
||||
else
|
||||
configurator_dolphin_presets_dialog
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
configurator_compress_single_game_dialog() {
|
||||
local file=$(file_browse "Game to compress")
|
||||
if [[ ! -z "$file" ]]; then
|
||||
|
@ -748,7 +807,7 @@ configurator_tools_and_troubleshooting_dialog() {
|
|||
choice=$(zenity --list --title="RetroDECK Configurator Utility - Change Options" --cancel-label="Back" \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
|
||||
--column="Choice" --column="Action" \
|
||||
"Move RetroDECK" "Move RetroDECK files 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" \
|
||||
"Basic BIOS file check" "Show a list of systems that BIOS files are found for" \
|
||||
"Advanced BIOS file check" "Show advanced information about common BIOS files" \
|
||||
|
@ -759,9 +818,8 @@ configurator_tools_and_troubleshooting_dialog() {
|
|||
|
||||
case $choice in
|
||||
|
||||
"Move RetroDECK" )
|
||||
configurator_generic_dialog "This option will move the RetroDECK data folder (ROMs, saves, BIOS etc.) to a new location.\n\nPlease choose where to move the RetroDECK data folder."
|
||||
configurator_move_retrodeck_dialog
|
||||
"Move RetroDECK Folders" )
|
||||
configurator_move_dialog
|
||||
;;
|
||||
|
||||
"Multi-file game structure check" )
|
||||
|
@ -822,158 +880,66 @@ configurator_tools_and_troubleshooting_dialog() {
|
|||
esac
|
||||
}
|
||||
|
||||
configurator_move_retrodeck_dialog() {
|
||||
if [[ -d $rdhome ]]; then
|
||||
destination=$(configurator_destination_choice_dialog "RetroDECK Data" "Please choose a destination for the RetroDECK data folder.")
|
||||
case $destination in
|
||||
configurator_move_dialog() {
|
||||
choice=$(zenity --list --title="RetroDECK Configurator Utility - Move RetroDECK Folders" --cancel-label="Back" \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
|
||||
--column="Choice" --column="Action" \
|
||||
"Move all of RetroDECK" "Move the entire retrodeck folder to a new location" \
|
||||
"Move ROMs folder" "Move only the ROMs folder to a new location" \
|
||||
"Move BIOS folder" "Move only the BIOS folder to a new location" \
|
||||
"Move Downloaded Media folder" "Move only the Downloaded Media folder to a new location" \
|
||||
"Move Saves folder" "Move only the Saves folder to a new location" \
|
||||
"Move States folder" "Move only the States folder to a new location" \
|
||||
"Move Themes folder" "Move only the Themes folder to a new location" \
|
||||
"Move Screenshots folder" "Move only the Screenshots folder to a new location" \
|
||||
"Move Mods folder" "Move only the Mods folder to a new location" \
|
||||
"Move Texture Packs folder" "Move only the Texture Packs folder to a new location" )
|
||||
|
||||
"Back" )
|
||||
configurator_tools_and_troubleshooting_dialog
|
||||
case $choice in
|
||||
|
||||
"Move all of RetroDECK" )
|
||||
configurator_move_folder_dialog "rdhome"
|
||||
;;
|
||||
|
||||
"Internal Storage" )
|
||||
if [[ ! -L "$HOME/retrodeck" && -d "$HOME/retrodeck" ]]; then
|
||||
configurator_generic_dialog "The RetroDECK data folder is already at that location, please pick a new one."
|
||||
configurator_move_retrodeck_dialog
|
||||
else
|
||||
configurator_generic_dialog "Moving RetroDECK data folder to $destination"
|
||||
unlink $HOME/retrodeck # Remove symlink for $rdhome
|
||||
#move $rdhome "$HOME"
|
||||
if [[ ! -d $rdhome && -d $HOME/retrodeck ]]; then # If the move succeeded
|
||||
rdhome="$HOME/retrodeck"
|
||||
roms_folder="$rdhome/roms"
|
||||
saves_folder="$rdhome/saves"
|
||||
states_folder="$rdhome/states"
|
||||
bios_folder="$rdhome/bios"
|
||||
media_folder="$rdhome/downloaded_media"
|
||||
themes_folder="$rdhome/themes"
|
||||
prepare_emulator "all" "postmove"
|
||||
conf_write
|
||||
|
||||
configurator_process_complete_dialog "moving the RetroDECK data directory to internal storage"
|
||||
else
|
||||
configurator_generic_dialog "The moving process was not completed, please try again."
|
||||
fi
|
||||
fi
|
||||
"Move ROMs folder" )
|
||||
configurator_move_folder_dialog "roms_folder"
|
||||
;;
|
||||
|
||||
"SD Card" )
|
||||
if [[ -L "$HOME/retrodeck" && -d "$sdcard/retrodeck" && "$rdhome" == "$sdcard/retrodeck" ]]; then
|
||||
configurator_generic_dialog "The RetroDECK data folder is already configured to that location, please pick a new one."
|
||||
configurator_move_retrodeck_dialog
|
||||
else
|
||||
if [[ ! -w $sdcard ]]; then
|
||||
configurator_generic_dialog "The SD card was found but is not writable\nThis can happen with cards formatted on PC or for other reasons.\nPlease format the SD card through the Steam Deck's Game Mode and try the moving process again."
|
||||
configurator_welcome_dialog
|
||||
else
|
||||
if [[ $(verify_space $rdhome $sdcard) == "true" ]]; then
|
||||
configurator_generic_dialog "Moving RetroDECK data folder to $destination"
|
||||
if [[ -L "$HOME/retrodeck/roms" ]]; then # Check for ROMs symlink user may have created
|
||||
unlink "$HOME/retrodeck/roms"
|
||||
fi
|
||||
unlink $HOME/retrodeck # Remove symlink for $rdhome
|
||||
|
||||
(
|
||||
dir_prep "$sdcard/retrodeck" "$rdhome"
|
||||
) |
|
||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Configurator Utility - Move in Progress" \
|
||||
--text="Moving directory $rdhome to new location of $sdcard/retrodeck, please wait."
|
||||
|
||||
if [[ -L $rdhome && ! $rdhome == "$HOME/retrodeck" ]]; then # Clean up extraneus symlinks from previous moves
|
||||
unlink $rdhome
|
||||
fi
|
||||
|
||||
if [[ ! -L "$HOME/retrodeck" ]]; then # Always link back to original directory
|
||||
ln -svf "$sdcard/retrodeck" "$HOME"
|
||||
fi
|
||||
|
||||
rdhome="$sdcard/retrodeck"
|
||||
roms_folder="$rdhome/roms"
|
||||
saves_folder="$rdhome/saves"
|
||||
states_folder="$rdhome/states"
|
||||
bios_folder="$rdhome/bios"
|
||||
media_folder="$rdhome/downloaded_media"
|
||||
themes_folder="$rdhome/themes"
|
||||
prepare_emulator "all" "postmove"
|
||||
conf_write
|
||||
configurator_process_complete_dialog "moving the RetroDECK data directory to SD card"
|
||||
else
|
||||
zenity --icon-name=net.retrodeck.retrodeck --error --no-wrap \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Configurator Utility - Move Directories" \
|
||||
--text="The destination directory you have selected does not have enough free space for the files you are trying to move.\n\nPlease select a new destination or free up some space."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
"Move BIOS folder" )
|
||||
configurator_move_folder_dialog "bios_folder"
|
||||
;;
|
||||
|
||||
"Custom Location" )
|
||||
configurator_generic_dialog "Select the root folder you would like to store the RetroDECK data folder in.\n\nA new folder \"retrodeck\" will be created in the destination chosen."
|
||||
custom_dest=$(directory_browse "RetroDECK directory location")
|
||||
if [[ ! -w $custom_dest ]]; then
|
||||
configurator_generic_dialog "The destination was found but is not writable\n\nThis can happen if RetroDECK does not have permission to write to this location.\n\nThis can typically be solved through the utility Flatseal, please make the needed changes and try the moving process again."
|
||||
configurator_welcome_dialog
|
||||
else
|
||||
if [[ $(verify_space $rdhome $custom_dest) ]];then
|
||||
configurator_generic_dialog "Moving RetroDECK data folder to $custom_dest/retrodeck"
|
||||
if [[ -L $rdhome/roms ]]; then # Check for ROMs symlink user may have created
|
||||
unlink $rdhome/roms
|
||||
fi
|
||||
"Move Downloaded Media folder" )
|
||||
configurator_move_folder_dialog "media_folder"
|
||||
;;
|
||||
|
||||
unlink $HOME/retrodeck # Remove symlink for $rdhome if the previous location was not internal
|
||||
"Move Saves folder" )
|
||||
configurator_move_folder_dialog "saves_folder"
|
||||
;;
|
||||
|
||||
(
|
||||
dir_prep "$custom_dest/retrodeck" "$rdhome"
|
||||
) |
|
||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Configurator Utility - Move in Progress" \
|
||||
--text="Moving directory $rdhome to new location of $custom_dest/retrodeck, please wait."
|
||||
"Move States folder" )
|
||||
configurator_move_folder_dialog "states_folder"
|
||||
;;
|
||||
|
||||
if [[ ! -L "$HOME/retrodeck" ]]; then
|
||||
ln -svf "$custom_dest/retrodeck" "$HOME"
|
||||
fi
|
||||
"Move Themes folder" )
|
||||
configurator_move_folder_dialog "themes_folder"
|
||||
;;
|
||||
|
||||
if [[ -L $rdhome && ! $rdhome == "$HOME/retrodeck" ]]; then # Clean up extraneus symlinks from previous moves
|
||||
unlink $rdhome
|
||||
fi
|
||||
"Move Screenshots folder" )
|
||||
configurator_move_folder_dialog "screenshots_folder"
|
||||
;;
|
||||
|
||||
rdhome="$custom_dest/retrodeck"
|
||||
roms_folder="$rdhome/roms"
|
||||
saves_folder="$rdhome/saves"
|
||||
states_folder="$rdhome/states"
|
||||
bios_folder="$rdhome/bios"
|
||||
media_folder="$rdhome/downloaded_media"
|
||||
themes_folder="$rdhome/themes"
|
||||
prepare_emulator "all" "postmove"
|
||||
conf_write
|
||||
configurator_process_complete_dialog "moving the RetroDECK data directory to SD card"
|
||||
else
|
||||
zenity --icon-name=net.retrodeck.retrodeck --error --no-wrap \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
--title "RetroDECK Configurator Utility - Move Directories" \
|
||||
--text="The destination directory you have selected does not have enough free space for the files you are trying to move.\n\nPlease select a new destination or free up some space."
|
||||
fi
|
||||
fi
|
||||
"Move Mods folder" )
|
||||
configurator_move_folder_dialog "mods_folder"
|
||||
;;
|
||||
|
||||
"Move Texture Packs folder" )
|
||||
configurator_move_folder_dialog "texture_packs_folder"
|
||||
;;
|
||||
|
||||
esac
|
||||
else
|
||||
configurator_generic_dialog "The RetroDECK data 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 RetroDECK data folder."
|
||||
rdhome=$(directory_browse "RetroDECK directory location")
|
||||
roms_folder="$rdhome/roms"
|
||||
saves_folder="$rdhome/saves"
|
||||
states_folder="$rdhome/states"
|
||||
bios_folder="$rdhome/bios"
|
||||
media_folder="$rdhome/downloaded_media"
|
||||
themes_folder="$rdhome/themes"
|
||||
emulator_post_move
|
||||
conf_write
|
||||
configurator_generic_dialog "RetroDECK data folder now configured at $rdhome. Please start the moving process again."
|
||||
configurator_move_retrodeck_dialog
|
||||
fi
|
||||
|
||||
configurator_tools_and_troubleshooting_dialog
|
||||
}
|
||||
|
||||
configurator_online_update_setting_dialog() {
|
||||
|
@ -1115,7 +1081,11 @@ configurator_welcome_dialog() {
|
|||
case $choice in
|
||||
|
||||
"RetroArch Presets" )
|
||||
configurator_retroarch_options_dialog
|
||||
configurator_retroarch_presets_dialog
|
||||
;;
|
||||
|
||||
"Dolphin Presets" )
|
||||
configurator_dolphin_presets_dialog
|
||||
;;
|
||||
|
||||
"Emulator Options" )
|
||||
|
|