Merge pull request #384 from icenine451/cooker-0.7.0b-icenine451

Cooker 0.7.0b icenine451
This commit is contained in:
icenine451 2023-05-10 17:18:35 -04:00 committed by GitHub
commit 0eff1fba2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 107 additions and 56 deletions

View file

@ -3,5 +3,6 @@
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
hash^SAMEDUCKSHAPLACEHOLDER^https://buildbot.libretro.com/nightly/linux/x86_64/latest/sameduck_libretro.so.zip
latestcommit^UNIVERSALDYNAMICINPUTCOMMITPLACEHOLDER^https://github.com/Venomalia/UniversalDynamicInput^main
outside_info^VERSIONPLACEHOLDER^${GITHUB_WORKSPACE}/buildid

View file

@ -106,7 +106,7 @@
<int name="SoundVolumeVideos" value="80" />
<string name="ApplicationUpdaterFrequency" value="never" />
<string name="ApplicationUpdaterLastCheck" value="20230331T153206" />
<string name="ApplicationVersion" value="2.0.0" />
<string name="ApplicationVersion" value="2.0.1" />
<string name="CollectionCustomGrouping" value="unthemed" />
<string name="CollectionSystemsAuto" value="" />
<string name="CollectionSystemsCustom" value="" />
@ -142,3 +142,4 @@
<string name="ThemeVariant" value="" />
<string name="UIMode" value="full" />
<string name="UIMode_passkey" value="uuddlrlrba" />
<string name="UserThemeDirectory" value="/home/deck/retrodeck/themes" />

View file

