First steps into 0.5.0b

This commit is contained in:
xargon 2022-07-04 22:49:58 +02:00
commit 76cc9d5616
10 changed files with 176 additions and 83 deletions

View file

@ -42,17 +42,17 @@
<bool name="QuickSystemSelect" value="true" />
<bool name="RandomAddButton" value="false" />
<bool name="RunInBackground" value="false" />
<bool name="Scrape3DBoxes" value="true" />
<bool name="ScrapeBackCovers" value="true" />
<bool name="ScrapeControllers" value="true" />
<bool name="Scrape3DBoxes" value="false" />
<bool name="ScrapeBackCovers" value="false" />
<bool name="ScrapeControllers" value="false" />
<bool name="ScrapeCovers" value="true" />
<bool name="ScrapeGameNames" value="true" />
<bool name="ScrapeMarquees" value="true" />
<bool name="ScrapeMetadata" value="true" />
<bool name="ScrapePhysicalMedia" value="true" />
<bool name="ScrapePhysicalMedia" value="false" />
<bool name="ScrapeRatings" value="true" />
<bool name="ScrapeScreenshots" value="true" />
<bool name="ScrapeTitleScreens" value="true" />
<bool name="ScrapeScreenshots" value="false" />
<bool name="ScrapeTitleScreens" value="false" />
<bool name="ScrapeVideos" value="true" />
<bool name="ScraperExcludeRecursively" value="true" />
<bool name="ScraperHaltOnInvalidMedia" value="true" />

View file

@ -63,4 +63,32 @@
<nogamecount>true</nogamecount>
<nomultiscrape>true</nomultiscrape>
</game>
<game>
<path>./move-roms.sh</path>
<name>Move roms folder</name>
<desc>Move roms folder from internal to external and vice versa.</desc>
<nogamecount>true</nogamecount>
<nomultiscrape>true</nomultiscrape>
</game>
<game>
<path>./overlays.sh</path>
<name>Overlays configuration</name>
<desc>Configure or disable borders and shaders.</desc>
<nogamecount>true</nogamecount>
<nomultiscrape>true</nomultiscrape>
</game>
<game>
<path>./theme-fix.sh</path>
<name>Theme fix</name>
<desc>Clean some of the scraped data in order to beautify the new theme. This is needed if you got scraped data since v0.4.2 or earlier.</desc>
<nogamecount>true</nogamecount>
<nomultiscrape>true</nomultiscrape>
</game>
<game>
<path>./configure-emulators.sh</path>
<name>Configure Emulators</name>
<desc>Choose an emulator to configure.</desc>
<nogamecount>true</nogamecount>
<nomultiscrape>true</nomultiscrape>
</game>
</gameList>

39
global.sh Executable file
View file

@ -0,0 +1,39 @@
#!/bin/bash
# This file is containing some global function needed for the script such as the config file tools
rd_conf="/app/retrodeck/retrodeck.cfg"
conf_init() {
# initializing and reading the retrodeck config file
if [ ! -f $rd_conf ]
then # I have to initialize the variables as they cannot be red from an empty config file
touch $rd_conf
# Variables to manage: adding a variable here means adding it to conf_write()
version="$(cat /app/retrodeck/version)" # version info taken from the version file
rdhome="$HOME/retrodeck" # the retrodeck home, aka ~/retrodeck
roms_folder="$rdhome/roms" # default roms folder location (intenral)
else # i just read the variables
source $rd_conf
fi
}
conf_write() {
# writes the variables in the retrodeck config file
# TODO: this can be optimized with a while and a list of variables to check
if [ ! -z "$version" ] then #if the variable is not null then I update it
sed -i "s%version=.*%version=$version%" $rd_conf
fi
if [ ! -z "$rdhome" ] then
sed -i "s%rdhome=.*%rdhome=$rdhome%" $rd_conf
fi
if [ ! -z "$roms_folder" ] then
sed -i "s%rdhome=.*%rdhome=$roms_folder" $rd_conf
fi
}

View file

@ -43,7 +43,32 @@
<metadata_license>CC0-1.0</metadata_license>
<releases>
<release version="0.4.2b" date="2022-05-11">
<release version="0.5.0b-cooker" date="1999-12-31">
<url>https://github.com/XargonWan/RetroDECK/releases/tag/0.4.2b</url>
<description>
<p><b>Frontend:</b></p>
<ul>
<li>Theme revamp: for a proper theme visualization please run Theme fix tool in order to delete some old scraped data that breaks it.</li>
</ul>
<p><b>Backend:</b></p>
<ul>
<li>New varialbes system: now some variables such as game folder location are saved in /app/retrodeck/retrodeck.cfg.</li>
</ul>
<p><b>Known Issues:</b></p>
<ul>
<li>PCSX2: due to its limitation, the standalone PCSX2 doesn't have any way to set the hotkeys, so no save and load state, no quit button. In order to quit press: STEAM -> PCSX2 -> (X) CLOSE WINDOW, be aware that the state is not automatically saved</li>
<li>Due to a Steam limitation, external controllers and keyboard seems not to be working, expecially in the desktop mode</li>
</ul>
<p><b>IMPORTANT NOTE:</b>
At the moment the emulator configs are reset during every update, this was made because every version they may bring new configurations, please back them up if you did some manual configs.
</p>
</description>
</release>
<release version="0.4.2b" date="2022-07-01">
<url>https://github.com/XargonWan/RetroDECK/releases/tag/0.4.2b</url>
<description>
<p><b>Emulators:</b></p>

