Merge pull request #505 from fewtarius/dev
Work to use a common mechanism that functions in weston and when weston is not present.
This commit is contained in:
commit
5827b29711
29 changed files with 213 additions and 135 deletions
|
@ -9,17 +9,16 @@ echo -e $(date -u)" - Script started.\n" >> /tmp/logs/dosbox_scan.log
|
|||
|
||||
EE_DEVICE=$(cat /ee_arch)
|
||||
|
||||
source /usr/bin/env.sh
|
||||
source /etc/profile
|
||||
rp_registerAllModules
|
||||
|
||||
joy2keyStart
|
||||
clear >/dev/console
|
||||
clear
|
||||
|
||||
#rm "/storage/.config/dosbox/games/*.conf"
|
||||
|
||||
function create_launcher() {
|
||||
echo "\nAdding $2..." >/dev/console
|
||||
echo "\nAdding $2..."
|
||||
launcher_name="$1 ($2)"
|
||||
cp /storage/.config/dosbox/dosbox-SDL2.conf "/storage/.config/dosbox/games/$launcher_name.conf"
|
||||
cat <<EOF >> "/storage/.config/dosbox/games/$launcher_name.conf"
|
||||
|
@ -30,17 +29,17 @@ exit
|
|||
EOF
|
||||
}
|
||||
|
||||
echo "Scanning for games...\n" >/dev/console
|
||||
echo "Scanning for games...\n"
|
||||
|
||||
OIFS="$IFS"
|
||||
IFS=$'\n'
|
||||
for data_dir in $(find /storage/roms/pc/ -type d -name "*")
|
||||
do
|
||||
echo "Testing (dir) $data_dir" >/dev/console
|
||||
echo "Testing (dir) $data_dir"
|
||||
if [ -d "$data_dir" ]; then
|
||||
for executable in $(find "$data_dir" -iname "*.exe")
|
||||
do
|
||||
echo "Testing (exe) $executable" >/dev/console
|
||||
echo "Testing (exe) $executable"
|
||||
executable_case="$(basename "$executable" | tr '[:lower:]' '[:upper:]')"
|
||||
echo "Case $executable" >> /tmp/logs/dosbox_scan.log
|
||||
case "$executable_case" in
|
||||
|
@ -66,7 +65,6 @@ do
|
|||
done
|
||||
fi
|
||||
done
|
||||
echo "Restarting EmulationStation...\n" >/dev/console
|
||||
echo "Restarting EmulationStation...\n"
|
||||
echo "Restarting EmulationStation..." >> /tmp/logs/dosbox_scan.log
|
||||
systemctl restart ${UI_SERVICE}
|
||||
clear >/dev/console
|
||||
clear
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
if [ ! -d "/storage/.config/drastic" ]; then
|
||||
|
||||
echo "Drastic emulator not installed." >/dev/console 2>&1
|
||||
echo "Please install through the Jelos Add Ons tool." >/dev/console 2>&1
|
||||
echo "Drastic emulator not installed." 2>&1
|
||||
echo "Please install through the Jelos Add Ons tool." 2>&1
|
||||
|
||||
sleep 5
|
||||
clear >/dev/console
|
||||
clear
|
||||
|
||||
else
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ SUPPORTED_GRP=(
|
|||
"PLATOONL.DAT"
|
||||
)
|
||||
|
||||
clear >/dev/console
|
||||
echo "Scanning for games..." >/dev/console
|
||||
clear
|
||||
echo "Scanning for games..."
|
||||
find_names=()
|
||||
for i in "${!SUPPORTED_GRP[@]}"; do
|
||||
if [[ "${i}" != 0 ]]; then
|
||||
|
@ -43,7 +43,7 @@ grp_files=$(find "${BUILDENGINEPATH}" -mindepth 1 -type f \( "${find_names[@]}"
|
|||
# expansion GRP files are named alphabetically later than base game GRP files,
|
||||
# meaning we can get by with a simple lexical sort before processing.
|
||||
grp_files=$(echo "${grp_files}" | sort)
|
||||
echo "Adding games..." >/dev/console
|
||||
echo "Adding games..."
|
||||
while read -r grp_file; do
|
||||
abs_path=$(dirname "${grp_file}")
|
||||
path=${abs_path#"$BUILDENGINEPATH/"}
|
||||
|
@ -63,5 +63,4 @@ while read -r grp_file; do
|
|||
-- end --
|
||||
EOM
|
||||
done <<<"${grp_files}"
|
||||
systemctl restart ${UI_SERVICE}
|
||||
clear >/dev/console
|
||||
clear
|
||||
|
|
|
@ -6,10 +6,9 @@
|
|||
|
||||
. /etc/profile
|
||||
|
||||
clear >/dev/console
|
||||
echo "Scanning for games..." >/dev/console
|
||||
bash /usr/bin/start_scummvm.sh add >/dev/console
|
||||
echo "Adding games..." >/dev/console
|
||||
bash /usr/bin/start_scummvm.sh create >/dev/console
|
||||
systemctl restart ${UI_SERVICE}
|
||||
clear >/dev/console
|
||||
clear
|
||||
echo "Scanning for games..."
|
||||
bash /usr/bin/start_scummvm.sh add
|
||||
echo "Adding games..."
|
||||
bash /usr/bin/start_scummvm.sh create
|
||||
clear
|
||||
|
|
|
@ -25,7 +25,7 @@ install_bios() {
|
|||
SHASUM=$(echo $SHASUMS | tr '#' '\n' | awk '/'${BIOS}'/ {print $1}')
|
||||
if [ ! "${SHASUM}" == "${BINSUM}" ]
|
||||
then
|
||||
echo "Checksum mismatch, please update the package." >/dev/console
|
||||
echo "Checksum mismatch, please update the package."
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${BIOS}" =~ .zip$ ]]
|
||||
|
@ -34,7 +34,7 @@ install_bios() {
|
|||
rm "${BIOS}"
|
||||
BIOS="$(echo ${BIOS} | sed "s#.zip#.exe#")"
|
||||
fi
|
||||
/usr/bin/7z x "${BIOS}" >/dev/console
|
||||
/usr/bin/7z x "${BIOS}"
|
||||
rm "${BIOS}"
|
||||
cd ${SOURCEPATH}
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
QUAKEPATH="/storage/roms/quake"
|
||||
|
||||
clear >/dev/console
|
||||
echo "Scanning for games..." >/dev/console
|
||||
clear
|
||||
echo "Scanning for games..."
|
||||
pak_files=$(find "${QUAKEPATH}" -mindepth 1 -type f -iname pak0.pak)
|
||||
echo "Adding games..." >/dev/console
|
||||
echo "Adding games..."
|
||||
while read -r pak_file; do
|
||||
abs_path=$(dirname "${pak_file}")
|
||||
path=${abs_path#"$QUAKEPATH/"}
|
||||
|
@ -30,5 +30,4 @@ while read -r pak_file; do
|
|||
-- end --
|
||||
EOM
|
||||
done <<<"${pak_files}"
|
||||
systemctl restart ${UI_SERVICE}
|
||||
clear >/dev/console
|
||||
clear
|
||||
|
|
|
@ -4,15 +4,13 @@
|
|||
|
||||
. /etc/os-release
|
||||
|
||||
export PATH="$PATH:/usr/local/bin:/usr/bin:/storage/bin"
|
||||
export PATH="/usr/bin:/usr/local/bin:/storage/bin:${PATH}"
|
||||
export SDL_GAMECONTROLLERCONFIG_FILE="/storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt"
|
||||
|
||||
J_DIR="/storage/.config/system"
|
||||
J_CONF="${J_DIR}/configs/system.cfg"
|
||||
ES_CONF="/storage/.emulationstation/es_settings.cfg"
|
||||
EE_DEVICE=${HW_DEVICE}
|
||||
|
||||
JSLISTENCONF="/storage/.config/system/configs/jslisten.cfg"
|
||||
JSLISTENCONF="${J_DIR}/configs/jslisten.cfg"
|
||||
|
||||
get_setting() {
|
||||
if [ ! -z "${3}" ]
|
||||
|
@ -62,42 +60,40 @@ set_audio() {
|
|||
}
|
||||
|
||||
get_es_setting() {
|
||||
echo $(sed -n "s|\s*<${1} name=\"${2}\" value=\"\(.*\)\" />|\1|p" ${ES_CONF})
|
||||
echo $(sed -n "s|\s*<${1} name=\"${2}\" value=\"\(.*\)\" />|\1|p" ${ES_CONF})
|
||||
}
|
||||
|
||||
check_bios() {
|
||||
PLATFORM="${1}"
|
||||
CORE="${2}"
|
||||
EMULATOR="${3}"
|
||||
ROMNAME="${4}"
|
||||
LOG="${5}"
|
||||
|
||||
PLATFORM="${1}"
|
||||
CORE="${2}"
|
||||
EMULATOR="${3}"
|
||||
ROMNAME="${4}"
|
||||
LOG="${5}"
|
||||
if [[ -z "$LOG" ]]; then
|
||||
LOG="/var/log/exec.log"
|
||||
cat /etc/motd > "$LOG"
|
||||
fi
|
||||
|
||||
if [[ -z "$LOG" ]]; then
|
||||
LOG="/var/log/exec.log"
|
||||
cat /etc/motd > "$LOG"
|
||||
fi
|
||||
MISSINGBIOS="$(batocera-systems --strictfilter ${PLATFORM})"
|
||||
if [ "$?" == "2" ]; then
|
||||
# formating so it looks nice :)
|
||||
PLATFORMNAME="${MISSINGBIOS##*>}" # read from -P onwards
|
||||
PLATFORMNAME="${PLATFORMNAME%%MISSING*}" # until a space is found
|
||||
PLATFORMNAME=$(echo $PLATFORMNAME | sed -e 's/\\n//g')
|
||||
|
||||
MISSINGBIOS="$(batocera-systems --strictfilter ${PLATFORM})"
|
||||
if [ "$?" == "2" ]; then
|
||||
if [[ -f "${LOG}" ]]; then
|
||||
echo "${CORE} ${EMULATOR} ${ROMNAME}" >> $LOG
|
||||
echo "${PLATFORMNAME} missing BIOS - Could not find all BIOS: " >> $LOG
|
||||
echo "please make sure you copied the files into the corresponding folder " >> $LOG
|
||||
echo "${MISSINGBIOS}" >> $LOG
|
||||
fi
|
||||
MISSINGBIOS=$(echo "$MISSINGBIOS" | sed -e 's/$/\\n/g')
|
||||
|
||||
# formating so it looks nice :)
|
||||
PLATFORMNAME="${MISSINGBIOS##*>}" # read from -P onwards
|
||||
PLATFORMNAME="${PLATFORMNAME%%MISSING*}" # until a space is found
|
||||
PLATFORMNAME=$(echo $PLATFORMNAME | sed -e 's/\\n//g')
|
||||
|
||||
if [[ -f "${LOG}" ]]; then
|
||||
echo "${CORE} ${EMULATOR} ${ROMNAME}" >> $LOG
|
||||
echo "${PLATFORMNAME} missing BIOS - Could not find all BIOS: " >> $LOG
|
||||
echo "please make sure you copied the files into the corresponding folder " >> $LOG
|
||||
echo "${MISSINGBIOS}" >> $LOG
|
||||
fi
|
||||
MISSINGBIOS=$(echo "$MISSINGBIOS" | sed -e 's/$/\\n/g')
|
||||
|
||||
/usr/bin/error.sh "${PLATFORMNAME} missing BIOS" "Could not find all BIOS/files in /storage/roms, the game may not work:\n\n ${MISSINGBIOS}\n\nPlease make sure you copied the files into the corresponding folder."
|
||||
error_process="$!"
|
||||
pkill -P $error_process
|
||||
fi
|
||||
/usr/bin/error.sh "${PLATFORMNAME} missing BIOS" "Could not find all BIOS/files in /storage/roms, the game may not work:\n\n ${MISSINGBIOS}\n\nPlease make sure you copied the files into the corresponding folder."
|
||||
error_process="$!"
|
||||
pkill -P $error_process
|
||||
fi
|
||||
}
|
||||
|
||||
# read config files from /storage/.config/profile.d
|
||||
|
@ -106,3 +102,4 @@ fi
|
|||
. $config
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ then
|
|||
done
|
||||
fi
|
||||
|
||||
clear >/dev/console 2>&1 >>${BOOTLOG}
|
||||
clear 2>&1 >>${BOOTLOG}
|
||||
|
||||
DEVICE_CPU_GOVERNOR=$(get_setting system.cpugovernor)
|
||||
${DEVICE_CPU_GOVERNOR} 2>&1 >>${BOOTLOG}
|
||||
|
|
|
@ -9,12 +9,12 @@ then
|
|||
if [ -e "/usr/share/post-update" ]
|
||||
then
|
||||
show_splash intro
|
||||
echo -ne "\033[1000H\033[2K==> Preparing system.." >/dev/console
|
||||
echo -ne "\033[1000H\033[2K==> Preparing system.."
|
||||
/usr/share/post-update
|
||||
fi
|
||||
rm /storage/.config/boot.hint
|
||||
touch /storage/.configured
|
||||
fi
|
||||
|
||||
clear >/dev/console
|
||||
clear
|
||||
/usr/bin/show_splash intro 2>&1 >>${BOOTLOG}
|
||||
|
|
|
@ -69,6 +69,9 @@ done
|
|||
|
||||
### 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/* /storage/.config/modules/
|
||||
|
||||
# Swap es_input back to a writeable file so external controller configuration works properly.
|
||||
if [ -L "/storage/.config/emulationstation/es_input.cfg" ]
|
||||
then
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)
|
||||
# Copyright (C) 2020 Fewtarius (https://github.com/fewtarius)
|
||||
|
||||
. /etc/profile
|
||||
|
||||
# NOTE: to customize your backups, create a backuptool.conf file in
|
||||
# /storage/.config like this:
|
||||
|
||||
|
@ -49,9 +51,7 @@ fi
|
|||
|
||||
case "${1}" in
|
||||
"restore")
|
||||
systemctl stop ${UI_SERVICE}
|
||||
unzip -o ${BACKUPFILE} -d /
|
||||
systemctl start ${UI_SERVICE}
|
||||
;;
|
||||
"backup")
|
||||
if [ -f ${BACKUPFILE} ]
|
||||
|
@ -61,9 +61,7 @@ case "${1}" in
|
|||
mv ${BACKUPFILE} "${BACKUPFOLDER}/${ARCHIVEFILENAME}"
|
||||
fi
|
||||
[ -f "${BACKUPFILE}" ] && rm "${BACKUPFILE}"
|
||||
[ -z "$2" ] && systemctl stop ${UI_SERVICE}
|
||||
zip -9 -r ${BACKUPFILE} \
|
||||
${COMPRESSLOCATIONS[@]}
|
||||
[ -z "${2}" ] && systemctl start ${UI_SERVICE}
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
. /etc/profile
|
||||
|
||||
clear >/dev/console
|
||||
clear
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
text_viewer -w -e -t "BIOS ERROR" -m "$*"
|
||||
|
@ -16,4 +16,4 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
clear >/dev/console
|
||||
clear
|
||||
|
|
|
@ -10,7 +10,6 @@ case "${1}" in
|
|||
cp -rf /usr/config/retroarch/retroarch.cfg /storage/.config/retroarch/retroarch.cfg
|
||||
;;
|
||||
"ALL")
|
||||
systemctl stop ${UI_SERVICE}
|
||||
cd /
|
||||
find /storage -mindepth 1 \( ! -regex '^/storage/.update.*' -a ! -regex '^/storage/roms.*' \) -delete
|
||||
mkdir /storage/.config/
|
||||
|
|
|
@ -68,12 +68,9 @@ update_es_folders() {
|
|||
fi
|
||||
done
|
||||
}
|
||||
systemctl stop ${UI_SERVICE}
|
||||
|
||||
# check the external folders first
|
||||
update_es_folders "external" "${EXT_ROM_FOLDERS}" "${ES_LIST}"
|
||||
# next check the local folders
|
||||
# if there are duplicate folders in EXTERNAL, LOCAL ones will take preference
|
||||
update_es_folders "local" "${LOCAL_ROM_FOLDERS}" "${ES_LIST}"
|
||||
|
||||
systemctl start ${UI_SERVICE}
|
||||
|
|
14
packages/jelos/sources/scripts/run
Executable file
14
packages/jelos/sources/scripts/run
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
. /etc/profile
|
||||
|
||||
if [ "${UI_SERVICE}" = "weston.service" ]
|
||||
then
|
||||
weston-terminal --command="${1}"
|
||||
else
|
||||
systemctl stop ${UI_SERVICE}
|
||||
${1} >/dev/console 2>&1
|
||||
fi
|
||||
if [ ! "${UI_SERVICE}" = "weston.service" ]
|
||||
then
|
||||
systemctl start ${UI_SERVICE}
|
||||
fi
|
|
@ -195,7 +195,7 @@ function quit() {
|
|||
|
||||
function clear_screen() {
|
||||
$VERBOSE && log "Clearing screen"
|
||||
clear >/dev/console
|
||||
clear
|
||||
}
|
||||
|
||||
function bluetooth() {
|
||||
|
|
|
@ -46,26 +46,23 @@ check_space() {
|
|||
if [ "${MYSIZE}" -lt "${REQUIRED}" ]
|
||||
then
|
||||
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 "Exiting in 5 seconds..." >/dev/console && sleep 5
|
||||
systemctl start ${UI_SERVICE} &
|
||||
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."
|
||||
echo "Exiting in 5 seconds..." && sleep 5
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
systemctl stop ${UI_SERVICE}
|
||||
clear >/dev/console
|
||||
clear
|
||||
|
||||
ONLINE_STATUS=$(check_network)
|
||||
if [ ! "${ONLINE_STATUS}" == true ]
|
||||
then
|
||||
echo "System not online, cannot continue..." >/dev/console
|
||||
echo "Exiting in 5 seconds..." >/dev/console && sleep 5
|
||||
systemctl start ${UI_SERVICE} &
|
||||
echo "System not online, cannot continue..."
|
||||
echo "Exiting in 5 seconds..." && sleep 5
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -e "=> ${OS_NAME} UPGRADE UTILITY" >/dev/console
|
||||
echo -e "=> ${OS_NAME} UPGRADE UTILITY"
|
||||
|
||||
|
||||
# Check storage
|
||||
|
@ -76,32 +73,30 @@ check_space available .update GAMES 4096000
|
|||
LATEST_RELEASE_TAG=$(curl -H 'Cache-Control: no-cache' -Ls "${GIT_API}/releases" | python -c "import sys, json; print(json.load(sys.stdin)[0]['tag_name'])")
|
||||
if [ "${OS_VERSION}" -ge "${LATEST_RELEASE_TAG}" ] && [ ! "${FORCE}" = "1" ]
|
||||
then
|
||||
echo "No new updates are available..." >/dev/console
|
||||
echo "Exiting in 5 seconds..." >/dev/console && sleep 5
|
||||
systemctl start ${UI_SERVICE} &
|
||||
echo "No new updates are available..."
|
||||
echo "Exiting in 5 seconds..." && sleep 5
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo -e "\nFetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}" >/dev/console
|
||||
curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}" "${GIT_REPO}/releases/download/${LATEST_RELEASE_TAG}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.tar" 2>/dev/console
|
||||
echo -e "Fetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256" >/dev/console
|
||||
curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256" "${GIT_REPO}/releases/download/${LATEST_RELEASE_TAG}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.tar.sha256" 2>/dev/console
|
||||
echo -e "\nFetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}"
|
||||
curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}" "${GIT_REPO}/releases/download/${LATEST_RELEASE_TAG}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.tar"
|
||||
echo -e "Fetching: ${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256"
|
||||
curl -Lo "${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256" "${GIT_REPO}/releases/download/${LATEST_RELEASE_TAG}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.tar.sha256"
|
||||
|
||||
echo -e "\nVerifying download, please wait..." >/dev/console
|
||||
echo -e "\nVerifying download, please wait..."
|
||||
# Verify
|
||||
MYSUM=$(sha256sum ${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION} | awk '{print $1}')
|
||||
DLSUM=$(cat ${UPDATE_PATH}/${OS_NAME}-${HW_DEVICE}.${HW_ARCH}-${LATEST_RELEASE_TAG}.${EXTENSION}.sha256 | awk '{print $1}')
|
||||
|
||||
if [ ! "${MYSUM}" == "${DLSUM}" ]
|
||||
then
|
||||
echo "Verification failed, cleaning up and exiting..." >/dev/console
|
||||
echo "Verification failed, cleaning up and exiting..."
|
||||
rm -f ${UPDATE_PATH}/*
|
||||
sleep 5
|
||||
clear >/dev/console
|
||||
systemctl start ${UI_SERVICE}
|
||||
clear
|
||||
exit 1
|
||||
else
|
||||
echo "Verification successful..." >/dev/console
|
||||
echo "Verification successful..."
|
||||
fi
|
||||
|
||||
if [ "${FORCE}" == "1" ]
|
||||
|
@ -109,7 +104,7 @@ then
|
|||
set_setting updates.force 0
|
||||
fi
|
||||
|
||||
echo -e "\nRebooting to complete OS upgrade..." >/dev/console
|
||||
echo -e "\nRebooting to complete OS upgrade..."
|
||||
sync
|
||||
sleep 3
|
||||
reboot
|
||||
|
|
|
@ -22,5 +22,10 @@ makeinstall_target() {
|
|||
mkdir -p ${INSTALL}/usr/config/modules
|
||||
cp -rf ${PKG_DIR}/sources/* ${INSTALL}/usr/config/modules
|
||||
chmod 0755 ${INSTALL}/usr/config/modules/*
|
||||
case ${ARCH} in
|
||||
x86_64)
|
||||
rm -f "${INSTALL}/usr/config/Start 32bit Retroarch.sh"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
. /etc/profile
|
||||
jslisten set "killall 351Files"
|
||||
source /usr/bin/env.sh
|
||||
joy2keyStart
|
||||
|
||||
351Files
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
. /etc/profile
|
||||
source /usr/bin/env.sh
|
||||
clear >/dev/console
|
||||
systemctl stop ${UI_SERVICE}
|
||||
echo "Cleaning ._ files from /storage/roms" >/dev/console
|
||||
clear
|
||||
echo "Cleaning ._ files from /storage/roms"
|
||||
find /storage/roms -iname '._*' -exec rm -rf {} \;
|
||||
clear >/dev/console
|
||||
systemctl start ${UI_SERVICE}
|
||||
clear
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
source /usr/bin/env.sh
|
||||
source /etc/profile
|
||||
|
||||
jslisten set "killall PPSSPPSDL"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2021-present 351ELEC
|
||||
|
||||
source /usr/bin/env.sh
|
||||
source /etc/profile
|
||||
|
||||
jslisten set "killall scummvm"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</game>
|
||||
|
||||
<game>
|
||||
<path>./cloud_backup.sh</path>
|
||||
<path>run ./cloud_backup.sh</path>
|
||||
<name>Cloud Backup</name>
|
||||
<desc>Backup your saves to a cloud drive.</desc>
|
||||
<developer>JELOS</developer>
|
||||
|
@ -28,7 +28,7 @@
|
|||
</game>
|
||||
|
||||
<game>
|
||||
<path>./cloud_restore.sh</path>
|
||||
<path>run ./cloud_restore.sh</path>
|
||||
<name>Cloud Restore</name>
|
||||
<desc>Restores your saves from a cloud drive.</desc>
|
||||
<developer>JELOS</developer>
|
||||
|
@ -119,7 +119,7 @@
|
|||
</game>
|
||||
|
||||
<game>
|
||||
<path>./Remove ._ Files.sh</path>
|
||||
<path>run ./Remove ._ Files.sh</path>
|
||||
<name>Run Remove ._ Files</name>
|
||||
<desc>Removes hidden ._ files created by the MacOS filesystem</desc>
|
||||
<developer>JELOS</developer>
|
||||
|
|
|
@ -429,15 +429,15 @@ set_consolefont() {
|
|||
hres="$(fbset 2>/dev/null | awk '/geometry/ { print $2 }')"
|
||||
if [ "${hres}" -gt "0" ] && [ "${hres}" -lt "640" ]
|
||||
then
|
||||
setfont -C /dev/tty0 ter-v12n.psf
|
||||
setfont -C /dev/console ter-v12n.psf
|
||||
elif [ "${hres}" -ge "640" ] && [ "${hres}" -lt "720" ]
|
||||
then
|
||||
setfont -C /dev/tty0 ter-v14n.psf
|
||||
setfont -C /dev/console ter-v14n.psf
|
||||
elif [ "${hres}" -ge "720" ] && [ "${hres}" -lt "1080" ]
|
||||
then
|
||||
setfont -C /dev/tty0 ter-v18n.psf
|
||||
setfont -C /dev/console ter-v18n.psf
|
||||
else
|
||||
setfont -C /dev/tty0 ter-v24n.psf
|
||||
setfont -C /dev/console ter-v24n.psf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
@ -874,6 +874,9 @@ check_update() {
|
|||
#return 0
|
||||
fi
|
||||
|
||||
redirect_output_to_screen
|
||||
delete_descriptors
|
||||
|
||||
mkdir -p $UPDATE_DIR/.tmp &>/dev/null
|
||||
sync
|
||||
|
||||
|
|
|
@ -15,15 +15,15 @@ SYNCPATH="${SYNCPATH:=GAMES}"
|
|||
BACKUPPATH="${BACKUPPATH:=/storage/roms}"
|
||||
RSYNCOPTSBACKUP="${RSYNCOPTSBACKUP:=-raiv --prune-empty-dirs}"
|
||||
|
||||
echo -e "=> ${OS_NAME} CLOUD BACKUP UTILITY\n" >/dev/console
|
||||
echo -e "=> ${OS_NAME} CLOUD BACKUP UTILITY\n"
|
||||
|
||||
echo "Mounting ${MOUNTPATH}" >/dev/console 2>&1
|
||||
rclonectl mount ${MOUNTPATH} >/dev/console 2>&1
|
||||
echo "Mounting ${MOUNTPATH}" 2>&1
|
||||
rclonectl mount ${MOUNTPATH} 2>&1
|
||||
|
||||
echo "Backing up data from ${BACKUPPATH} to ${MOUNTPATH}/${SYNCPATH}" >/dev/console 2>&1
|
||||
rsync ${RSYNCOPTSBACKUP} --include-from="${CONFIGPATH}/rsync-rules.conf" ${BACKUPPATH}/ ${MOUNTPATH}/${SYNCPATH}/ >/dev/console 2>&1
|
||||
echo "Backing up data from ${BACKUPPATH} to ${MOUNTPATH}/${SYNCPATH}" 2>&1
|
||||
rsync ${RSYNCOPTSBACKUP} --include-from="${CONFIGPATH}/rsync-rules.conf" ${BACKUPPATH}/ ${MOUNTPATH}/${SYNCPATH}/ 2>&1
|
||||
|
||||
echo "Unmounting ${MOUNTPATH}" >/dev/console 2>&1
|
||||
rclonectl unmount ${MOUNTPATH} >/dev/console 2>&1
|
||||
echo "Unmounting ${MOUNTPATH}" 2>&1
|
||||
rclonectl unmount ${MOUNTPATH} 2>&1
|
||||
sleep 3
|
||||
clear >/dev/console
|
||||
clear
|
||||
|
|
|
@ -15,15 +15,15 @@ SYNCPATH="${SYNCPATH:=GAMES}"
|
|||
BACKUPPATH="${BACKUPPATH:=/storage/roms}"
|
||||
RSYNCOPTSRESTORE="${RSYNCOPTSRESTORE:=-raiv}"
|
||||
|
||||
echo -e "=> ${OS_NAME} CLOUD RESTORE UTILITY\n" >/dev/console
|
||||
echo -e "=> ${OS_NAME} CLOUD RESTORE UTILITY\n"
|
||||
|
||||
echo "Mounting ${MOUNTPATH}" >/dev/console 2>&1
|
||||
rclonectl mount ${MOUNTPATH} >/dev/console 2>&1
|
||||
echo "Mounting ${MOUNTPATH}" 2>&1
|
||||
rclonectl mount ${MOUNTPATH} 2>&1
|
||||
|
||||
echo "Restoring data from ${MOUNTPATH}/${SYNCPATH} to ${BACKUPPATH}" >/dev/console 2>&1
|
||||
rsync ${RSYNCOPTSRESTORE} --include-from="${CONFIGPATH}/rsync-rules.conf" ${MOUNTPATH}/${SYNCPATH}/ ${BACKUPPATH}/ >/dev/console 2>&1
|
||||
echo "Restoring data from ${MOUNTPATH}/${SYNCPATH} to ${BACKUPPATH}" 2>&1
|
||||
rsync ${RSYNCOPTSRESTORE} --include-from="${CONFIGPATH}/rsync-rules.conf" ${MOUNTPATH}/${SYNCPATH}/ ${BACKUPPATH}/ 2>&1
|
||||
|
||||
echo "Unmounting ${MOUNTPATH}" >/dev/console 2>&1
|
||||
rclonectl unmount ${MOUNTPATH} >/dev/console 2>&1
|
||||
echo "Unmounting ${MOUNTPATH}" 2>&1
|
||||
rclonectl unmount ${MOUNTPATH} 2>&1
|
||||
sleep 3
|
||||
clear >/dev/console
|
||||
clear
|
||||
|
|
|
@ -128,8 +128,8 @@ post_makeinstall_target() {
|
|||
safe_remove ${INSTALL}/usr/lib/udev/rules.d/73-seat-late.rules
|
||||
|
||||
# remove getty units, we dont want a console
|
||||
safe_remove ${INSTALL}/usr/lib/systemd/system/autovt@.service
|
||||
safe_remove ${INSTALL}/usr/lib/systemd/system/console-getty.service
|
||||
#safe_remove ${INSTALL}/usr/lib/systemd/system/autovt@.service
|
||||
#safe_remove ${INSTALL}/usr/lib/systemd/system/console-getty.service
|
||||
safe_remove ${INSTALL}/usr/lib/systemd/system/container-getty@.service
|
||||
safe_remove ${INSTALL}/usr/lib/systemd/system/getty.target
|
||||
safe_remove ${INSTALL}/usr/lib/systemd/system/getty@.service
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="emulationstation"
|
||||
PKG_VERSION="1ee4be9"
|
||||
PKG_VERSION="82e66a4"
|
||||
PKG_GIT_CLONE_BRANCH="main"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
|
78
packages/wayland/weston/patches/002-console.patch
Normal file
78
packages/wayland/weston/patches/002-console.patch
Normal file
|
@ -0,0 +1,78 @@
|
|||
diff -rupN weston-10.0.1.orig/clients/terminal.c weston-10.0.1/clients/terminal.c
|
||||
--- weston-10.0.1.orig/clients/terminal.c 2022-09-14 09:35:54.928561932 -0400
|
||||
+++ weston-10.0.1/clients/terminal.c 2022-09-14 09:43:23.195349394 -0400
|
||||
@@ -56,6 +56,8 @@ static char *option_font;
|
||||
static int option_font_size;
|
||||
static char *option_term;
|
||||
static char *option_shell;
|
||||
+static char *option_cwd;
|
||||
+static char *option_command;
|
||||
|
||||
static struct wl_list terminal_list;
|
||||
|
||||
@@ -3089,6 +3091,14 @@ terminal_run(struct terminal *terminal,
|
||||
close(pipes[0]);
|
||||
setenv("TERM", option_term, 1);
|
||||
setenv("COLORTERM", option_term, 1);
|
||||
+
|
||||
+ if (option_command) {
|
||||
+ if (execl(path, path, "-c", option_command, NULL)) {
|
||||
+ fprintf(stderr, "command '%s' couldn't executed: %m",
|
||||
+ option_command);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (execl(path, path, "-l")) {
|
||||
printf("exec failed: %s\n", strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
@@ -3123,6 +3133,8 @@ static const struct weston_option termin
|
||||
{ WESTON_OPTION_STRING, "font", 0, &option_font },
|
||||
{ WESTON_OPTION_INTEGER, "font-size", 0, &option_font_size },
|
||||
{ WESTON_OPTION_STRING, "shell", 0, &option_shell },
|
||||
+ { WESTON_OPTION_STRING, "cwd", 0, &option_cwd },
|
||||
+ { WESTON_OPTION_STRING, "command", 0, &option_command },
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@@ -3140,7 +3152,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
option_shell = getenv("SHELL");
|
||||
if (!option_shell)
|
||||
- option_shell = "/bin/bash";
|
||||
+ option_shell = "/bin/sh";
|
||||
|
||||
config_file = weston_config_get_name_from_env();
|
||||
config = weston_config_parse(config_file);
|
||||
@@ -3148,6 +3160,7 @@ int main(int argc, char *argv[])
|
||||
weston_config_section_get_string(s, "font", &option_font, "monospace");
|
||||
weston_config_section_get_int(s, "font-size", &option_font_size, 14);
|
||||
weston_config_section_get_string(s, "term", &option_term, "xterm");
|
||||
+ weston_config_section_get_string(s, "command", &option_command, NULL);
|
||||
weston_config_destroy(config);
|
||||
|
||||
if (parse_options(terminal_options,
|
||||
@@ -3157,7 +3170,9 @@ int main(int argc, char *argv[])
|
||||
" --maximized or -m\n"
|
||||
" --font=NAME\n"
|
||||
" --font-size=SIZE\n"
|
||||
- " --shell=NAME\n", argv[0]);
|
||||
+ " --shell=NAME\n"
|
||||
+ " --cwd=PATH\n"
|
||||
+ " --command=CMDLINE\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3178,6 +3193,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
wl_list_init(&terminal_list);
|
||||
terminal = terminal_create(d);
|
||||
+
|
||||
+ if (option_cwd) {
|
||||
+ if(chdir(option_cwd) == -1)
|
||||
+ fprintf(stderr, "failed to changing directory as %s: %m\n",
|
||||
+ option_cwd);
|
||||
+ }
|
||||
+
|
||||
if (terminal_run(terminal, option_shell))
|
||||
exit(EXIT_FAILURE);
|
||||
|
Loading…
Reference in a new issue