2015-09-01 17:00:07 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2018-02-03 21:56:24 -08:00
|
|
|
. ../version.all
|
2015-09-01 17:00:07 +02:00
|
|
|
PLATFORM=$1
|
2015-09-01 17:31:34 +02:00
|
|
|
SALAMANDER=no
|
|
|
|
MAKEFILE_GRIFFIN=no
|
2015-09-01 17:00:07 +02:00
|
|
|
|
2015-09-01 17:14:14 +02:00
|
|
|
# PSP
|
2016-02-05 17:03:00 +01:00
|
|
|
if [ $PLATFORM = "unix" ] ; then
|
|
|
|
platform=unix
|
2016-02-05 15:13:06 +01:00
|
|
|
SALAMANDER=no
|
|
|
|
EXT=a
|
|
|
|
|
|
|
|
mkdir -p ../pkg/${platform}/
|
|
|
|
|
|
|
|
# For statically linked cores, we need to configure once
|
|
|
|
cd ..
|
|
|
|
LDFLAGS=-L. ./configure --disable-dynamic
|
|
|
|
cd dist-scripts
|
2016-10-10 10:49:09 +02:00
|
|
|
|
2018-12-31 13:47:58 +01:00
|
|
|
elif [ $PLATFORM = "ps2" ] ; then
|
|
|
|
platform=ps2
|
2020-06-07 21:00:47 +02:00
|
|
|
SALAMANDER=yes
|
2018-12-31 13:47:58 +01:00
|
|
|
EXT=a
|
2020-07-01 17:51:16 +02:00
|
|
|
OPTS=release
|
2018-12-31 13:47:58 +01:00
|
|
|
|
|
|
|
mkdir -p ../pkg/${platform}/cores/
|
|
|
|
|
2016-02-05 15:13:06 +01:00
|
|
|
elif [ $PLATFORM = "psp1" ] ; then
|
2015-09-01 17:14:14 +02:00
|
|
|
platform=psp1
|
2015-09-01 17:31:34 +02:00
|
|
|
SALAMANDER=yes
|
2015-09-02 12:34:05 +02:00
|
|
|
EXT=a
|
2015-09-01 17:14:14 +02:00
|
|
|
|
|
|
|
mkdir -p ../pkg/${platform}/cores/
|
|
|
|
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../bootstrap/${platform}/kernel_functions_prx/ clean || exit 1
|
|
|
|
make -C ../bootstrap/${platform}/kernel_functions_prx/ || exit 1
|
2015-09-01 17:14:14 +02:00
|
|
|
cp -f ../kernel_functions.prx ../pkg/${platform}/kernel_functions.prx
|
2015-09-01 17:31:34 +02:00
|
|
|
|
|
|
|
# Vita
|
|
|
|
elif [ $PLATFORM = "vita" ] ; then
|
|
|
|
platform=vita
|
2016-10-10 10:49:09 +02:00
|
|
|
SALAMANDER=yes
|
2015-09-02 12:34:05 +02:00
|
|
|
EXT=a
|
2016-08-02 00:57:00 +02:00
|
|
|
mkdir -p ../pkg/vita/vpk
|
2018-09-28 01:10:25 +02:00
|
|
|
|
|
|
|
# Nintendo Switch (libnx)
|
|
|
|
elif [ $PLATFORM = "libnx" ] ; then
|
|
|
|
platform=libnx
|
|
|
|
EXT=a
|
|
|
|
|
2015-09-07 20:01:00 +01:00
|
|
|
# CTR/3DS
|
|
|
|
elif [ $PLATFORM = "ctr" ] ; then
|
|
|
|
platform=ctr
|
2016-10-08 01:47:15 +01:00
|
|
|
SALAMANDER=yes
|
2015-09-07 20:01:00 +01:00
|
|
|
EXT=a
|
2018-05-19 09:59:47 -07:00
|
|
|
mkdir -p ../pkg/${platform}/build/cia
|
|
|
|
mkdir -p ../pkg/${platform}/build/3dsx
|
|
|
|
mkdir -p ../pkg/${platform}/build/rom
|
2015-09-07 20:01:00 +01:00
|
|
|
|
2015-09-02 14:00:36 +02:00
|
|
|
# Emscripten
|
|
|
|
elif [ $PLATFORM = "emscripten" ] ; then
|
|
|
|
platform=emscripten
|
|
|
|
EXT=bc
|
|
|
|
|
|
|
|
if [ -z "$EMSCRIPTEN" ] ; then
|
|
|
|
echo "run this script with emmake. Ex: emmake $0"
|
2019-11-11 15:05:18 +01:00
|
|
|
exit 1
|
2015-09-02 14:00:36 +02:00
|
|
|
fi
|
|
|
|
|
2015-09-01 17:41:20 +02:00
|
|
|
# Wii
|
|
|
|
elif [ $PLATFORM = "wii" ] ; then
|
|
|
|
platform=wii
|
|
|
|
MAKEFILE_GRIFFIN=yes
|
|
|
|
SALAMANDER=yes
|
2015-09-02 12:34:05 +02:00
|
|
|
EXT=a
|
2015-09-01 17:41:20 +02:00
|
|
|
|
|
|
|
# NGC
|
|
|
|
elif [ $PLATFORM = "ngc" ] ; then
|
|
|
|
platform=ngc
|
|
|
|
MAKEFILE_GRIFFIN=yes
|
2015-09-02 12:34:05 +02:00
|
|
|
EXT=a
|
2015-09-01 17:41:20 +02:00
|
|
|
|
2020-03-07 21:27:38 +01:00
|
|
|
# PSL1GHT
|
|
|
|
elif [ $PLATFORM = "psl1ght" ] ; then
|
|
|
|
platform=psl1ght
|
|
|
|
SALAMANDER=yes
|
|
|
|
EXT=a
|
|
|
|
ps3appid=SSNE10001
|
|
|
|
|
2020-05-11 19:15:01 +02:00
|
|
|
elif [ $PLATFORM = "dos" ]; then
|
|
|
|
platform=dos
|
|
|
|
MAKEFILE_GRIFFIN=yes
|
|
|
|
EXT=a
|
2020-05-12 17:39:04 +02:00
|
|
|
SALAMANDER=yes
|
2015-09-01 17:07:13 +02:00
|
|
|
fi
|
2015-09-01 17:00:07 +02:00
|
|
|
|
2015-09-07 14:17:14 +01:00
|
|
|
# Cleanup Salamander core if it exists
|
2015-09-01 17:31:34 +02:00
|
|
|
if [ $SALAMANDER = "yes" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform}.salamander clean || exit 1
|
2015-09-01 17:31:34 +02:00
|
|
|
fi
|
|
|
|
|
2015-09-07 14:17:14 +01:00
|
|
|
# Cleanup existing core if it exists
|
2020-12-19 15:36:07 +01:00
|
|
|
if [ $MAKEFILE_GRIFFIN = "yes" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.griffin platform=${platform} clean || exit 1
|
2016-02-05 17:03:00 +01:00
|
|
|
elif [ $PLATFORM = "unix" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
LINK=g++ make -C ../ -f Makefile clean || exit 1
|
2015-09-01 17:07:13 +02:00
|
|
|
else
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform} clean || exit 1
|
2015-09-01 17:07:13 +02:00
|
|
|
fi
|
2015-09-01 17:00:07 +02:00
|
|
|
|
2015-09-01 17:31:34 +02:00
|
|
|
# Compile Salamander core
|
|
|
|
if [ $SALAMANDER = "yes" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform}.salamander $OPTS || exit 1
|
2020-06-07 21:00:47 +02:00
|
|
|
if [ $PLATFORM = "ps2" ] ; then
|
2020-07-06 10:22:19 +02:00
|
|
|
mv -f ../raboot.elf ../pkg/${platform}/raboot.elf
|
2020-06-07 21:00:47 +02:00
|
|
|
fi
|
2015-09-07 14:37:32 +01:00
|
|
|
if [ $PLATFORM = "psp1" ] ; then
|
|
|
|
mv -f ../EBOOT.PBP ../pkg/${platform}/EBOOT.PBP
|
|
|
|
fi
|
2020-05-12 17:39:04 +02:00
|
|
|
if [ $platform = "dos" ] ; then
|
|
|
|
mkdir -p ../pkg/${platform}
|
|
|
|
mv -f ../retrodos_salamander.exe ../pkg/${platform}/RETRODOS.EXE
|
|
|
|
fi
|
2016-10-10 10:49:09 +02:00
|
|
|
if [ $PLATFORM = "vita" ] ; then
|
|
|
|
mkdir -p ../pkg/${platform}/retroarch.vpk/vpk/sce_sys/livearea/contents
|
2017-04-28 08:29:58 +02:00
|
|
|
vita-make-fself -c -s ../retroarchvita_salamander.velf ../pkg/${platform}/retroarch.vpk/vpk/eboot.bin
|
2019-10-03 13:58:23 +02:00
|
|
|
vita-mksfoex -s TITLE_ID=RETROVITA "RetroArch" -d ATTRIBUTE2=12 ../pkg/${platform}/retroarch.vpk/vpk/sce_sys/param.sfo
|
2016-10-10 10:49:09 +02:00
|
|
|
cp ../pkg/${platform}/assets/ICON0.PNG ../pkg/${platform}/retroarch.vpk/vpk/sce_sys/icon0.png
|
|
|
|
cp -R ../pkg/${platform}/assets/livearea ../pkg/${platform}/retroarch.vpk/vpk/sce_sys/
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform}.salamander clean || exit 1
|
2016-10-10 10:49:09 +02:00
|
|
|
fi
|
2016-10-08 01:47:15 +01:00
|
|
|
if [ $PLATFORM = "ctr" ] ; then
|
2018-05-19 09:59:47 -07:00
|
|
|
mv -f ../retroarch_3ds_salamander.cia ../pkg/${platform}/build/cia/retroarch_3ds.cia
|
2018-05-19 11:35:12 -07:00
|
|
|
mkdir -p ../pkg/${platform}/build/3dsx/3ds/RetroArch
|
|
|
|
mv -f ../retroarch_3ds_salamander.3dsx ../pkg/${platform}/build/3dsx/3ds/RetroArch/RetroArch.3dsx
|
|
|
|
mv -f ../retroarch_3ds_salamander.smdh ../pkg/${platform}/build/3dsx/3ds/RetroArch/RetroArch.smdh
|
2018-05-19 09:59:47 -07:00
|
|
|
# the .3ds port cant use salamander since you can only have one ROM on a cartridge at once
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform}.salamander clean || exit 1
|
2016-10-08 01:47:15 +01:00
|
|
|
fi
|
2015-09-28 03:05:11 +02:00
|
|
|
if [ $PLATFORM = "wii" ] ; then
|
|
|
|
mv -f ../retroarch-salamander_wii.dol ../pkg/${platform}/boot.dol
|
|
|
|
fi
|
2015-09-01 17:31:34 +02:00
|
|
|
fi
|
2015-09-01 17:00:07 +02:00
|
|
|
|
2016-08-01 23:28:23 -05:00
|
|
|
COUNTER=0
|
2016-08-02 00:57:00 +02:00
|
|
|
|
2018-09-29 12:20:43 -05:00
|
|
|
if [ $PLATFORM = "libnx" ]; then
|
2018-09-29 12:46:19 -05:00
|
|
|
echo Buildbot: building static core for ${platform}
|
|
|
|
mkdir -p ../pkg/${platform}/switch
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform} HAVE_STATIC_DUMMY=1 -j3 || exit 1
|
2018-09-29 12:20:43 -05:00
|
|
|
mv -f ../retroarch_switch.nro ../pkg/${platform}/switch/retroarch_switch.nro
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform} clean || exit 1
|
2018-09-29 12:20:43 -05:00
|
|
|
fi
|
|
|
|
|
2016-08-02 08:14:10 -05:00
|
|
|
#for f in *_${platform}.${EXT} ; do
|
2017-06-19 14:16:44 -05:00
|
|
|
for f in `ls -v *_${platform}.${EXT}`; do
|
2018-09-29 12:46:19 -05:00
|
|
|
|
|
|
|
echo Buildbot: building ${name} for ${platform}
|
2015-09-02 12:34:05 +02:00
|
|
|
name=`echo "$f" | sed "s/\(_libretro_${platform}\|\).${EXT}$//"`
|
2016-09-28 19:43:39 -05:00
|
|
|
async=0
|
|
|
|
pthread=0
|
2015-09-02 14:00:36 +02:00
|
|
|
lto=0
|
2015-09-01 17:00:07 +02:00
|
|
|
whole_archive=
|
2015-09-01 18:27:49 +02:00
|
|
|
big_stack=
|
2016-10-10 10:49:09 +02:00
|
|
|
|
2015-09-01 17:00:07 +02:00
|
|
|
if [ $name = "nxengine" ] ; then
|
|
|
|
echo "Applying whole archive linking..."
|
|
|
|
whole_archive="WHOLE_ARCHIVE_LINK=1"
|
2015-09-01 17:31:34 +02:00
|
|
|
elif [ $name = "tyrquake" ] ; then
|
2015-09-01 17:00:07 +02:00
|
|
|
echo "Applying big stack..."
|
2015-09-02 14:00:36 +02:00
|
|
|
lto=0
|
2015-09-01 17:00:07 +02:00
|
|
|
big_stack="BIG_STACK=1"
|
2016-09-21 14:10:05 -06:00
|
|
|
elif [ $name = "mupen64plus" ] ; then
|
|
|
|
async=1
|
2016-09-28 17:57:32 -05:00
|
|
|
elif [ $name = "dosbox" ] ; then
|
2016-09-28 20:14:50 -05:00
|
|
|
async=0
|
2015-09-01 17:00:07 +02:00
|
|
|
fi
|
|
|
|
echo "-- Building core: $name --"
|
2016-02-05 17:03:00 +01:00
|
|
|
if [ $PLATFORM = "unix" ]; then
|
2016-02-05 15:13:06 +01:00
|
|
|
cp -f "$f" ../libretro.${EXT}
|
|
|
|
else
|
|
|
|
cp -f "$f" ../libretro_${platform}.${EXT}
|
|
|
|
fi
|
2016-09-28 19:43:39 -05:00
|
|
|
echo NAME: $name
|
|
|
|
echo ASYNC: $async
|
|
|
|
echo LTO: $lto
|
2015-09-01 17:14:14 +02:00
|
|
|
|
2015-09-01 17:31:34 +02:00
|
|
|
# Do cleanup if this is a big stack core
|
2015-09-07 14:17:14 +01:00
|
|
|
if [ "$big_stack" = "BIG_STACK=1" ] ; then
|
2015-09-01 17:31:34 +02:00
|
|
|
if [ $MAKEFILE_GRIFFIN = "yes" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.griffin platform=${platform} clean || exit 1
|
2015-09-02 14:00:36 +02:00
|
|
|
elif [ $PLATFORM = "emscripten" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.emscripten PTHREAD=$pthread ASYNC=$async LTO=$lto -j7 clean || exit 1
|
2016-02-05 17:38:09 +01:00
|
|
|
elif [ $PLATFORM = "unix" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile LINK=g++ LTO=$lto -j7 clean || exit 1
|
2015-09-01 17:31:34 +02:00
|
|
|
else
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform} clean || exit 1
|
2015-09-01 17:31:34 +02:00
|
|
|
fi
|
2015-09-01 17:14:14 +02:00
|
|
|
fi
|
|
|
|
|
2015-09-01 17:31:34 +02:00
|
|
|
# Compile core
|
2016-08-09 19:47:29 +02:00
|
|
|
if [ $MAKEFILE_GRIFFIN = "yes" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.griffin $OPTS platform=${platform} $whole_archive $big_stack -j3 || exit 1
|
2015-09-02 14:00:36 +02:00
|
|
|
elif [ $PLATFORM = "emscripten" ]; then
|
2016-09-28 19:26:15 -05:00
|
|
|
echo "BUILD COMMAND: make -C ../ -f Makefile.emscripten PTHREAD=$pthread ASYNC=$async LTO=$lto -j7 TARGET=${name}_libretro.js"
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.emscripten $OPTS PTHREAD=$pthread ASYNC=$async LTO=$lto -j7 TARGET=${name}_libretro.js || exit 1
|
2016-02-05 17:03:00 +01:00
|
|
|
elif [ $PLATFORM = "unix" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile LINK=g++ $whole_archive $big_stack -j3 || exit 1
|
2015-09-11 22:07:12 +01:00
|
|
|
elif [ $PLATFORM = "ctr" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform} $OPTS LIBRETRO=$name $whole_archive $big_stack -j3 || exit 1
|
2018-09-28 01:10:25 +02:00
|
|
|
elif [ $PLATFORM = "libnx" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform} $OPTS APP_TITLE="$name" LIBRETRO=$name $whole_archive $big_stack -j3 || exit 1
|
2019-03-20 22:32:12 +01:00
|
|
|
elif [ $PLATFORM = "ps2" ]; then
|
|
|
|
# TODO PS2 should be able to compile in parallel
|
2020-07-01 17:51:16 +02:00
|
|
|
make -C ../ -f Makefile.${platform} $OPTS || exit 1
|
2015-09-01 17:07:13 +02:00
|
|
|
else
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform} $OPTS $whole_archive $big_stack -j3 || exit 1
|
2015-09-01 17:07:13 +02:00
|
|
|
fi
|
2015-09-01 17:00:07 +02:00
|
|
|
|
2015-09-01 17:31:34 +02:00
|
|
|
# Move executable files
|
2020-03-07 21:27:38 +01:00
|
|
|
if [ $platform = "psl1ght" ] ; then
|
|
|
|
mv -fv ../retroarch_psl1ght.self ../pkg/psl1ght/pkg/USRDIR/cores/"${name}_libretro_${platform}.SELF"
|
|
|
|
if [ -d ../../dist/info ]; then
|
2020-05-04 11:43:47 +02:00
|
|
|
mkdir -p ../pkg/psl1ght/pkg/USRDIR/cores/info
|
|
|
|
cp -fv ../../dist/info/"${name}_libretro.info" ../pkg/psl1ght/pkg/USRDIR/cores/info/"${name}_libretro.info"
|
2020-03-07 21:27:38 +01:00
|
|
|
fi
|
2018-12-31 13:47:58 +01:00
|
|
|
elif [ $PLATFORM = "ps2" ] ; then
|
2020-06-07 21:00:47 +02:00
|
|
|
mv -f ../retroarchps2.elf ../pkg/${platform}/cores/${name}_libretro_${platform}.elf
|
2015-09-01 17:31:34 +02:00
|
|
|
elif [ $PLATFORM = "psp1" ] ; then
|
|
|
|
mv -f ../EBOOT.PBP ../pkg/${platform}/cores/${name}_libretro.PBP
|
|
|
|
elif [ $PLATFORM = "vita" ] ; then
|
2016-08-01 23:28:23 -05:00
|
|
|
COUNTER=$((COUNTER + 1))
|
2016-08-02 18:45:41 -05:00
|
|
|
COUNTER_ID=`printf "%05d" ${COUNTER}`
|
2017-11-13 21:11:51 +01:00
|
|
|
cp ../retroarch_${platform}.self ../pkg/${platform}/retroarch.vpk/vpk/${name}_libretro.self
|
2016-10-10 11:43:05 +02:00
|
|
|
if [ -d ../../dist/info ]; then
|
|
|
|
mkdir -p ../pkg/${platform}/retroarch.vpk/vpk/info
|
2017-11-14 19:52:45 +01:00
|
|
|
cp -fv ../../dist/info/"${name}_libretro.info" ../pkg/${platform}/retroarch.vpk/vpk/info/"${name}_libretro.info"
|
2016-10-10 11:43:05 +02:00
|
|
|
fi
|
2015-09-07 20:01:00 +01:00
|
|
|
elif [ $PLATFORM = "ctr" ] ; then
|
2018-05-19 09:59:47 -07:00
|
|
|
mv -f ../retroarch_3ds.cia ../pkg/${platform}/build/cia/${name}_libretro.cia
|
2018-05-19 10:03:57 -07:00
|
|
|
mv -f ../retroarch_3ds.3dsx ../pkg/${platform}/build/3dsx/${name}_libretro.3dsx
|
2018-05-19 09:59:47 -07:00
|
|
|
mv -f ../retroarch_3ds.3ds ../pkg/${platform}/build/rom/${name}_libretro.3ds
|
2018-09-28 01:10:25 +02:00
|
|
|
elif [ $PLATFORM = "libnx" ] ; then
|
2018-09-29 12:20:43 -05:00
|
|
|
mkdir -p ../pkg/${platform}/retroarch/cores/
|
2018-09-29 19:25:59 +02:00
|
|
|
mv -f ../retroarch_switch.nro ../pkg/${platform}/retroarch/cores/${name}_libretro_${platform}.nro
|
2016-02-05 17:03:00 +01:00
|
|
|
elif [ $PLATFORM = "unix" ] ; then
|
|
|
|
mv -f ../retroarch ../pkg/${platform}/${name}_libretro.elf
|
2015-09-01 17:41:20 +02:00
|
|
|
elif [ $PLATFORM = "ngc" ] ; then
|
|
|
|
mv -f ../retroarch_${platform}.dol ../pkg/${platform}/${name}_libretro_${platform}.dol
|
|
|
|
elif [ $PLATFORM = "wii" ] ; then
|
2020-05-11 19:15:01 +02:00
|
|
|
mv -f ../retroarch_${platform}.dol ../pkg/${platform}/${name}_libretro_${platform}.dol
|
|
|
|
elif [ $PLATFORM = "dos" ] ; then
|
2020-05-12 17:39:04 +02:00
|
|
|
mkdir -p ../pkg/${platform}/cores
|
|
|
|
mv -f ../retrodos.exe ../pkg/${platform}/cores/${name}.exe
|
2015-09-02 14:00:36 +02:00
|
|
|
elif [ $PLATFORM = "emscripten" ] ; then
|
2016-08-28 19:14:42 -05:00
|
|
|
mkdir -p ../pkg/emscripten/
|
|
|
|
mv -f ../${name}_libretro.js ../pkg/emscripten/${name}_libretro.js
|
2018-01-16 19:18:53 -06:00
|
|
|
mv -f ../${name}_libretro.wasm ../pkg/emscripten/${name}_libretro.wasm
|
2016-09-23 10:25:07 -06:00
|
|
|
if [ $pthread != 0 ] ; then
|
|
|
|
mv -f ../pthread-main.js ../pkg/emscripten/pthread-main.js
|
|
|
|
fi
|
2015-09-01 17:31:34 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove executable files
|
2020-03-07 21:27:38 +01:00
|
|
|
if [ $platform = "psl1ght" ] ; then
|
|
|
|
rm -f ../retroarch_${platform}.elf ../retroarch_${platform}.self ../CORE.SELF
|
2018-12-31 13:47:58 +01:00
|
|
|
elif [ $PLATFORM = "ps2" ] ; then
|
|
|
|
rm -f ../retroarchps2.elf
|
2020-06-07 21:00:47 +02:00
|
|
|
rm -f ../retroarchps2-debug.elf
|
2015-09-01 17:31:34 +02:00
|
|
|
elif [ $PLATFORM = "psp1" ] ; then
|
|
|
|
rm -f ../retroarchpsp.elf
|
|
|
|
elif [ $PLATFORM = "vita" ] ; then
|
2016-08-02 00:57:00 +02:00
|
|
|
rm -f ../retroarch_${platform}.velf ../retroarch_${platform}.elf ../eboot.bin
|
2015-09-07 20:01:00 +01:00
|
|
|
elif [ $PLATFORM = "ctr" ] ; then
|
2015-10-06 18:55:10 +01:00
|
|
|
rm -f ../retroarch_3ds.elf
|
2015-09-11 22:07:12 +01:00
|
|
|
rm -f ../retroarch_3ds.bnr
|
|
|
|
rm -f ../retroarch_3ds.icn
|
2018-09-28 01:10:25 +02:00
|
|
|
elif [ $PLATFORM = "libnx" ] ; then
|
|
|
|
rm -f ../retroarch_switch.elf
|
|
|
|
rm -f ../retroarch_switch.nacp
|
|
|
|
rm -f ../retroarch_switch.nso
|
2016-02-05 17:03:00 +01:00
|
|
|
elif [ $PLATFORM = "unix" ] ; then
|
2016-02-05 15:13:06 +01:00
|
|
|
rm -f ../retroarch
|
2015-09-01 17:41:20 +02:00
|
|
|
elif [ $PLATFORM = "ngc" ] ; then
|
|
|
|
rm -f ../retroarch_${platform}.dol ../retroarch_${platform}.elf ../retroarch_${platform}.elf.map
|
|
|
|
elif [ $PLATFORM = "wii" ] ; then
|
2017-06-19 14:16:44 -05:00
|
|
|
rm -f ../retroarch_${platform}.dol ../retroarch_${platform}.elf ../retroarch_${platform}.elf.map
|
2015-09-02 14:00:36 +02:00
|
|
|
elif [ $platform = "emscripten" ] ; then
|
2016-08-28 19:14:42 -05:00
|
|
|
rm -f ../${name}_libretro.js
|
2015-09-01 17:00:07 +02:00
|
|
|
fi
|
2015-09-01 17:14:14 +02:00
|
|
|
|
2015-09-01 17:31:34 +02:00
|
|
|
# Do cleanup if this is a big stack core
|
2015-09-07 14:17:14 +01:00
|
|
|
if [ "$big_stack" = "BIG_STACK=1" ] ; then
|
2015-09-01 17:31:34 +02:00
|
|
|
if [ $MAKEFILE_GRIFFIN = "yes" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.griffin platform=${platform} clean || exit 1
|
2015-09-02 14:00:36 +02:00
|
|
|
elif [ $PLATFORM = "emscripten" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.emscripten PTHREAD=$pthread ASYNC=$async LTO=$lto -j7 clean || exit 1
|
2016-02-05 17:03:00 +01:00
|
|
|
elif [ $PLATFORM = "unix" ]; then
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile LTO=$lto -j7 clean || exit 1
|
2015-09-01 17:31:34 +02:00
|
|
|
else
|
2019-11-19 09:58:58 +01:00
|
|
|
make -C ../ -f Makefile.${platform} clean || exit 1
|
2015-09-01 17:31:34 +02:00
|
|
|
fi
|
2015-09-01 17:14:14 +02:00
|
|
|
fi
|
2015-09-01 17:00:07 +02:00
|
|
|
done
|
|
|
|
|
2015-09-01 17:31:34 +02:00
|
|
|
# Additional build step
|
2020-12-19 15:36:07 +01:00
|
|
|
if [ $platform = "psl1ght" ] ; then
|
|
|
|
ps3pkgdir=pkg/psl1ght/pkg
|
2016-08-09 20:37:07 +02:00
|
|
|
echo Deploy : Assets...
|
2016-08-09 19:05:38 -05:00
|
|
|
if [ -d ../media/assets ]; then
|
2020-03-07 21:27:38 +01:00
|
|
|
mkdir -p ../${ps3pkgdir}/USRDIR/cores/assets
|
|
|
|
cp -r ../media/assets/* ../${ps3pkgdir}/USRDIR/cores/assets
|
2016-08-09 19:05:38 -05:00
|
|
|
fi
|
2016-08-09 20:37:07 +02:00
|
|
|
echo Deploy : Databases...
|
2016-08-09 19:05:38 -05:00
|
|
|
if [ -d ../media/libretrodb/rdb ]; then
|
2020-03-07 21:27:38 +01:00
|
|
|
mkdir -p ../${ps3pkgdir}/USRDIR/cores/database/rdb
|
|
|
|
cp -r ../media/libretrodb/rdb/* ../${ps3pkgdir}/USRDIR/cores/database/rdb
|
2016-08-10 07:40:21 +02:00
|
|
|
fi
|
|
|
|
if [ -d ../media/libretrodb/cursors ]; then
|
2020-03-07 21:27:38 +01:00
|
|
|
mkdir -p ../${ps3pkgdir}/USRDIR/cores/database/cursors
|
|
|
|
cp -r ../media/libretrodb/cursors/* ../${ps3pkgdir}/USRDIR/cores/database/cursors
|
2016-08-09 19:05:38 -05:00
|
|
|
fi
|
2016-08-09 20:37:07 +02:00
|
|
|
echo Deploy : Overlays...
|
2016-08-09 19:05:38 -05:00
|
|
|
if [ -d ../media/overlays ]; then
|
2020-03-07 21:27:38 +01:00
|
|
|
mkdir -p ../${ps3pkgdir}/USRDIR/cores/overlays
|
|
|
|
cp -r ../media/overlays/* ../${ps3pkgdir}/USRDIR/cores/overlays
|
2016-08-09 19:05:38 -05:00
|
|
|
fi
|
2016-08-09 20:37:07 +02:00
|
|
|
echo Deploy : Shaders...
|
2016-08-09 19:05:38 -05:00
|
|
|
if [ -d ../media/shaders_cg ]; then
|
2020-03-07 21:27:38 +01:00
|
|
|
mkdir -p ../${ps3pkgdir}/USRDIR/cores/shaders_cg
|
|
|
|
cp -r ../media/shaders_cg/* ../${ps3pkgdir}/USRDIR/cores/shaders_cg
|
2016-08-09 19:05:38 -05:00
|
|
|
fi
|
2016-08-09 19:17:55 -05:00
|
|
|
fi
|
2015-09-01 17:00:07 +02:00
|
|
|
fi
|
|
|
|
|
2015-09-01 17:31:34 +02:00
|
|
|
# Packaging
|
2020-12-19 15:36:07 +01:00
|
|
|
if [ $PLATFORM = "psl1ght" ] ; then
|
2020-04-09 15:27:04 +02:00
|
|
|
${PS3DEV}/bin/pkg.py --contentid UP0001-SSNE10001_00-0000000000000001 ../pkg/psl1ght/pkg/ ../pkg/psl1ght/RetroArch.PSL1GHT.pkg
|
2015-09-01 17:07:13 +02:00
|
|
|
fi
|