View file

@ -1158,6 +1158,9 @@ modules:
- cp retrodeck.sh /app/bin/retrodeck.sh
- chmod +x /app/bin/retrodeck.sh
- cp global.sh /app/bin/global.sh
- chmod +x /app/bin/global.sh
# Desktop entry
- cp net.retrodeck.retrodeck.desktop /app/share/applications/net.retrodeck.retrodeck.desktop
@ -1193,4 +1196,4 @@ modules:
sources:
- type: git
url: https://github.com/XargonWan/RetroDECK.git
branch: main
branch: main

View file

@ -1,10 +1,15 @@
#!/bin/bash
# Init default values, this may be overwritten by retrodeck.cfg as it sourced later with global.sh
lockfile="$HOME/retrodeck/.lock" # where the lockfile is located
version="$(cat /app/retrodeck/version)" # version info taken from the version file
rdhome="$HOME/retrodeck" # the retrodeck home, aka ~/retrodecck
emuconfigs="/app/retrodeck/emu-configs" # folder with all the default emulator configs
sdcard="/run/media/mmcblk0p1" # Steam Deck SD default path
rd_conf="/app/retrodeck/retrodeck.cfg" # RetroDECK config file path
version="$(cat /app/retrodeck/version)" # version info taken from the version file
rdhome="$HOME/retrodeck" # the retrodeck home, aka ~/retrodeck
source global.sh
# Functions area
@ -49,26 +54,6 @@ dir_prep() {
echo -e "$symlink is now $real\n"
}
cfg_init() {
# Initializing retrodeck config file
#rdconf=/var/config/retrodeck/retrodeck.cfg
# if I got a config file already I parse it
#if []
#else
# touch $rdconf
#fi
#$roms_folder > /var/config/retrodeck/retrodeck.cfg
return
}
# is_mounted() {
# # This script checks if the provided path in $1 is mounted
# mount | awk -v DIR="$1" '{if ($3 == DIR) { exit 0}} ENDFILE{exit -1}'
# }
tools_init() {
rm -rfv /var/config/retrodeck/tools/
mkdir -pv /var/config/retrodeck/tools/
@ -308,7 +293,8 @@ https://retrodeck.net
exit
;;
--version*|-v*)
cat /var/config/retrodeck/version
conf_init
echo $version
exit
;;
--reset-ra*)
@ -341,7 +327,9 @@ done
if [ -f "$lockfile" ] && [ "$(cat "$lockfile")" != "$version" ];
then
echo "Lockfile version is "$(cat "$lockfile")" but the actual version is $version"
post_update
conf_init # Initializing/reading the config file (sourced from global.sh)
post_update # Executing post update script
conf_write # Writing variables in the config file (sourced from global.sh)
start_retrodeck
exit 0
fi
@ -351,7 +339,9 @@ fi
if [ ! -f "$lockfile" ];
then
echo "Lockfile not found"
finit
conf_init # Initializing/reading the config file (sourced from global.sh)
finit # Executing First/Force init
conf_write # Writing variables in the config file (sourced from global.sh)
exit 0
fi

View file

@ -1,24 +0,0 @@
#!/bin/bash
zenity \
--icon-name=net.retrodeck.retrodeck \
--question \
--no-wrap \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK" \
--ok-label "Yes" \
--cancel-label "No" \
--text="This tool is will clean the MixImages in order to beautify the theme.\nDo you want to delete them?"
if [ $? == 0 ] #yes - Internal
then
find ~/retrodeck/.downloaded_media -name miximages -type d -print0|xargs -0 rm -rfv --
fi
zenity \
--icon-name=net.retrodeck.retrodeck \
--info \
--no-wrap \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK" \
--text="Miximages successfully cleaned, please restart RetroDECK to reload the games list."

View file