@ -290,48 +290,6 @@ cli_compress_all_games() {
done < <(printf '%s\n' "$compressable_systems_list")
}
desktop_mode_warning() {
# This function is a generic warning for issues that happen when running in desktop mode.
# Running in desktop mode can be verified with the following command: if [[ ! $XDG_CURRENT_DESKTOP == "gamescope" ]]; then
# This function will check if desktop mode is currently being used and if the warning has not been disabled, and show it if needed.
# USAGE: desktop_mode_warning
if [[ ! $XDG_CURRENT_DESKTOP == "gamescope" ]]; then
if [[ $desktop_mode_warning == "true" ]]; then
choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Never show this again" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Desktop Mode Warning" \
--text="You appear to be running RetroDECK in the Steam Deck's Desktop mode!\n\nSome functions of RetroDECK may not work properly in Desktop mode, such as the Steam Deck's normal controls.\n\nRetroDECK is best enjoyed in Game mode!\n\nDo you still want to proceed?")
rc=$? # Capture return code, as "Yes" button has no text value
if [[ $rc == "1" ]]; then # If any button other than "Yes" was clicked
if [[ $choice == "No" ]]; then
exit 1
elif [[ $choice == "Never show this again" ]]; then
set_setting_value $rd_conf "desktop_mode_warning" "false" retrodeck "options" # Store desktop mode warning variable for future checks
fi
fi
fi
fi
}
low_space_warning() {
# This function will verify that the drive with the $HOME path on it has at least 10% space free, so the user can be warned before it fills up
# USAGE: low_space_warning
if [[ $low_space_warning == "true" ]]; then
local used_percent=$(df --output=pcent "$HOME" | tail -1 | tr -d " " | tr -d "%")
if [[ "$used_percent" -ge 90 && -d "$HOME/retrodeck" ]]; then # If there is any RetroDECK data on the main drive to move
choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="OK" --extra-button="Never show this again" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Low Space Warning" \
--text="Your main drive is over 90% full!\n\nIf your drive fills completely this can lead to data loss or system crash.\n\nPlease consider moving some RetroDECK folders to other storage locations using the Configurator.")
if [[ $choice == "Never show this again" ]]; then
set_setting_value $rd_conf "low_space_warning" "false" retrodeck "options" # Store low space warning variable for future checks
fi
fi
fi
}
set_setting_value() {
# Function for editing settings
# USAGE: set_setting_value $setting_file "$setting_name" "$new_setting_value" $system $section_name(optional)
@ -348,7 +306,7 @@ set_setting_value() {
else
sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"'=^s^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' $1
fi
if [[ "$4" == "retrodeck" ]]; then # If a RetroDECK setting is being changed, also write it to memory for immediate use
if [[ "$4" == "retrodeck" && ("$current_section_name" == "" || "$current_section_name" == "paths" || "$current_section_name" == "options") ]]; 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"
fi
;;
@ -663,7 +621,7 @@ build_preset_config(){
;;
esac
done < <(eval cat "$presets_dir/$read_system_name"_presets.cfg)
done < <(cat "$presets_dir/$read_system_name"_presets.cfg)
fi
done < <(printf '%s\n' "$preset_section")
done
@ -793,15 +751,15 @@ do
;;
"add_setting_line" )
eval add_setting_line $3 "$setting_name" $system_name $current_section
add_setting_line $3 "$setting_name" $system_name $current_section
;;
"disable_setting" )
eval disable_setting $3 "$setting_name" $system_name $current_section
disable_setting $3 "$setting_name" $system_name $current_section
;;
"enable_setting" )
eval enable_setting $3 "$setting_name" $system_name $current_section
enable_setting $3 "$setting_name" $system_name $current_section
;;
"change" )
@ -835,23 +793,38 @@ do
case $action in
"disable_file" )
eval disable_file "$config_file"
if [[ "$config_file" = \$* ]]; then # If patch setting value is a reference to an internal variable name
eval config_file="$config_file"
fi
disable_file "$config_file"
;;
"enable_file" )
eval enable_file "$config_file"
if [[ "$config_file" = \$* ]]; then # If patch setting value is a reference to an internal variable name
eval config_file="$config_file"
fi
enable_file "$config_file"
;;
"add_setting_line" )
eval add_setting_line "$config_file" "$setting_name" $system_name $current_section
if [[ "$config_file" = \$* ]]; then # If patch setting value is a reference to an internal variable name
eval config_file="$config_file"
fi
add_setting_line "$config_file" "$setting_name" $system_name $current_section
;;
"disable_setting" )
eval disable_setting "$config_file" "$setting_name" $system_name $current_section
if [[ "$config_file" = \$* ]]; then # If patch setting value is a reference to an internal variable name
eval config_file="$config_file"
fi
disable_setting "$config_file" "$setting_name" $system_name $current_section
;;
"enable_setting" )
eval enable_setting "$config_file" "$setting_name" $system_name $current_section
if [[ "$config_file" = \$* ]]; then # If patch setting value is a reference to an internal variable name
eval config_file="$config_file"
fi
enable_setting "$config_file" "$setting_name" $system_name $current_section
;;
"change" )
@ -886,6 +859,17 @@ check_network_connectivity() {
fi
}
check_desktop_mode() {
# This function will do a basic check of if we are running in Steam Deck game mode or not, and return "true" if we are outside of game mode
# USAGE: if [[ $(check_desktop_mode) == "true" ]]; then
if [[ ! $XDG_CURRENT_DESKTOP == "gamescope" ]]; then
echo "true"
else
echo "false"
fi
}
check_for_version_update() {
# This function will perform a basic online version check and alert the user if there is a new version available.
@ -1408,15 +1392,15 @@ prepare_emulator() {
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
set_setting_value "es_settings.xml" "UserThemeDirectory" "$themes_folder" "es_settings"
fi
if [[ "$action" == "postmove" ]]; then
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"
set_setting_value "es_settings.xml" "UserThemeDirectory" "$themes_folder" "es_settings"
fi
fi
@ -1747,9 +1731,14 @@ prepare_emulator() {
cp -fv "$emuconfigs/ppssppsdl/"* /var/config/ppsspp/PSP/SYSTEM/
set_setting_value "$ppssppconf" "CurrentDirectory" "$roms_folder/psp" "ppsspp" "General"
fi
# Shared actions
dir_prep "$saves_folder/PSP/PPSSPP-SA" "/var/config/ppsspp/PSP/SAVEDATA"
dir_prep "$states_folder/PSP/PPSSPP-SA" "/var/config/ppsspp/PSP/PPSSPP_STATE"
fi
if [[ "$action" == "postmove" ]]; then # Run only post-move commands
set_setting_value "$ppssppconf" "CurrentDirectory" "$roms_folder/psp" "ppsspp" "General"
dir_prep "$saves_folder/PSP/PPSSPP-SA" "/var/config/ppsspp/PSP/SAVEDATA"
dir_prep "$states_folder/PSP/PPSSPP-SA" "/var/config/ppsspp/PSP/PPSSPP_STATE"
fi
fi
@ -2658,3 +2647,43 @@ change_preset_dialog() {
echo "No choices made"
fi
}
desktop_mode_warning() {
# This function is a generic warning for issues that happen when running in desktop mode.
# Running in desktop mode can be verified with the following command: if [[ ! $XDG_CURRENT_DESKTOP == "gamescope" ]]; then
# This function will check if desktop mode is currently being used and if the warning has not been disabled, and show it if needed.
# USAGE: desktop_mode_warning
if [[ $(check_desktop_mode) == "true" && $desktop_mode_warning == "true" ]]; then
choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Never show this again" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Desktop Mode Warning" \
--text="You appear to be running RetroDECK in the Steam Deck's Desktop mode!\n\nSome functions of RetroDECK may not work properly in Desktop mode, such as the Steam Deck's normal controls.\n\nRetroDECK is best enjoyed in Game mode!\n\nDo you still want to proceed?")
rc=$? # Capture return code, as "Yes" button has no text value
if [[ $rc == "1" ]]; then # If any button other than "Yes" was clicked
if [[ $choice == "No" ]]; then
exit 1
elif [[ $choice == "Never show this again" ]]; then
set_setting_value $rd_conf "desktop_mode_warning" "false" retrodeck "options" # Store desktop mode warning variable for future checks
fi
fi
fi
}
low_space_warning() {
# This function will verify that the drive with the $HOME path on it has at least 10% space free, so the user can be warned before it fills up
# USAGE: low_space_warning
if [[ $low_space_warning == "true" ]]; then
local used_percent=$(df --output=pcent "$HOME" | tail -1 | tr -d " " | tr -d "%")
if [[ "$used_percent" -ge 90 && -d "$HOME/retrodeck" ]]; then # If there is any RetroDECK data on the main drive to move
choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="OK" --extra-button="Never show this again" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Low Space Warning" \
--text="Your main drive is over 90% full!\n\nIf your drive fills completely this can lead to data loss or system crash.\n\nPlease consider moving some RetroDECK folders to other storage locations using the Configurator.")
if [[ $choice == "Never show this again" ]]; then
set_setting_value $rd_conf "low_space_warning" "false" retrodeck "options" # Store low space warning variable for future checks
fi
fi
fi
}

View file

@ -4,7 +4,7 @@ GenericName=RetroDECK Configuration Utility
Type=Application
Comment=A handy tool to change common RetroDECK settings
Icon=net.retrodeck.retrodeck
Exec=--configurator
Exec=/app/tools/configurator.sh
Terminal=false
StartupNotify=false
Keywords=multi;engine;emulator;standalone;steam;deck

View file

@ -426,6 +426,15 @@ modules:
url: https://buildbot.libretro.com/stable/1.15.0/linux/x86_64/RetroArch_cores.7z
sha256: 2230bc38eaf87406efd0c2b7bdd1cf9e813ba113505600f14a7ef9eb06f8c7c0
- name: retroarch-sameduck-core
buildsystem: simple
build-commands:
- mv sameduck_libretro.so /app/share/libretro/cores/sameduck_libretro.so
sources:
- type: archive
url: https://buildbot.libretro.com/nightly/linux/x86_64/latest/sameduck_libretro.so.zip
sha256: SAMEDUCKSHAPLACEHOLDER
- name: doom-shareware
buildsystem: simple
build-commands:

View file

@ -78,6 +78,8 @@ post_update() {
# - Move Duckstation saves and states to new locations
# - Clean up legacy tools files (Configurator is now accessible through the main ES-DE menu)
# - Move Dolphin and Primehack save folder names
# - Move PPSSPP saves/states to appropriate folders
# - Set ESDE user themes folder directly
update_rd_conf # Expand retrodeck.cfg to latest template
set_setting_value $rd_conf "screenshots_folder" "$rdhome/screenshots"
@ -163,6 +165,12 @@ post_update() {
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/JP" "/var/data/primehack/GC/JAP"
dir_prep "$saves_folder/PSP/PPSSPP-SA" "/var/config/ppsspp/PSP/SAVEDATA"
dir_prep "$states_folder/PSP/PPSSPP-SA" "/var/config/ppsspp/PSP/PPSSPP_STATE"
set_setting_value "es_settings.xml" "UserThemeDirectory" "$themes_folder" "es_settings"
unlink "/var/config/emulationstation/.emulationstation/themes"
fi
# The following commands are run every time.

View file

@ -457,6 +457,8 @@ configurator_open_emulator_dialog() {
;;
esac
configurator_open_emulator_dialog
}
configurator_retrodeck_tools_dialog() {
@ -1010,6 +1012,7 @@ configurator_about_retrodeck_dialog() {
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Credits" \
--filename="$emuconfigs/defaults/retrodeck/reference_lists/retrodeck_credits.txt"
configurator_about_retrodeck_dialog
;;
"" ) # No selection made or Back button clicked