From 17c2b5d02a5f8ae0991dcb1198719d478ecd7f31 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Tue, 25 Apr 2023 15:44:17 -0400 Subject: [PATCH] Basic changelog dialog shown at update --- functions.sh | 12 ++++++++++++ global.sh | 1 + post_update.sh | 2 ++ 3 files changed, 15 insertions(+) diff --git a/functions.sh b/functions.sh index 26a242fe..2d3da9f8 100644 --- a/functions.sh +++ b/functions.sh @@ -2288,3 +2288,15 @@ configurator_move_folder_dialog() { configurator_move_folder_dialog "$rd_dir_name" fi } + +changelog_dialog() { + # This function will pull the changelog notes from the version it is passed (which must match the appdata version tag) from the net.retrodeck.retrodeck.appdata.xml file + # USAGE: changelog_dialog "version" + + changelog=$(xmlstarlet sel -t -m "//release[@version='$1']/description" -v . -n $rd_appdata | tr -s '\n' | sed 's/^\s*//') + + zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap \ + --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ + --title "RetroDECK Changelogs" \ + --text="Welcome to RetroDECK version $1!\n\nHere are the changes that were made in this version:\n$changelog" +} diff --git a/global.sh b/global.sh index 88696114..ebd2fdd4 100755 --- a/global.sh +++ b/global.sh @@ -30,6 +30,7 @@ es_themes_list="https://gitlab.com/es-de/themes/themes-list/-/raw/master/themes. remote_network_target="https://one.one.one.one" # The URL of a common internet target for testing network access helper_files_folder="$emuconfigs/defaults/retrodeck/helper_files" # The parent folder of RetroDECK documentation files for deployment helper_files_list="$emuconfigs/defaults/retrodeck/reference_lists/helper_files_list.cfg" # The list of files to be deployed and where they go +rd_appdata="/app/share/appdata/net.retrodeck.retrodeck.appdata.xml" # The shipped appdata XML file for this version 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 diff --git a/post_update.sh b/post_update.sh index 50b8b90b..94825b6b 100644 --- a/post_update.sh +++ b/post_update.sh @@ -132,5 +132,7 @@ post_update() { --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ --title "RetroDECK Finishing Upgrade" \ --text="RetroDECK is finishing the upgrade process, please wait." + + changelog_dialog "$version" create_lock }