Cleanup.
This commit is contained in:
parent
b843edb2e9
commit
141d48a0b6
6 changed files with 41 additions and 24 deletions
24
packages/games/emulators/pico-8/package.mk
Normal file
24
packages/games/emulators/pico-8/package.mk
Normal file
|
@ -0,0 +1,24 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (C) 2022-present Fewtarius
|
||||
|
||||
PKG_NAME="pico-8"
|
||||
PKG_VERSION="$(date +%Y%m%d)"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPLv2"
|
||||
PKG_SITE=""
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain SDL2 ${OPENGLES}"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="emulators"
|
||||
PKG_SHORTDESC="PICO-8 Fantasy Console"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
cp ${PKG_DIR}/sources/start_pico8.sh ${INSTALL}/usr/bin
|
||||
chmod 0755 ${INSTALL}/usr/bin/start_pico8.sh
|
||||
|
||||
mkdir -p ${INSTALL}/usr/lib/autostart/common
|
||||
cp ${PKG_DIR}/sources/autostart/common/* ${INSTALL}/usr/lib/autostart/common
|
||||
chmod 0755 ${INSTALL}/usr/lib/autostart/common/*
|
||||
}
|
|
@ -13,24 +13,20 @@ else
|
|||
OPTIONS="-splore"
|
||||
fi
|
||||
|
||||
if [ ! -d "/storage/roms/pico-8" ]
|
||||
then
|
||||
mkdir -p "/storage/roms/pico-8"
|
||||
echo "Extract your purchased pico-8 binaries and place them in the pico-8 directory on your games partition" >/var/log/exec.log
|
||||
fi
|
||||
|
||||
cp -f /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt /storage/roms/pico-8/sdl_controllers.txt
|
||||
|
||||
unset MYARCH
|
||||
TEST=$(ldd /usr/bin/emulationstation | grep 64)
|
||||
if [ $? == 0 ]
|
||||
if [ -e "/storage/roms/pico-8/pico8_64" ]
|
||||
then
|
||||
/storage/roms/pico-8/pico8_64 -home -root_path /storage/roms/pico-8 -joystick 0 ${OPTIONS} "${CART}"
|
||||
elif [ -e "/storage/roms/pico-8/pico8_dyn" ] && [ ! -e "/storage/roms/pico-8/pico8_64" ]
|
||||
then
|
||||
patchelf --set-interpreter /usr/lib32/ld-linux-armhf.so.3 /storage/roms/pico-8/pico8_dyn
|
||||
export LD_LIBRARY_PATH=/usr/lib32
|
||||
/storage/roms/pico-8/pico8_dyn -home -root_path /storage/roms/pico-8 -joystick 0 ${OPTIONS} "${CART}"
|
||||
else
|
||||
text_viewer -e -w -t "Missing Pico-8 binaries!" -m "Extract your purchased pico8_64 and pico8.dat and place them in the pico-8 directory on your games partition."
|
||||
fi
|
||||
|
||||
/storage/roms/pico-8/pico8_dyn -home -root_path /storage/roms/pico-8 -joystick 0 ${OPTIONS} "${CART}"
|
||||
|
||||
ret_error=$?
|
||||
|
||||
exit $ret_error
|
|
@ -24,7 +24,7 @@ PKG_EMUS="common-shaders glsl-shaders libretro-database retroarch hatarisa openb
|
|||
scummvmsa PPSSPPSDL yabasanshiroSA vicesa mupen64plussa-audio-sdl \
|
||||
mupen64plussa-input-sdl mupen64plussa-ui-console mupen64plussa-video-rice \
|
||||
mupen64plussa-core mupen64plussa-rsp-hle mupen64plussa-video-glide64mk2 \
|
||||
lzdoom gzdoom ecwolf amiberry raze"
|
||||
lzdoom gzdoom ecwolf amiberry raze pico-8"
|
||||
|
||||
LIBRETRO_CORES="2048 81 a5200 atari800 beetle-gba beetle-lynx beetle-ngp beetle-pce beetle-pcfx \
|
||||
beetle-supafaust beetle-supergrafx beetle-vb beetle-wswan bluemsx cannonball cap32 \
|
||||
|
@ -118,9 +118,7 @@ post_install() {
|
|||
EOF
|
||||
|
||||
cp ${PKG_DIR}/sources/shutdown.sh ${INSTALL}/usr/bin
|
||||
cp ${PKG_DIR}/sources/start_pico8_dyn.sh ${INSTALL}/usr/bin
|
||||
cp ${PKG_DIR}/sources/scripts/* ${INSTALL}/usr/bin
|
||||
chmod 0755 ${INSTALL}/usr/bin/start_pico8_dyn.sh
|
||||
|
||||
if [ -d "${PKG_DIR}/sources/asound/${DEVICE}" ]
|
||||
then
|
||||
|
|
|
@ -19,11 +19,16 @@ do
|
|||
${script} 2>&1 >>${BOOTLOG}
|
||||
done
|
||||
|
||||
### Lock is a prerequisite for emustation
|
||||
rm /var/lock/start.games 2>&1 >>${BOOTLOG}
|
||||
touch /var/lock/start.games 2>&1 >>${BOOTLOG}
|
||||
systemctl start emustation 2>&1 >>${BOOTLOG} &
|
||||
|
||||
### Run common start scripts
|
||||
for script in /usr/lib/autostart/common/*
|
||||
do
|
||||
echo "Executing ${script}" 2>&1 >>${BOOTLOG}
|
||||
${script} 2>&1 >>${BOOTLOG}
|
||||
${script} 2>&1 >>${BOOTLOG} &
|
||||
done
|
||||
|
||||
### Run custom start scripts
|
||||
|
@ -32,17 +37,11 @@ then
|
|||
for script in /storage/.config/autostart/*
|
||||
do
|
||||
echo "Executing ${script}" 2>&1 >>${BOOTLOG}
|
||||
${script} 2>&1 >>${BOOTLOG}
|
||||
${script} 2>&1 >>${BOOTLOG} &
|
||||
done
|
||||
fi
|
||||
|
||||
normperf 2>&1 >>${BOOTLOG}
|
||||
|
||||
clear >/dev/console 2>&1 >>${BOOTLOG}
|
||||
|
||||
### Lock is a prerequisite for emustation
|
||||
rm /var/lock/start.games 2>&1 >>${BOOTLOG}
|
||||
touch /var/lock/start.games 2>&1 >>${BOOTLOG}
|
||||
systemctl start emustation 2>&1 >>${BOOTLOG}
|
||||
|
||||
normperf 2>&1 >>${BOOTLOG}
|
||||
date 2>&1 >>${BOOTLOG}
|
||||
|
|
|
@ -1299,7 +1299,7 @@
|
|||
<emulators>
|
||||
<emulator name="pico-8">
|
||||
<cores>
|
||||
<core default="true">pico8_dyn</core>
|
||||
<core default="true">pico8</core>
|
||||
</cores>
|
||||
</emulator>
|
||||
</emulators>
|
||||
|
|
Loading…
Reference in a new issue