Merge pull request #1459 from brooksytech/dev
PortMaster cleanup & remove scummvm from tools for S922X
This commit is contained in:
commit
89ae513cdf
5 changed files with 26 additions and 38 deletions
|
@ -2,7 +2,8 @@
|
|||
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
|
||||
|
||||
PKG_NAME="portmaster"
|
||||
PKG_VERSION="e0dcefc4fc2df80821b167b1bb8f50dedac2f3c5"
|
||||
PKG_VERSION="b817dcd13c4486284874c13b2732d876a96e70b9"
|
||||
PKG_SITE="https://github.com/christianhaitian/PortMaster"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_ARCH="arm aarch64"
|
||||
PKG_DEPENDS_TARGET="toolchain gptokeyb gamecontrollerdb wget"
|
||||
|
|
|
@ -18,15 +18,15 @@ cp /usr/config/PortMaster/PortMaster.sh PortMaster.sh
|
|||
|
||||
#Use our gamecontrollerdb.txt
|
||||
rm gamecontrollerdb.txt
|
||||
ln -sfv /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt gamecontrollerdb.txt
|
||||
ln -sf /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt gamecontrollerdb.txt
|
||||
|
||||
#Use our gptokeyb
|
||||
rm gptokeyb
|
||||
ln -sfv /usr/bin/gptokeyb gptokeyb
|
||||
ln -sf /usr/bin/gptokeyb gptokeyb
|
||||
cp /usr/config/PortMaster/portmaster.gptk portmaster.gptk
|
||||
|
||||
#Use our wget
|
||||
rm wget
|
||||
ln -sfv /usr/bin/wget wget
|
||||
ln -sf /usr/bin/wget wget
|
||||
|
||||
#Make sure roms/ports/PortMaster folder exists
|
||||
if [ ! -d "/storage/roms/ports/PortMaster" ]; then
|
||||
|
@ -42,8 +42,6 @@ fi
|
|||
cp /storage/.config/PortMaster/control.txt /storage/roms/ports/PortMaster/control.txt
|
||||
cp /storage/.config/PortMaster/gptokeyb /storage/roms/ports/PortMaster/gptokeyb
|
||||
cp /storage/.config/PortMaster/gamecontrollerdb.txt /storage/roms/ports/PortMaster/gamecontrollerdb.txt
|
||||
cp /storage/.config/PortMaster/mapper.txt /storage/roms/ports/PortMaster/mapper.txt
|
||||
cp /storage/.config/PortMaster/oga_controls* /storage/roms/ports/PortMaster/
|
||||
|
||||
#Delete and refrence to PortMaster.sh, we only want to use ours.
|
||||
find /storage/roms/ports -type f -name "PortMaster.sh" -delete
|
||||
|
|
|
@ -10,7 +10,6 @@ if [ -f "/etc/profile" ]; then
|
|||
source /etc/profile
|
||||
fi
|
||||
|
||||
|
||||
toolsfolderloc="/storage/.config"
|
||||
|
||||
isitext=$(df -PTh $toolsfolderloc | awk '{print $2}' | grep ext)
|
||||
|
@ -55,7 +54,7 @@ cp "$toolsfolderloc/PortMaster/gamecontrollerdb.txt" /tmp/gamecontrollerdb.txt
|
|||
$toolsfolderloc/PortMaster/mapper.txt "/tmp/gamecontrollerdb.txt" > /dev/null 2>&1
|
||||
export SDL_GAMECONTROLLERCONFIG_FILE="/tmp/gamecontrollerdb.txt"
|
||||
|
||||
/usr/bin/gptokeyb Portmaster.sh -c "$toolsfolderloc/PortMaster/oga_controls_settings.txt" &
|
||||
/usr/bin/gptokeyb PortMaster.sh -c "$toolsfolderloc/PortMaster/portmaster.gptk" &
|
||||
|
||||
GW=`ip route | awk '/default/ { print $3 }'`
|
||||
if [ -z "$GW" ]; then
|
||||
|
@ -63,9 +62,6 @@ if [ -z "$GW" ]; then
|
|||
--msgbox "\n\nYour network connection doesn't seem to be working. \
|
||||
\nDid you make sure to configure your wifi connection?" $height $width 2>&1 > ${CUR_TTY}
|
||||
$ESUDO kill -9 $(pidof gptokeyb)
|
||||
if [ ! -z "$ESUDO" ]; then
|
||||
$ESUDO systemctl restart oga_events &
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -73,8 +69,6 @@ website="https://github.com/PortsMaster/PortMaster-Releases/releases/latest/down
|
|||
jwebsite="https://github.com/brooksytech/JelosAddOns/releases/latest/download/"
|
||||
isgithubrelease="true" #Github releases convert space " " ("%20") to "."
|
||||
|
||||
ISITCHINA=$(curl -s --connect-timeout 30 -m 60 http://demo.ip-api.com/json | $GREP -Po '"country":.*?[^\\]"')
|
||||
|
||||
if [ ! -d "/dev/shm/portmaster" ]; then
|
||||
mkdir /dev/shm/portmaster
|
||||
fi
|
||||
|
@ -89,13 +83,7 @@ PortInfoInstall() {
|
|||
local setwebsiteback="N"
|
||||
local unzipstatus
|
||||
|
||||
if [ -f "/opt/system/Advanced/Switch to main SD for Roms.sh" ]; then
|
||||
whichsd="roms2"
|
||||
elif [ -f "/storage/.config/.OS_ARCH" ] || [ "${OS_NAME}" == "JELOS" ]; then
|
||||
whichsd="storage/roms"
|
||||
else
|
||||
whichsd="roms"
|
||||
fi
|
||||
whichsd="storage/roms"
|
||||
|
||||
msgtxt=$(cat /dev/shm/portmaster/ports.md | $GREP "$1" | $GREP -oP '(?<=Desc=").*?(?=")')
|
||||
installloc=$(cat /dev/shm/portmaster/ports.md | $GREP "$1" | $GREP -oP '(?<=locat=").*?(?=")')
|
||||
|
@ -125,7 +113,7 @@ local unzipstatus
|
|||
dialog --clear --backtitle "PortMaster" --title "$1" --clear \
|
||||
--yesno "\n$msgtxt \n\nPorted By: $porter\n\nWould you like to continue to install this port?" $height $width 2>&1 > ${CUR_TTY}
|
||||
fi
|
||||
|
||||
|
||||
case $? in
|
||||
0)
|
||||
if [ ${needmono,,} == "y" ] && [ $ismonothere == "n" ]; then
|
||||
|
@ -174,17 +162,13 @@ local unzipstatus
|
|||
$ESUDO rm -f /dev/shm/portmaster/$installloc
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
userExit() {
|
||||
rm -f /dev/shm/portmaster/ports.md
|
||||
rm -f /dev/shm/portmaster/jports.md
|
||||
rm -f /dev/shm/portmaster/pports.md
|
||||
$ESUDO kill -9 $(pidof oga_controls)
|
||||
$ESUDO systemctl restart oga_events &
|
||||
rm -f /dev/shm/portmaster/*ports.md
|
||||
dialog --clear
|
||||
printf "\033c" > ${CUR_TTY}
|
||||
exit 0
|
||||
|
@ -199,11 +183,11 @@ JelosPorts() {
|
|||
while true; do
|
||||
selection=(dialog \
|
||||
--backtitle "PortMaster" \
|
||||
--title "[ Jelos Ports]" \
|
||||
--title "[ JelosAddOns Ports]" \
|
||||
--no-collapse \
|
||||
--clear \
|
||||
--cancel-label "$hotkey + Start to Exit" \
|
||||
--menu "Available ports for install" $height $width 15)
|
||||
--cancel-label "Back" \
|
||||
--menu "Available JelosAddOns ports for install" $height $width 15)
|
||||
|
||||
choices=$("${selection[@]}" "${options[@]}" 2>&1 > ${CUR_TTY}) || TopLevel
|
||||
|
||||
|
@ -228,7 +212,7 @@ MainMenu() {
|
|||
--title "[ Main Menu of all ports]" \
|
||||
--no-collapse \
|
||||
--clear \
|
||||
--cancel-label "$hotkey + Start to Exit" \
|
||||
--cancel-label "Back" \
|
||||
--menu "Available ports for install" $height $width 15)
|
||||
|
||||
choices=$("${selection[@]}" "${options[@]}" 2>&1 > ${CUR_TTY}) || TopLevel
|
||||
|
@ -243,7 +227,7 @@ MainMenu() {
|
|||
|
||||
MainMenuRTR() {
|
||||
dwebsite=$website
|
||||
jport="None"
|
||||
jport="None"
|
||||
local options=(
|
||||
$(cat /dev/shm/portmaster/ports.md | $GREP 'runtype="rtr"' | $GREP -oP "(?<=Title=\").*?(?=\")|$power|$opengl|$jport")
|
||||
)
|
||||
|
@ -254,7 +238,7 @@ MainMenuRTR() {
|
|||
--title "[ Main Menu for Ready to Run ports ]" \
|
||||
--no-collapse \
|
||||
--clear \
|
||||
--cancel-label "$hotkey + Start to Exit" \
|
||||
--cancel-label "Back" \
|
||||
--menu "Available Ready to Run ports for install" $height $width 15)
|
||||
|
||||
choices=$("${selection[@]}" "${options[@]}" 2>&1 > ${CUR_TTY}) || TopLevel
|
||||
|
@ -268,7 +252,7 @@ MainMenuRTR() {
|
|||
}
|
||||
|
||||
TopLevel() {
|
||||
local topoptions=( 1 "All Available Ports" 2 "Ready to Run Ports" 3 "Jelos Ports" )
|
||||
local topoptions=( 1 "All Available Ports" 2 "Ready to Run Ports" 3 "JelosAddOns Ports" )
|
||||
|
||||
while true; do
|
||||
topselection=(dialog \
|
||||
|
@ -276,7 +260,7 @@ TopLevel() {
|
|||
--title "[ Top Level Menu ]" \
|
||||
--no-collapse \
|
||||
--clear \
|
||||
--cancel-label "$hotkey + Start to Exit" \
|
||||
--cancel-label "Exit" \
|
||||
--menu "Please make your selection" $height $width 15)
|
||||
|
||||
topchoices=$("${topselection[@]}" "${topoptions[@]}" 2>&1 > ${CUR_TTY}) || userExit
|
||||
|
@ -284,8 +268,8 @@ TopLevel() {
|
|||
for choice in $topchoices; do
|
||||
case $choice in
|
||||
1) MainMenu ;;
|
||||
2) MainMenuRTR ;;
|
||||
3) JelosPorts ;;
|
||||
2) MainMenuRTR ;;
|
||||
3) JelosPorts ;;
|
||||
esac
|
||||
done
|
||||
done
|
||||
|
|
Binary file not shown.
|
@ -35,5 +35,10 @@ post_makeinstall_target() {
|
|||
rm -f ${INSTALL}/usr/config/modules/Install*
|
||||
;;
|
||||
esac
|
||||
case ${DEVICE} in
|
||||
S922X*)
|
||||
rm -f ${INSTALL}/usr/config/modules/*ScummVM*
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue