Merge pull request #502 from fewtarius/dev

Revert.
This commit is contained in:
fewtarius 2022-09-13 20:33:52 -04:00 committed by GitHub
commit 6808b55307
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 53 additions and 75 deletions

View file

@ -13,8 +13,6 @@ source /usr/bin/env.sh
source /etc/profile source /etc/profile
rp_registerAllModules rp_registerAllModules
stop_ui
joy2keyStart joy2keyStart
clear >/dev/console clear >/dev/console
@ -70,5 +68,5 @@ do
done done
echo "Restarting EmulationStation...\n" >/dev/console echo "Restarting EmulationStation...\n" >/dev/console
echo "Restarting EmulationStation..." >> /tmp/logs/dosbox_scan.log echo "Restarting EmulationStation..." >> /tmp/logs/dosbox_scan.log
start_ui systemctl restart ${UI_SERVICE}
clear >/dev/console clear >/dev/console

View file

@ -25,7 +25,6 @@ SUPPORTED_GRP=(
"PLATOONL.DAT" "PLATOONL.DAT"
) )
stop_ui
clear >/dev/console clear >/dev/console
echo "Scanning for games..." >/dev/console echo "Scanning for games..." >/dev/console
find_names=() find_names=()
@ -64,5 +63,5 @@ while read -r grp_file; do
-- end -- -- end --
EOM EOM
done <<<"${grp_files}" done <<<"${grp_files}"
systemctl restart ${UI_SERVICE}
clear >/dev/console clear >/dev/console
start_ui

View file

@ -5,11 +5,11 @@
# Copyright (C) 2020-present Fewtarius # Copyright (C) 2020-present Fewtarius
. /etc/profile . /etc/profile
stop_ui
clear >/dev/console clear >/dev/console
echo "Scanning for games..." >/dev/console echo "Scanning for games..." >/dev/console
bash /usr/bin/start_scummvm.sh add >/dev/console bash /usr/bin/start_scummvm.sh add >/dev/console
echo "Adding games..." >/dev/console echo "Adding games..." >/dev/console
bash /usr/bin/start_scummvm.sh create >/dev/console bash /usr/bin/start_scummvm.sh create >/dev/console
systemctl restart ${UI_SERVICE}
clear >/dev/console clear >/dev/console
start_ui

View file

@ -7,7 +7,6 @@
QUAKEPATH="/storage/roms/quake" QUAKEPATH="/storage/roms/quake"
stop_ui
clear >/dev/console clear >/dev/console
echo "Scanning for games..." >/dev/console echo "Scanning for games..." >/dev/console
pak_files=$(find "${QUAKEPATH}" -mindepth 1 -type f -iname pak0.pak) pak_files=$(find "${QUAKEPATH}" -mindepth 1 -type f -iname pak0.pak)
@ -31,5 +30,5 @@ while read -r pak_file; do
-- end -- -- end --
EOM EOM
done <<<"${pak_files}" done <<<"${pak_files}"
start_ui systemctl restart ${UI_SERVICE}
clear >/dev/console clear >/dev/console

View file

@ -4,13 +4,15 @@
. /etc/os-release . /etc/os-release
export PATH="/usr/bin:/usr/local/bin:/storage/bin:${PATH}" export PATH="$PATH:/usr/local/bin:/usr/bin:/storage/bin"
export SDL_GAMECONTROLLERCONFIG_FILE="/storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt" export SDL_GAMECONTROLLERCONFIG_FILE="/storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt"
J_DIR="/storage/.config/system" J_DIR="/storage/.config/system"
J_CONF="${J_DIR}/configs/system.cfg" J_CONF="${J_DIR}/configs/system.cfg"
ES_CONF="/storage/.emulationstation/es_settings.cfg" ES_CONF="/storage/.emulationstation/es_settings.cfg"
JSLISTENCONF="${J_DIR}/configs/jslisten.cfg" EE_DEVICE=${HW_DEVICE}
JSLISTENCONF="/storage/.config/system/configs/jslisten.cfg"
get_setting() { get_setting() {
if [ ! -z "${3}" ] if [ ! -z "${3}" ]
@ -64,6 +66,7 @@ get_es_setting() {
} }
check_bios() { check_bios() {
PLATFORM="${1}" PLATFORM="${1}"
CORE="${2}" CORE="${2}"
EMULATOR="${3}" EMULATOR="${3}"
@ -77,6 +80,7 @@ check_bios() {
MISSINGBIOS="$(batocera-systems --strictfilter ${PLATFORM})" MISSINGBIOS="$(batocera-systems --strictfilter ${PLATFORM})"
if [ "$?" == "2" ]; then if [ "$?" == "2" ]; then
# formating so it looks nice :) # formating so it looks nice :)
PLATFORMNAME="${MISSINGBIOS##*>}" # read from -P onwards PLATFORMNAME="${MISSINGBIOS##*>}" # read from -P onwards
PLATFORMNAME="${PLATFORMNAME%%MISSING*}" # until a space is found PLATFORMNAME="${PLATFORMNAME%%MISSING*}" # until a space is found
@ -102,21 +106,3 @@ check_bios() {
. $config . $config
fi fi
done done
stop_ui() {
if [ "${UI_SERVICE}" = "weston.service" ]
then
chvt 2
else
systemctl stop ${UI_SERVICE}
fi
}
start_ui() {
if [ "${UI_SERVICE}" = "weston.service" ]
then
chvt 1
else
systemctl start ${UI_SERVICE}
fi
}

View file

@ -69,9 +69,6 @@ done
### Safe to make changes below this line. ### Safe to make changes below this line.
# Default modules need to be updated to use the new stop/start ui function.
rsync -av /usr/config/modules/*sh /storage/.config/modules/
# Swap es_input back to a writeable file so external controller configuration works properly. # Swap es_input back to a writeable file so external controller configuration works properly.
if [ -L "/storage/.config/emulationstation/es_input.cfg" ] if [ -L "/storage/.config/emulationstation/es_input.cfg" ]
then then

View file

@ -4,8 +4,6 @@
# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert) # Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)
# Copyright (C) 2020 Fewtarius (https://github.com/fewtarius) # Copyright (C) 2020 Fewtarius (https://github.com/fewtarius)
. /etc/profile
# NOTE: to customize your backups, create a backuptool.conf file in # NOTE: to customize your backups, create a backuptool.conf file in
# /storage/.config like this: # /storage/.config like this:
@ -51,9 +49,9 @@ fi
case "${1}" in case "${1}" in
"restore") "restore")
stop_ui systemctl stop ${UI_SERVICE}
unzip -o ${BACKUPFILE} -d / unzip -o ${BACKUPFILE} -d /
start_ui systemctl start ${UI_SERVICE}
;; ;;
"backup") "backup")
if [ -f ${BACKUPFILE} ] if [ -f ${BACKUPFILE} ]
@ -63,9 +61,9 @@ case "${1}" in
mv ${BACKUPFILE} "${BACKUPFOLDER}/${ARCHIVEFILENAME}" mv ${BACKUPFILE} "${BACKUPFOLDER}/${ARCHIVEFILENAME}"
fi fi
[ -f "${BACKUPFILE}" ] && rm "${BACKUPFILE}" [ -f "${BACKUPFILE}" ] && rm "${BACKUPFILE}"
[ -z "$2" ] && stop_ui [ -z "$2" ] && systemctl stop ${UI_SERVICE}
zip -9 -r ${BACKUPFILE} \ zip -9 -r ${BACKUPFILE} \
${COMPRESSLOCATIONS[@]} ${COMPRESSLOCATIONS[@]}
[ -z "${2}" ] && start_ui [ -z "${2}" ] && systemctl start ${UI_SERVICE}
;; ;;
esac esac

View file

@ -10,7 +10,7 @@ case "${1}" in
cp -rf /usr/config/retroarch/retroarch.cfg /storage/.config/retroarch/retroarch.cfg cp -rf /usr/config/retroarch/retroarch.cfg /storage/.config/retroarch/retroarch.cfg
;; ;;
"ALL") "ALL")
stop_ui systemctl stop ${UI_SERVICE}
cd / cd /
find /storage -mindepth 1 \( ! -regex '^/storage/.update.*' -a ! -regex '^/storage/roms.*' \) -delete find /storage -mindepth 1 \( ! -regex '^/storage/.update.*' -a ! -regex '^/storage/roms.*' \) -delete
mkdir /storage/.config/ mkdir /storage/.config/

View file

@ -68,11 +68,12 @@ update_es_folders() {
fi fi
done done
} }
stop_ui systemctl stop ${UI_SERVICE}
# check the external folders first # check the external folders first
update_es_folders "external" "${EXT_ROM_FOLDERS}" "${ES_LIST}" update_es_folders "external" "${EXT_ROM_FOLDERS}" "${ES_LIST}"
# next check the local folders # next check the local folders
# if there are duplicate folders in EXTERNAL, LOCAL ones will take preference # if there are duplicate folders in EXTERNAL, LOCAL ones will take preference
update_es_folders "local" "${LOCAL_ROM_FOLDERS}" "${ES_LIST}" update_es_folders "local" "${LOCAL_ROM_FOLDERS}" "${ES_LIST}"
start_ui
systemctl start ${UI_SERVICE}

View file

@ -48,12 +48,12 @@ check_space() {
NEEDED=$(( (${REQUIRED} - ${MYSIZE} ) / 1024 )) NEEDED=$(( (${REQUIRED} - ${MYSIZE} ) / 1024 ))
echo -e "There is not enough free space available ${VOLNAME} to install this update. Free up an additional ${NEEDED}MB, or reflash the newer version." >/dev/console echo -e "There is not enough free space available ${VOLNAME} to install this update. Free up an additional ${NEEDED}MB, or reflash the newer version." >/dev/console
echo "Exiting in 5 seconds..." >/dev/console && sleep 5 echo "Exiting in 5 seconds..." >/dev/console && sleep 5
start_ui systemctl start ${UI_SERVICE} &
exit 1 exit 1
fi fi
} }
stop_ui systemctl stop ${UI_SERVICE}
clear >/dev/console clear >/dev/console
ONLINE_STATUS=$(check_network) ONLINE_STATUS=$(check_network)
@ -61,7 +61,7 @@ if [ ! "${ONLINE_STATUS}" == true ]
then then
echo "System not online, cannot continue..." >/dev/console echo "System not online, cannot continue..." >/dev/console
echo "Exiting in 5 seconds..." >/dev/console && sleep 5 echo "Exiting in 5 seconds..." >/dev/console && sleep 5
start_ui systemctl start ${UI_SERVICE} &
exit 0 exit 0
fi fi
@ -78,7 +78,7 @@ if [ "${OS_VERSION}" -ge "${LATEST_RELEASE_TAG}" ] && [ ! "${FORCE}" = "1" ]
then then
echo "No new updates are available..." >/dev/console echo "No new updates are available..." >/dev/console
echo "Exiting in 5 seconds..." >/dev/console && sleep 5 echo "Exiting in 5 seconds..." >/dev/console && sleep 5
start_ui systemctl start ${UI_SERVICE} &
exit 0 exit 0
fi fi
@ -98,7 +98,7 @@ then
rm -f ${UPDATE_PATH}/* rm -f ${UPDATE_PATH}/*
sleep 5 sleep 5
clear >/dev/console clear >/dev/console
start_ui systemctl start ${UI_SERVICE}
exit 1 exit 1
else else
echo "Verification successful..." >/dev/console echo "Verification successful..." >/dev/console

View file

@ -7,8 +7,8 @@
. /etc/profile . /etc/profile
source /usr/bin/env.sh source /usr/bin/env.sh
clear >/dev/console clear >/dev/console
stop_ui systemctl stop ${UI_SERVICE}
echo "Cleaning ._ files from /storage/roms" >/dev/console echo "Cleaning ._ files from /storage/roms" >/dev/console
find /storage/roms -iname '._*' -exec rm -rf {} \; find /storage/roms -iname '._*' -exec rm -rf {} \;
clear >/dev/console clear >/dev/console
start_ui systemctl start ${UI_SERVICE}