mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 23:45:39 +00:00
Merge branch 'cooker-0.8.0b' into feat/esde-3.0
This commit is contained in:
commit
8b957ba300
|
@ -1,2 +1,3 @@
|
||||||
false^RPCS3 Firmware Install^Install firmware needed for PS3 emulation^rpcs3_firmware
|
false^RPCS3 Firmware Install^Install firmware needed for PS3 emulation^rpcs3_firmware
|
||||||
|
false^Vita3K Firmware Install^Install firmware needed for Vita3K emulation^vita3k_firmware
|
||||||
false^RetroDECK Controller Profile^Install custom RetroDECK controller profile^rd_controller_profile
|
false^RetroDECK Controller Profile^Install custom RetroDECK controller profile^rd_controller_profile
|
||||||
|
|
BIN
emu-configs/gzdoom/gzdoom.pk3
Normal file
BIN
emu-configs/gzdoom/gzdoom.pk3
Normal file
Binary file not shown.
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
compress_game() {
|
compress_game() {
|
||||||
# Function for compressing one or more files to .chd format
|
# Function for compressing one or more files to .chd format
|
||||||
# USAGE: compress_game $format $full_path_to_input_file
|
# USAGE: compress_game $format $full_path_to_input_file $system(optional)
|
||||||
local file="$2"
|
local file="$2"
|
||||||
local filename_no_path=$(basename "$file")
|
local filename_no_path=$(basename "$file")
|
||||||
local filename_no_extension="${filename_no_path%.*}"
|
local filename_no_extension="${filename_no_path%.*}"
|
||||||
|
@ -10,7 +10,11 @@ compress_game() {
|
||||||
local dest_file=$(dirname "$(realpath "$file")")"/""$filename_no_extension"
|
local dest_file=$(dirname "$(realpath "$file")")"/""$filename_no_extension"
|
||||||
|
|
||||||
if [[ "$1" == "chd" ]]; then
|
if [[ "$1" == "chd" ]]; then
|
||||||
/app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd
|
if [[ "$3" == "psp" ]]; then
|
||||||
|
echo "Put createdvd or maxcso here" # TODO
|
||||||
|
else
|
||||||
|
/app/bin/chdman createcd -i "$source_file" -o "$dest_file".chd
|
||||||
|
fi
|
||||||
elif [[ "$1" == "zip" ]]; then
|
elif [[ "$1" == "zip" ]]; then
|
||||||
zip -jq9 "$dest_file".zip "$source_file"
|
zip -jq9 "$dest_file".zip "$source_file"
|
||||||
elif [[ "$1" == "rvz" ]]; then
|
elif [[ "$1" == "rvz" ]]; then
|
||||||
|
@ -93,11 +97,11 @@ cli_compress_single_game() {
|
||||||
read -p "RetroDECK will now attempt to compress your selected game. Press Enter key to continue..."
|
read -p "RetroDECK will now attempt to compress your selected game. Press Enter key to continue..."
|
||||||
if [[ ! -z "$file" ]]; then
|
if [[ ! -z "$file" ]]; then
|
||||||
if [[ -f "$file" ]]; then
|
if [[ -f "$file" ]]; then
|
||||||
check_system=$(echo "$file" | grep -oE "$roms_folder/[^/]+" | grep -oE "[^/]+$")
|
local system=$(echo "$file" | grep -oE "$roms_folder/[^/]+" | grep -oE "[^/]+$")
|
||||||
local compatible_compression_format=$(find_compatible_compression_format "$file")
|
local compatible_compression_format=$(find_compatible_compression_format "$file")
|
||||||
if [[ ! $compatible_compression_format == "none" ]]; then
|
if [[ ! $compatible_compression_format == "none" ]]; then
|
||||||
echo "$(basename "$file") can be compressed to $compatible_compression_format"
|
echo "$(basename "$file") can be compressed to $compatible_compression_format"
|
||||||
compress_game "$compatible_compression_format" "$file"
|
compress_game "$compatible_compression_format" "$file" "$system"
|
||||||
if [[ $post_compression_cleanup == [yY] ]]; then # Remove file(s) if requested
|
if [[ $post_compression_cleanup == [yY] ]]; then # Remove file(s) if requested
|
||||||
if [[ $(basename "$file") == *".cue" ]]; then
|
if [[ $(basename "$file") == *".cue" ]]; then
|
||||||
local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file")
|
local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file")
|
||||||
|
@ -155,7 +159,7 @@ cli_compress_all_games() {
|
||||||
local compatible_compression_format=$(find_compatible_compression_format "$file")
|
local compatible_compression_format=$(find_compatible_compression_format "$file")
|
||||||
if [[ ! "$compatible_compression_format" == "none" ]]; then
|
if [[ ! "$compatible_compression_format" == "none" ]]; then
|
||||||
echo "$(basename "$file") can be compressed to $compatible_compression_format"
|
echo "$(basename "$file") can be compressed to $compatible_compression_format"
|
||||||
compress_game "$compatible_compression_format" "$file"
|
compress_game "$compatible_compression_format" "$file" "$system"
|
||||||
if [[ $post_compression_cleanup == [yY] ]]; then # Remove file(s) if requested
|
if [[ $post_compression_cleanup == [yY] ]]; then # Remove file(s) if requested
|
||||||
if [[ "$file" == *".cue" ]]; then
|
if [[ "$file" == *".cue" ]]; then
|
||||||
local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file")
|
local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file")
|
||||||
|
|
|
@ -107,34 +107,14 @@ download_file() {
|
||||||
# file_dest is the destination the file should be in the filesystem, needs filename included!
|
# file_dest is the destination the file should be in the filesystem, needs filename included!
|
||||||
# file_name is a user-readable file name or description to be put in the Zenity dialog
|
# file_name is a user-readable file name or description to be put in the Zenity dialog
|
||||||
|
|
||||||
# Run wget in the background and redirect the progress to a temporary file
|
|
||||||
(
|
(
|
||||||
wget "$1" -O "$2" -q --show-progress --progress=dot 2>&1 | sed -n -e 's/^.* \([0-9]*\)%.*$/\1/p' > "/var/cache/tmp/download_progress" &
|
wget "$1" -O "$2" -q
|
||||||
wget_pid=$!
|
|
||||||
|
|
||||||
progress="0"
|
|
||||||
echo "$progress" # Initial progress value. sent to Zenity
|
|
||||||
while true; do
|
|
||||||
progress=$(tail -n 2 "/var/cache/tmp/download_progress" | head -1) # Read the second-to-last value written to the pipe, to avoid reading data that is half written
|
|
||||||
echo "$progress" # Send value to Zenity
|
|
||||||
if [[ "$(tail -n 1 "/var/cache/tmp/download_progress")" == "100" ]]; then # Read last line every time to check for download completion
|
|
||||||
echo "100"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
sleep 0.5
|
|
||||||
done
|
|
||||||
|
|
||||||
# Wait for wget process to finish
|
|
||||||
wait "$wget_pid"
|
|
||||||
) |
|
) |
|
||||||
zenity --progress \
|
zenity --progress \
|
||||||
--title="Downloading File" \
|
--title="Downloading File" \
|
||||||
--text="Downloading $3..." \
|
--text="Downloading $3..." \
|
||||||
--percentage=0 \
|
--pulsate \
|
||||||
--auto-close
|
--auto-close
|
||||||
|
|
||||||
# Cleanup temp file
|
|
||||||
rm -f "/var/cache/tmp/download_progress"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
update_rd_conf() {
|
update_rd_conf() {
|
||||||
|
@ -314,6 +294,13 @@ update_rpcs3_firmware() {
|
||||||
rm -rf "$roms_folder/ps3/tmp"
|
rm -rf "$roms_folder/ps3/tmp"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update_vita3k_firmware() {
|
||||||
|
download_file "http://dus01.psv.update.playstation.net/update/psv/image/2022_0209/rel_f2c7b12fe85496ec88a0391b514d6e3b/PSVUPDAT.PUP" "/tmp/PSVUPDAT.PUP" "Vita3K Firmware file 1"
|
||||||
|
download_file "http://dus01.psp2.update.playstation.net/update/psp2/image/2019_0924/sd_8b5f60b56c3da8365b973dba570c53a5/PSP2UPDAT.PUP?dest=us" "/tmp/PSP2UPDAT.PUP" "Vita3K Firmware file 2"
|
||||||
|
Vita3K --firmware /tmp/PSVUPDAT.PUP
|
||||||
|
Vita3K --firmware /tmp/PSP2UPDAT.PUP
|
||||||
|
}
|
||||||
|
|
||||||
backup_retrodeck_userdata() {
|
backup_retrodeck_userdata() {
|
||||||
mkdir -p "$backups_folder"
|
mkdir -p "$backups_folder"
|
||||||
zip -rq9 "$backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip" "$saves_folder" "$states_folder" "$bios_folder" "$media_folder" "$themes_folder" "$logs_folder" "$screenshots_folder" "$mods_folder" "$texture_packs_folder" "$borders_folder" > $logs_folder/$(date +"%0m%0d")_backup_log.log
|
zip -rq9 "$backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip" "$saves_folder" "$states_folder" "$bios_folder" "$media_folder" "$themes_folder" "$logs_folder" "$screenshots_folder" "$mods_folder" "$texture_packs_folder" "$borders_folder" > $logs_folder/$(date +"%0m%0d")_backup_log.log
|
||||||
|
@ -469,6 +456,10 @@ finit() {
|
||||||
configurator_generic_dialog "RPCS3 Firmware Install" "You have chosen to install the RPCS3 firmware during the RetroDECK first setup.\n\nThis process will take several minutes and requires network access.\n\nRPCS3 will be launched automatically at the end of the RetroDECK setup process.\nOnce the firmware is installed, please close the emulator to finish the process."
|
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
|
fi
|
||||||
|
|
||||||
|
if [[ "$finit_options_choices" =~ (vita3k_firmware|Enable All) ]]; then # Additional information on the firmware install process, as the emulator needs to be manually closed
|
||||||
|
configurator_generic_dialog "Vita3K Firmware Install" "You have chosen to install the Vita3K firmware during the RetroDECK first setup.\n\nThis process will take several minutes and requires network access.\n\nVita3K will be launched automatically at the end of the RetroDECK setup process.\nOnce the firmware is installed, please close the emulator to finish the process."
|
||||||
|
fi
|
||||||
|
|
||||||
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
|
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \
|
||||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" \
|
--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."
|
--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."
|
||||||
|
@ -484,6 +475,11 @@ finit() {
|
||||||
update_rpcs3_firmware
|
update_rpcs3_firmware
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [[ "$finit_options_choices" =~ (vita3k_firmware|Enable All) ]]; then
|
||||||
|
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
|
update_vita3k_firmware
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if [[ "$finit_options_choices" =~ (rd_controller_profile|Enable All) ]]; then
|
if [[ "$finit_options_choices" =~ (rd_controller_profile|Enable All) ]]; then
|
||||||
install_retrodeck_controller_profile
|
install_retrodeck_controller_profile
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -137,8 +137,8 @@ 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
|
||||||
if [[ $(find media/deck/* -maxdepth 0 -type d -print | wc -l) -eq 1 ]]; then # If there is only one SD card found in the new SteamOS 3.5 location, assign it as the default
|
if [[ $(find /run/media/deck/* -maxdepth 0 -type d -print | wc -l) -eq 1 ]]; then # If there is only one SD card found in the new SteamOS 3.5 location, assign it as the default
|
||||||
default_sd="$(find media/deck/* -maxdepth 0 -type d -print)"
|
default_sd="$(find /run/media/deck/* -maxdepth 0 -type d -print)"
|
||||||
else # If the default legacy path cannot be found, and there are multiple entries in the new Steam OS 3.5 SD card path, let the user pick which one to use
|
else # If the default legacy path cannot be found, and there are multiple entries in the new Steam OS 3.5 SD card path, let the user pick which one to use
|
||||||
configurator_generic_dialog "RetroDECK Setup" "The SD card was not found in the default location, and multiple drives were detected.\nPlease browse to the location of the desired SD card.\n\nIf you are not using an SD card, please click \"Cancel\"."
|
configurator_generic_dialog "RetroDECK Setup" "The SD card was not found in the default location, and multiple drives were detected.\nPlease browse to the location of the desired SD card.\n\nIf you are not using an SD card, please click \"Cancel\"."
|
||||||
default_sd="$(directory_browse "SD Card Location")"
|
default_sd="$(directory_browse "SD Card Location")"
|
||||||
|
|
|
@ -686,13 +686,6 @@ prepare_component() {
|
||||||
fi
|
fi
|
||||||
# Shared actions
|
# Shared actions
|
||||||
dir_prep "$saves_folder/psvita/vita3k" "$bios_folder/Vita3K/Vita3K/ux0/user/00/savedata" # Multi-user safe?
|
dir_prep "$saves_folder/psvita/vita3k" "$bios_folder/Vita3K/Vita3K/ux0/user/00/savedata" # Multi-user safe?
|
||||||
|
|
||||||
# Installing firmware
|
|
||||||
# TODO: at the moment this is here instead of a tool because it seems like it cannot run without Firmware
|
|
||||||
curl "http://dus01.psv.update.playstation.net/update/psv/image/2022_0209/rel_f2c7b12fe85496ec88a0391b514d6e3b/PSVUPDAT.PUP" -po /tmp/PSVUPDAT.PUP
|
|
||||||
curl "http://dus01.psp2.update.playstation.net/update/psp2/image/2019_0924/sd_8b5f60b56c3da8365b973dba570c53a5/PSP2UPDAT.PUP?dest=us" -po /tmp/PSP2UPDAT.PUP
|
|
||||||
Vita3K --firmware /tmp/PSVUPDAT.PUP
|
|
||||||
Vita3K --firmware /tmp/PSP2UPDAT.PUP
|
|
||||||
fi
|
fi
|
||||||
if [[ "$action" == "postmove" ]]; then # Run only post-move commands
|
if [[ "$action" == "postmove" ]]; then # Run only post-move commands
|
||||||
dir_prep "$saves_folder/psvita/vita3k" "$bios_folder/Vita3K/Vita3K/ux0/user/00/savedata" # Multi-user safe?
|
dir_prep "$saves_folder/psvita/vita3k" "$bios_folder/Vita3K/Vita3K/ux0/user/00/savedata" # Multi-user safe?
|
||||||
|
|
|
@ -1321,7 +1321,7 @@ modules:
|
||||||
# Tools
|
# Tools
|
||||||
- mkdir -p /app/tools
|
- mkdir -p /app/tools
|
||||||
- cp -r tools/** /app/tools
|
- cp -r tools/** /app/tools
|
||||||
- find /app/tools -name '*.py|*.sh' -exec chmod +x {} \;
|
- find /app/tools -type f \( -name "*.sh" -o -name "*.py" \) -exec chmod +x {} \;
|
||||||
|
|
||||||
# Function libraries
|
# Function libraries
|
||||||
- mkdir -p /app/libexec
|
- mkdir -p /app/libexec
|
||||||
|
|
|
@ -79,8 +79,8 @@ https://retrodeck.net
|
||||||
if [[ $response == [yY] ]]; then
|
if [[ $response == [yY] ]]; then
|
||||||
rm -f "$lockfile"
|
rm -f "$lockfile"
|
||||||
rm -f "$rd_conf"
|
rm -f "$rd_conf"
|
||||||
read -p "The process has been completed, press Enter key to start the initial RetroDECK setup process."
|
read -p "The process has been completed, press Enter key to exit. Please run RetroDECK again to start the initial setup process."
|
||||||
shift # Continue launch after previous command is finished
|
exit 1
|
||||||
else
|
else
|
||||||
read -p "The process has been cancelled, press Enter key to exit."
|
read -p "The process has been cancelled, press Enter key to exit."
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -60,6 +60,7 @@ source /app/libexec/global.sh
|
||||||
# - Compress All Games
|
# - Compress All Games
|
||||||
# - Install: RetroDECK SD Controller Profile
|
# - Install: RetroDECK SD Controller Profile
|
||||||
# - Install: PS3 firmware
|
# - Install: PS3 firmware
|
||||||
|
# - Install: PS Vita firmware
|
||||||
# - RetroDECK: Change Update Setting
|
# - RetroDECK: Change Update Setting
|
||||||
# - Troubleshooting
|
# - Troubleshooting
|
||||||
# - Backup: RetroDECK Userdata
|
# - Backup: RetroDECK Userdata
|
||||||
|
@ -531,6 +532,7 @@ configurator_retrodeck_tools_dialog() {
|
||||||
"Tool: Compress Games" "Compress games for systems that support it" \
|
"Tool: Compress Games" "Compress games for systems that support it" \
|
||||||
"Install: RetroDECK SD Controller Profile" "Install the custom RetroDECK controller layout for the Steam Deck" \
|
"Install: RetroDECK SD Controller Profile" "Install the custom RetroDECK controller layout for the Steam Deck" \
|
||||||
"Install: PS3 Firmware" "Download and install PS3 firmware for use with the RPCS3 emulator" \
|
"Install: PS3 Firmware" "Download and install PS3 firmware for use with the RPCS3 emulator" \
|
||||||
|
"Install: PS Vita Firmware" "Download and install PS Vita firmware for use with the Vita3K emulator" \
|
||||||
"RetroDECK: Change Update Setting" "Enable or disable online checks for new versions of RetroDECK" )
|
"RetroDECK: Change Update Setting" "Enable or disable online checks for new versions of RetroDECK" )
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
|
@ -571,6 +573,24 @@ configurator_retrodeck_tools_dialog() {
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"Install: PS Vita Firmware" )
|
||||||
|
if [[ $(check_network_connectivity) == "true" ]]; then
|
||||||
|
configurator_generic_dialog "RetroDECK Configurator - Install: PS Vita firmware" "This tool will download firmware required by Vita3K to emulate PS Vita games.\n\nThe process will take several minutes, and the emulator will launch to finish the installation.\nPlease close Vita3K manually once the installation is complete."
|
||||||
|
(
|
||||||
|
update_vita3k_firmware
|
||||||
|
) |
|
||||||
|
zenity --progress --pulsate \
|
||||||
|
--icon-name=net.retrodeck.retrodeck \
|
||||||
|
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||||
|
--title="Downloading PS Vita Firmware" \
|
||||||
|
--no-cancel \
|
||||||
|
--auto-close
|
||||||
|
else
|
||||||
|
configurator_generic_dialog "RetroDECK Configurator - Install: PS Vita Firmware" "You do not appear to currently have Internet access, which is required by this tool. Please try again when network access has been restored."
|
||||||
|
configurator_retrodeck_tools_dialog
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
"RetroDECK: Change Update Setting" )
|
"RetroDECK: Change Update Setting" )
|
||||||
configurator_online_update_setting_dialog
|
configurator_online_update_setting_dialog
|
||||||
;;
|
;;
|
||||||
|
@ -691,33 +711,24 @@ configurator_compression_tool_dialog() {
|
||||||
configurator_compress_single_game_dialog() {
|
configurator_compress_single_game_dialog() {
|
||||||
local file=$(file_browse "Game to compress")
|
local file=$(file_browse "Game to compress")
|
||||||
if [[ ! -z "$file" ]]; then
|
if [[ ! -z "$file" ]]; then
|
||||||
|
local system=$(echo "$file" | grep -oE "$roms_folder/[^/]+" | grep -oE "[^/]+$")
|
||||||
local compatible_compression_format=$(find_compatible_compression_format "$file")
|
local compatible_compression_format=$(find_compatible_compression_format "$file")
|
||||||
if [[ ! $compatible_compression_format == "none" ]]; then
|
if [[ ! $compatible_compression_format == "none" ]]; then
|
||||||
local post_compression_cleanup=$(configurator_compression_cleanup_dialog)
|
local post_compression_cleanup=$(configurator_compression_cleanup_dialog)
|
||||||
(
|
(
|
||||||
if [[ $compatible_compression_format == "chd" ]]; then
|
echo "# Compressing $(basename "$file") to $compatible_compression_format format"
|
||||||
if [[ $(validate_for_chd "$file") == "true" ]]; then
|
compress_game "$compatible_compression_format" "$file" "$system"
|
||||||
echo "# Compressing $(basename "$file") to $compatible_compression_format format"
|
if [[ $post_compression_cleanup == "true" ]]; then # Remove file(s) if requested
|
||||||
compress_game "chd" "$file"
|
if [[ "$file" == *".cue" ]]; then
|
||||||
if [[ $post_compression_cleanup == "true" ]]; then # Remove file(s) if requested
|
local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file")
|
||||||
if [[ "$file" == *".cue" ]]; then
|
local file_path=$(dirname "$(realpath "$file")")
|
||||||
local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file")
|
while IFS= read -r line
|
||||||
local file_path=$(dirname "$(realpath "$file")")
|
do
|
||||||
while IFS= read -r line
|
rm -f "$file_path/$line"
|
||||||
do
|
done < <(printf '%s\n' "$cue_bin_files")
|
||||||
rm -f "$file_path/$line"
|
rm -f $(realpath "$file")
|
||||||
done < <(printf '%s\n' "$cue_bin_files")
|
else
|
||||||
rm -f "$file"
|
rm -f "$(realpath "$file")"
|
||||||
else
|
|
||||||
rm -f "$file"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "# Compressing $(basename "$file") to $compatible_compression_format format"
|
|
||||||
compress_game "$compatible_compression_format" "$file"
|
|
||||||
if [[ $post_compression_cleanup == "true" ]]; then # Remove file(s) if requested
|
|
||||||
rm -f "$file"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
) |
|
) |
|
||||||
|
@ -817,12 +828,13 @@ configurator_compress_multiple_games_dialog() {
|
||||||
local post_compression_cleanup=$(configurator_compression_cleanup_dialog)
|
local post_compression_cleanup=$(configurator_compression_cleanup_dialog)
|
||||||
(
|
(
|
||||||
for file in "${games_to_compress[@]}"; do
|
for file in "${games_to_compress[@]}"; do
|
||||||
|
local system=$(echo "$file" | grep -oE "$roms_folder/[^/]+" | grep -oE "[^/]+$")
|
||||||
local compression_format=$(find_compatible_compression_format "$file")
|
local compression_format=$(find_compatible_compression_format "$file")
|
||||||
echo "# Compressing $(basename "$file") into $compression_format format" # Update Zenity dialog text
|
echo "# Compressing $(basename "$file") into $compression_format format" # Update Zenity dialog text
|
||||||
progress=$(( 100 - (( 100 / "$total_games_to_compress" ) * "$games_left_to_compress" )))
|
progress=$(( 100 - (( 100 / "$total_games_to_compress" ) * "$games_left_to_compress" )))
|
||||||
echo $progress
|
echo $progress
|
||||||
games_left_to_compress=$((games_left_to_compress-1))
|
games_left_to_compress=$((games_left_to_compress-1))
|
||||||
compress_game "$compression_format" "$file"
|
compress_game "$compression_format" "$file" "$system"
|
||||||
if [[ $post_compression_cleanup == "true" ]]; then # Remove file(s) if requested
|
if [[ $post_compression_cleanup == "true" ]]; then # Remove file(s) if requested
|
||||||
if [[ "$file" == *".cue" ]]; then
|
if [[ "$file" == *".cue" ]]; then
|
||||||
local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file")
|
local cue_bin_files=$(grep -o -P "(?<=FILE \").*(?=\".*$)" "$file")
|
||||||
|
|
Loading…
Reference in a new issue