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

Cooker 0.7.0b icenine451
This commit is contained in:
icenine451 2023-05-16 15:11:49 -04:00 committed by GitHub
commit 26c4fa5777
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 101 additions and 54 deletions

View file

@ -18,7 +18,7 @@ EnableWideScreenPatches = false
EnableNoInterlacingPatches = false
EnableRecordingTools = true
EnableGameFixes = true
SaveStateOnShutdown = true
SaveStateOnShutdown = false
ConsoleToStdio = false
HostFs = false
PatchBios = false

View file

@ -4,5 +4,6 @@ defaults_file^$emuconfigs/duckstation/settings.ini
change^cheevos^Enabled^true^Cheevos
change^cheevos^Username^$cheevos_username^Cheevos
change^cheevos^Token^$cheevos_token^Cheevos
change^cheevos^LoginTimestamp^$cheevos_login_timestamp
change^cheevos_hardcore^ChallengeMode^true
change^cheevos^LoginTimestamp^$cheevos_login_timestamp^Cheevos
change^cheevos_hardcore^ChallengeMode^true^Cheevos
change^savestate_auto_save^SaveStateOnExit^true^Main

View file

@ -8,4 +8,4 @@ change^borders^overlay_file^/var/config/retroarch/overlays/borders/snes.cfg # Th
OTHER NOTES:
- The name of the presets configuration file for any given system MUST be <system name>_presets.cfg
- The <system name> is whatever name is given to this system in retrodeck.cfg, it is not tied to the actual emulator name.
- Whatever name is given to a system in retrodeck.cfg is how it will appear in the dialogs, so make it look nice. It also must match exactly in any preset sections it appears in!
- The name given to the system in retrodeck.cfg will be translated to a "nice looking" format for user dialogs through the file at emu-configs/defaults/retrodeck/reference_lists/pretty_system_names.cfg but will be used internally as-is

View file

@ -1,7 +1,7 @@
config_file_format^retroarch
target_file^/var/config/retroarch/config/Genesis Plus GX/genesis.cfg
defaults_file^$emuconfigs/retroarch/retroarch.cfg
change^borders^input_overlay^input_overlay^/var/config/retroarch/overlays/borders/pegasus/genesis.cfg
change^borders^input_overlay^/var/config/retroarch/overlays/borders/pegasus/genesis.cfg
change^borders^input_overlay_aspect_adjust_landscape^0.100000
change^borders^input_overlay_enable^true
change^borders^input_overlay_scale_landscape^1.040000

View file

@ -4,5 +4,6 @@ defaults_file^$emuconfigs/PCSX2/PCSX2.ini
change^cheevos^Enabled^true^Achievements
change^cheevos^Username^$cheevos_username^Achievements
change^cheevos^Token^$cheevos_token^Achievements
change^cheevos^LoginTimestamp^$cheevos_login_timestamp
change^cheevos_hardcore^ChallengeMode^true
change^cheevos^LoginTimestamp^$cheevos_login_timestamp^Achievements
change^cheevos_hardcore^ChallengeMode^true^Achievements
change^savestate_auto_save^SaveStateOnShutdown^true^EmuCore

View file

@ -5,3 +5,5 @@ change^cheevos^cheevos_enable^true
change^cheevos^cheevos_token^$cheevos_token
change^cheevos^cheevos_username^$cheevos_username
change^cheevos_hardcore^cheevos_hardcore_mode_enable^true
change^savestate_auto_load^savestate_auto_load^true
change^savestate_auto_save^savestate_auto_save^true

View file

@ -1,3 +1,2 @@
false^RPCS3 Firmware Install^Install firmware needed for PS3 emulation^rpcs3_firmware
false^RetroDECK Controller Profile^Install custom RetroDECK controller profile^rd_controller_profile
false^RetroDECK Prepackaged Games^Install freely availble games that are packaged with RetroDECK^rd_prepacks

View file

@ -60,3 +60,11 @@ gba=false
gbc=false
n64=false
snes=false
[savestate_auto_load]
retroarch=true
[savestate_auto_save]
duckstation=true
pcsx2=true
retroarch=true