@ -6,12 +6,12 @@ then
exit 0
fi
border="$(zenity --list \
emulator="$(zenity --list \
--title "RetroDECK" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--text="Which emulator do you want to configure?" \
--hide-header \
--column=Border \
--column=emulator \
"RetroArch" \
"Citra" \
"Dolphin" \
@ -21,28 +21,28 @@ border="$(zenity --list \
"RPCS3" \
"Yuzu")"
if [ $border == "RetroArch" ]
if [ $emulator == "RetroArch" ]
then
retroarch
elif [ $border == "Citra" ]
elif [ $emulator == "Citra" ]
then
citra-qt
elif [ $border == "Dolphin" ]
elif [ $emulator == "Dolphin" ]
then
dolphin-emu
elif [ $border == "MelonDS" ]
elif [ $emulator == "MelonDS" ]
then
melonDS
elif [ $border == "PCSX2" ]
elif [ $emulator == "PCSX2" ]
then
pcsx2
elif [ $border == "PPSSPP" ]
elif [ $emulator == "PPSSPP" ]
then
PPSSPPSDL
elif [ $border == "RPCS3" ]
elif [ $emulator == "RPCS3" ]
then
rpcs3
elif [ $border == "Yuzu" ]
elif [ $emulator == "Yuzu" ]
then
yuzu
fi

View file

@ -1,29 +1,32 @@
#!/bin/bash
if [ -d ~/retrodeck/roms ] && [ -d /run/media/mmcblk0p1/retrodeck/roms ]
then # found both internal and sd folders
zenity --title "RetroDECK" --warning --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --text="I found a roms folder both in internal and SD Card,\nin order to make this tool useful you should remove one of the two or merge them."
source global.sh
zenity --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --cancel-label="Quit" --ok-label "Continue" --text="WARNING: this script is experimental\nplease be sure to backup your data before continuing.\n\nDo you want to continue?"
if [ $? == 1 ] #cancel
then
exit 0
fi
if [ -d ~/retrodeck/roms ] && [ ! -d /run/media/mmcblk0p1/retrodeck/roms ]
then # found internal folder and not the external
roms_path=~/retrodeck
new_roms_path=/run/media/mmcblk0p1/retrodeck
conf_init
zenity --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --cancel-label="Cancel" --ok-label "Browse" --text="The roms folder is now: $roms_folder\nplease select the new location.\nA retrodeck/roms folder will be created starting from the directory that you selected."
if [ $? == 1 ] #cancel
then
exit 0
fi
if [ ! -d ~/retrodeck/roms ] && [ -d /run/media/mmcblk0p1/retrodeck/roms ]
then # found external folder and not the internal
roms_path=/run/media/mmcblk0p1/retrodeck
new_roms_path=~/retrodeck
fi
new_roms_path="$(zenity --file-selection --title="Choose a new roms folder location" --directory)"/retrodeck/roms
zenity --title "RetroDECK" --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --text="Should I move the roms from\n\n$roms_path/roms\n\nto\n\n$new_roms_path/roms?"
zenity --title "RetroDECK" --question --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --text="Should I move the roms from\n\n$roms_folder\n\nto\n\n$new_roms_path?"
if [ $? == 0 ] #yes
then
mkdir -p $new_roms_path
mv -f $roms_path/roms $new_roms_path/roms
mv -f $roms_folder $new_roms_path
rm -f /var/config/emulationstation/ROMs
ln -s $new_roms_path/roms /var/config/emulationstation/ROMs
rm -f $roms_path/roms
ln -s $new_roms_path /var/config/emulationstation/ROMs
rm -f $roms_folder
zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --title "RetroDECK" --text="Done\nYour roms are now located in:\n\n$roms_folder\n\nPress OK to continue."
$roms_folder=$new_roms_path # Updating variable
conf_write # Writing variables in the config file (sourced from global.sh)
fi

29
tools/theme-fix.sh Normal file
View file

@ -0,0 +1,29 @@
#!/bin/bash
zenity \
--icon-name=net.retrodeck.retrodeck \
--question \
--no-wrap \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK" \
--ok-label "Yes" \
--cancel-label "No" \
--text="This tool is will clean some unuseful scraped data in order to beautify the theme.\nDo you want to delete them?"
if [ $? == 0 ] #yes - Internal
then
find ~/retrodeck/.downloaded_media -name miximages -type d -print0|xargs -0 rm -rfv --
find ~/retrodeck/.downloaded_media -name 3dboxes -type d -print0|xargs -0 rm -rfv --
find ~/retrodeck/.downloaded_media -name titlescreens -type d -print0|xargs -0 rm -rfv --
find ~/retrodeck/.downloaded_media -name backcovers -type d -print0|xargs -0 rm -rfv --
find ~/retrodeck/.downloaded_media -namephysicalmedia -type d -print0|xargs -0 rm -rfv --
find ~/retrodeck/.downloaded_media -namescreenshots -type d -print0|xargs -0 rm -rfv --
fi
zenity \
--icon-name=net.retrodeck.retrodeck \
--info \
--no-wrap \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK" \
--text="Scraped data is now cleaned, please restart RetroDECK to reload the games list."