test build for zip support

This commit is contained in:
Nicholas Ricciuti 2022-12-17 07:53:43 -05:00
parent f0153ebf3b
commit 5d1af1e533
No known key found for this signature in database
GPG key ID: CBB28CCF1964C6D1

View file

@ -36,9 +36,20 @@ if [[ ! -f "$M64PCONF" ]]; then
cp $SHARE/mupen64plus.cfg $M64PCONF cp $SHARE/mupen64plus.cfg $M64PCONF
fi fi
rm -rf $TMP # Create a clean working directory
if [ -d $TMP ]; then
rm -rf $TMP
fi
mkdir -p $TMP mkdir -p $TMP
# Unzip or copy the rom to the working directory
if [ `echo $2 | grep -i .zip | wc -l` -eq 1 ]; then
#unpack the zip file
unzip -q -o "$2" -d $TMP
else
cp $2 $TMP
fi
cp $M64PCONF $TMP cp $M64PCONF $TMP
SET_PARAMS="--set Core[SharedDataPath]=$TMP --set Video-Rice[ResolutionWidth]=$SCREENWIDTH" SET_PARAMS="--set Core[SharedDataPath]=$TMP --set Video-Rice[ResolutionWidth]=$SCREENWIDTH"
@ -94,19 +105,26 @@ else
SET_PARAMS="$SET_PARAMS --rsp mupen64plus-rsp-cxd4.so" SET_PARAMS="$SET_PARAMS --rsp mupen64plus-rsp-cxd4.so"
fi fi
# Get the true filename without extension
ROM_W_EXT="${2##*/}"
ROM="${FILE_W_EXT%%.*}"
echo ${SET_PARAMS} echo ${SET_PARAMS}
case $1 in case $1 in
"m64p_gliden64") "m64p_gliden64")
/usr/local/bin/mupen64plus --configdir $TMP --gfx mupen64plus-video-GLideN64 $SET_PARAMS "$2" /usr/local/bin/mupen64plus --configdir $TMP --gfx mupen64plus-video-GLideN64 $SET_PARAMS "$TMP/$ROM"
;; ;;
"m64p_gl64mk2") "m64p_gl64mk2")
/usr/local/bin/mupen64plus --configdir $TMP --gfx mupen64plus-video-glide64mk2 $SET_PARAMS "$2" /usr/local/bin/mupen64plus --configdir $TMP --gfx mupen64plus-video-glide64mk2 $SET_PARAMS "$TMP/$ROM"
;; ;;
"m64p_rice") "m64p_rice")
/usr/local/bin/mupen64plus --configdir $TMP --gfx mupen64plus-video-rice $SET_PARAMS "$2" /usr/local/bin/mupen64plus --configdir $TMP --gfx mupen64plus-video-rice $SET_PARAMS "$TMP/$ROM"
;; ;;
*) *)
/usr/local/bin/mupen64plus --configdir $TMP --gfx mupen64plus-video-rice $SET_PARAMS "$2" /usr/local/bin/mupen64plus --configdir $TMP --gfx mupen64plus-video-rice $SET_PARAMS "$TMP/$ROM"
;; ;;
esac esac
# Remove temporary dir
mkdir -p $TMP