View file

@ -10,7 +10,7 @@ StartPaused = false
StartFullscreen = false
PauseOnFocusLoss = true
PauseOnMenu = true
SaveStateOnExit = true
SaveStateOnExit = false
ConfirmPowerOff = true
LoadDevicesFromSaveStates = true
ApplyGameSettings = true

View file

@ -3090,8 +3090,8 @@ save_file_compression = "false"
savefile_directory = "RETRODECKHOMEDIR/saves"
savefiles_in_content_dir = "false"
savestate_auto_index = "false"
savestate_auto_load = "true"
savestate_auto_save = "true"
savestate_auto_load = "false"
savestate_auto_save = "false"
savestate_directory = "RETRODECKHOMEDIR/states"
savestate_file_compression = "true"
savestate_max_keep = "0"

View file

@ -160,7 +160,7 @@ changelog_dialog() {
# USAGE: changelog_dialog "version"
if [[ "$1" == "all" ]]; then
xmlstarlet sel -t -m "//release" -v "concat('RetroDECK version: ', @version)" -n -v "description" -n $rd_appdata | awk '{$1=$1;print}' | sed -e '/./b' -e :n -e 'N;s/\n$//;tn' > "/var/config/retrodeck/changelog.txt"
xml sel -t -m "//release" -v "concat('RetroDECK version: ', @version)" -n -v "description" -n $rd_appdata | awk '{$1=$1;print}' | sed -e '/./b' -e :n -e 'N;s/\n$//;tn' > "/var/config/retrodeck/changelog.txt"
zenity --icon-name=net.retrodeck.retrodeck --text-info --width=1200 --height=720 \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \

View file

@ -49,7 +49,6 @@ pretty_system_names_reference_list="$emuconfigs/defaults/retrodeck/reference_lis
# Config files for emulators with single config files
cemuconf="/var/config/Cemu/settings.xml"
citraconf="/var/config/citra-emu/qt-config.ini"
duckstationconf="/var/config/duckstation/settings.ini"
melondsconf="/var/config/melonDS/melonDS.ini"
@ -67,6 +66,11 @@ es_settings="/var/config/emulationstation/.emulationstation/es_settings.xml"
raconf="/var/config/retroarch/retroarch.cfg"
ra_core_conf="/var/config/retroarch/retroarch-core-options.cfg"
# CEMU config files
cemuconf="/var/config/Cemu/settings.xml"
cemucontrollerconf="/var/config/Cemu/controllerProfiles/controller0.xml"
# Dolphin config files
dolphinconf="/var/config/dolphin-emu/Dolphin.ini"

View file

@ -45,6 +45,14 @@ set_setting_value() {
fi
;;
"cemu" )
if [[ -z "$current_section_name" ]]; then
xml ed -L -u "//$setting_name_to_change" -v "$setting_value_to_change" "$1"
else
xml ed -L -u "//$current_section_name/$setting_name_to_change" -v "$setting_value_to_change" "$1"
fi
;;
"es_settings" )
sed -i 's^'"$setting_name_to_change"'" value=".*"^'"$setting_name_to_change"'" value="'"$setting_value_to_change"'"^' $1
;;
@ -116,6 +124,14 @@ get_setting_value() {
fi
;;
"cemu" )
if [[ -z "$current_section_name" ]]; then
echo $(xml sel -t -v "//$current_setting_name" $1)
else
echo $(xml sel -t -v "//$current_section_name/$current_setting_name" $1)
fi
;;
"es_settings" )
echo $(grep -o -P "(?<=$current_setting_name\" value=\").*(?=\")" $1)
;;
@ -135,12 +151,12 @@ add_setting_line() {
* )
if [[ -z $current_section_name ]]; then
if [[ -f "$1" ]]; then
sed -i '$ a '"$current_setting_line"'' $1
sed -i '$ a '"$current_setting_line"'' "$1"
else # If the file doesn't exist, sed add doesn't work for the first line
echo "$current_setting_line" > $1
fi
else
sed -i '/^\s*?\['"$current_section_name"'\]|\b'"$current_section_name"':$/a '"$current_setting_line"'' $1
sed -i '/^\s*?\['"$current_section_name"'\]|\b'"$current_section_name"':$/a '"$current_setting_line"'' "$1"
fi
;;
@ -159,9 +175,9 @@ add_setting() {
"retroarch" )
if [[ -z $current_section_name ]]; then
sed -i '$ a '"$current_setting_name"' = "'"$current_setting_value"'"' $1
sed -i '$ a '"$current_setting_name"' = "'"$current_setting_value"'"' "$1"
else
sed -i '/^\s*?\['"$current_section_name"'\]|\b'"$current_section_name"':$/a '"$current_setting_name"' = "'"$current_setting_value"'"' $1
sed -i '/^\s*?\['"$current_section_name"'\]|\b'"$current_section_name"':$/a '"$current_setting_name"' = "'"$current_setting_value"'"' "$1"
fi
;;
@ -198,9 +214,9 @@ disable_setting() {
* )
if [[ -z $current_section_name ]]; then
sed -i -E 's^(\s*?)'"$current_setting_line"'^\1#'"$current_setting_line"'^' $1
sed -i -E 's^(\s*?)'"$current_setting_line"'^\1#'"$current_setting_line"'^' "$1"
else
sed -i -E '\^\['"$current_section_name"'\]|\b'"$current_section_name"':$^,\^\s*?'"$current_setting_line"'^s^(\s*?)'"$current_setting_line"'^\1#'"$current_setting_line"'^' $1
sed -i -E '\^\['"$current_section_name"'\]|\b'"$current_section_name"':$^,\^\s*?'"$current_setting_line"'^s^(\s*?)'"$current_setting_line"'^\1#'"$current_setting_line"'^' "$1"
fi
;;
@ -218,9 +234,9 @@ enable_setting() {
* )
if [[ -z $current_section_name ]]; then
sed -i -E 's^(\s*?)#'"$current_setting_line"'^\1'"$current_setting_line"'^' $1
sed -i -E 's^(\s*?)#'"$current_setting_line"'^\1'"$current_setting_line"'^' "$1"
else
sed -i -E '\^\['"$current_section_name"'\]|\b'"$current_section_name"':$^,\^\s*?#'"$current_setting_line"'^s^(\s*?)#'"$current_setting_line"'^\1'"$current_setting_line"'^' $1
sed -i -E '\^\['"$current_section_name"'\]|\b'"$current_section_name"':$^,\^\s*?#'"$current_setting_line"'^s^(\s*?)#'"$current_setting_line"'^\1'"$current_setting_line"'^' "$1"
fi
;;
@ -232,7 +248,7 @@ disable_file() {
# USAGE: disable_file $file_name
# NOTE: $filename can be a defined variable from global.sh or must have the full path to the file
mv $(realpath $1) $(realpath $1).disabled
mv "$(realpath "$1")" "$(realpath "$1")".disabled
}
enable_file() {
@ -240,7 +256,7 @@ enable_file() {
# USAGE: enable_file $file_name
# NOTE: $filename can be a defined variable from global.sh or must have the full path to the file and should not have ".disabled" as a suffix
mv $(realpath $1.disabled) $(realpath $(echo $1 | sed -e 's/\.disabled//'))
mv "$(realpath "$1".disabled)" "$(realpath "$(echo "$1" | sed -e 's/\.disabled//')")"
}
generate_single_patch() {

View file

@ -82,6 +82,8 @@ post_update() {
# - Move Dolphin and Primehack save folder names
# - Move PPSSPP saves/states to appropriate folders
# - Set ESDE user themes folder directly
# - Disable auto-save/load in RA / PCSX2 / Duckstation for proper preset functionality
# - Init Cemu as it is a new emulator
update_rd_conf # Expand retrodeck.cfg to latest template
set_setting_value $rd_conf "screenshots_folder" "$rdhome/screenshots"
@ -184,6 +186,13 @@ post_update() {
unlink "/var/config/emulationstation/ROMs"
unlink "/var/config/emulationstation/.emulationstation/downloaded_media"
unlink "/var/config/emulationstation/.emulationstation/themes"
set_setting_value "$raconf" "savestate_auto_load" "false" "retroarch"
set_setting_value "$raconf" "savestate_auto_save" "false" "retroarch"
set_setting_value "$pcsx2conf" "SaveStateOnShutdown" "false" "pcsx2" "EmuCore"
set_setting_value "$duckstationconf" "SaveStateOnExit" "false" "duckstation" "Main"
prepare_emulator "reset" "cemu"
fi
# The following commands are run every time.

View file

@ -136,21 +136,28 @@ prepare_emulator() {
echo "----------------------"
echo "Initializing CEMU"
echo "----------------------"
rm -rf /var/config/Cemu
mkdir -pv /var/config/Cemu/
cp -fr "$emuconfigs/cemu/"* /var/config/Cemu/
#TODO : set_setting_value for Cemu and multi_user
sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/Cemu/settings.xml
dir_prep "$rdhome/saves/wiiu/cemu" "$rdhome/bios/cemu/usr/save"
if [[ $multi_user_mode == "true" ]]; then # Multi-user actions
rm -rf "$multi_user_data_folder/$SteamAppUser/config/Cemu"
mkdir -p "$multi_user_data_folder/$SteamAppUser/config/Cemu"
cp -fr "$emuconfigs/cemu/"* "$multi_user_data_folder/$SteamAppUser/config/Cemu/"
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/Cemu/settings.ini" "mlc_path" "$bios_folder/cemu" "cemu"
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/Cemu/settings.ini" "Entry" "$roms_folder/wiiu" "cemu" "GamePaths"
dir_prep "$multi_user_data_folder/$SteamAppUser/config/Cemu" "/var/config/Cemu"
else
rm -rf /var/config/Cemu
mkdir -pv /var/config/Cemu/
cp -fr "$emuconfigs/cemu/"* /var/config/Cemu/
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/Cemu/settings.ini" "mlc_path" "$bios_folder/cemu" "cemu"
set_setting_value "$multi_user_data_folder/$SteamAppUser/config/Cemu/settings.ini" "Entry" "$roms_folder/wiiu" "cemu" "GamePaths"
fi
# Shared actions
dir_prep "$saves_folder/wiiu/cemu" "$bios_folder/cemu/usr/save"
fi
if [[ "$action" == "reset" ]] || [[ "$action" == "postmove" ]]; then # Run commands that apply to both resets and moves
#TODO : set_setting_value for Cemu and multi_user
sed -i 's#RETRODECKHOMEDIR#'$rdhome'#g' /var/config/Cemu/settings.xml
dir_prep "$rdhome/saves/wiiu/cemu" "$rdhome/bios/cemu/usr/save"
if [[ "$action" == "postmove" ]]; then # Run commands that apply to both resets and moves
set_setting_value "$cemuconf" "mlc_path" "$bios_folder/cemu" "cemu"
set_setting_value "$cemuconf" "Entry" "$roms_folder/wiiu" "cemu" "GamePaths"
dir_prep "$saves_folder/wiiu/cemu" "$bios_folder/cemu/usr/save"
fi
# if [[ "$action" == "postmove" ]]; then # Run only post-move commands
# fi
fi
if [[ "$emulator" =~ ^(citra|citra-emu|Citra|all)$ ]]; then

View file

@ -119,15 +119,15 @@ build_preset_config() {
eval new_setting_value=$new_setting_value
fi
if [[ "$read_config_format" == "retroarch" ]]; then # If this is a RetroArch core, generate the override file
if [[ -z $(grep "$read_setting_name" "$read_target_file") ]]; then
if [[ ! -f "$read_target_file" ]]; then
mkdir -p "$(realpath $(dirname "$read_target_file"))"
echo "$read_setting_name = ""$new_setting_value""" > "$read_target_file"
else
add_setting "$read_target_file" "$read_setting_name" "$new_setting_value" "$read_config_format" "$section"
fi
if [[ ! -f "$read_target_file" ]]; then
mkdir -p "$(realpath "$(dirname "$read_target_file")")"
echo "$read_setting_name = \""$new_setting_value"\"" > "$read_target_file"
else
set_setting_value "$read_target_file" "$read_setting_name" "$new_setting_value" "$read_config_format" "$section"
if [[ -z $(grep "$read_setting_name" "$read_target_file") ]]; then
add_setting "$read_target_file" "$read_setting_name" "$new_setting_value" "$read_config_format" "$section"
else
set_setting_value "$read_target_file" "$read_setting_name" "$new_setting_value" "$read_config_format" "$section"
fi
fi
else
if [[ "$read_config_format" == "retroarch-all" ]]; then
@ -142,8 +142,8 @@ build_preset_config() {
if [[ -z $(cat "$read_target_file") ]]; then # If the override file is empty
rm -f "$read_target_file"
fi
if [[ -z $(ls -1 $(dirname "$read_target_file")) ]]; then # If the override folder is empty
rmdir "$(dirname $read_target_file)"
if [[ -z $(ls -1 "$(dirname "$read_target_file")") ]]; then # If the override folder is empty
rmdir "$(realpath "$(dirname "$read_target_file")")"
fi
fi
else

View file

@ -11,11 +11,11 @@ source /app/libexec/global.sh
# Welcome
# - Presets & Settings
# - Global: Presets & Settings
# - Enable/Disable borders
# - Enable/Disable widescreen
# - Log in to RetroAchievements
# - Enable/Disable RetroAchievements Hardcore Mode
# - RetroArch: Presets & Settings
# - Enable/Disable borders
# - Enable/Disable Rewind Setting
# - Wii & GameCube: Presets & Settings
# - Dolphin Textures: Universal Dynamic Input
@ -176,7 +176,6 @@ configurator_global_presets_and_settings_dialog() {
choice=$(zenity --list --title="RetroDECK Configurator Utility - Global: Presets & Settings" --cancel-label="Back" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
--column="Choice" --column="Action" \
"Enable/Disable Borders" "Enable or disable borders in supported systems" \
"Enable/Disable Widescreen" "Enable or disable widescreen in supported systems" \
"RetroAchievements Login" "Log into the RetroAchievements service in supported systems" \
"RetroAchievements Logout" "Disable RetroAchievements service in supported systems" \
@ -185,11 +184,6 @@ configurator_global_presets_and_settings_dialog() {
case $choice in
"Enable/Disable Borders" )
change_preset_dialog "borders"
configurator_global_presets_and_settings_dialog
;;
"Enable/Disable Widescreen" )
change_preset_dialog "widescreen"
configurator_global_presets_and_settings_dialog
@ -233,10 +227,16 @@ configurator_retroarch_presets_and_settings_dialog() {
choice=$(zenity --list --title="RetroDECK Configurator Utility - RetroArch: Presets & Settings" --cancel-label="Back" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --width=1200 --height=720 \
--column="Choice" --column="Action" \
"Enable/Disable Borders" "Enable or disable borders in supported systems" \
"Enable/Disable Rewind" "Enable or disable the Rewind function in RetroArch." )
case $choice in
"Enable/Disable Borders" )
change_preset_dialog "borders"
configurator_retroarch_presets_and_settings_dialog
;;
"Enable/Disable Rewind" )
configurator_retroarch_rewind_dialog
;;
@ -1045,7 +1045,7 @@ configurator_about_retrodeck_dialog() {
}
configurator_version_history_dialog() {
local version_array=($(xmlstarlet sel -t -v '//component/releases/release/@version' -n $rd_appdata))
local version_array=($(xml sel -t -v '//component/releases/release/@version' -n $rd_appdata))
local all_versions_list=()
for rd_version in ${version_array[*]}; do