From 9b9c5658930ac274ad2d03a65a7cdc73640073c3 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 1 Sep 2015 17:07:13 +0200 Subject: [PATCH] Merge files inside dist-cores.sh --- dist-scripts/dist-cores.sh | 36 ++++++++++++++++++++++++++---- dist-scripts/ps3-cores-cex-355.sh | 0 dist-scripts/ps3-cores-cobraode.sh | 36 ------------------------------ 3 files changed, 32 insertions(+), 40 deletions(-) delete mode 100755 dist-scripts/ps3-cores-cex-355.sh delete mode 100644 dist-scripts/ps3-cores-cobraode.sh diff --git a/dist-scripts/dist-cores.sh b/dist-scripts/dist-cores.sh index 62e3232aec..135f278f68 100755 --- a/dist-scripts/dist-cores.sh +++ b/dist-scripts/dist-cores.sh @@ -15,9 +15,21 @@ platform=ps3 EXE_PATH=/usr/local/cell/host-win32/bin fi +if [ $PLATFORM = "ode-ps3" ]; then +#For this script to work correctly, you must place the "data" folder containing your ps3 keys for scetool to use in the dist-scripts folder. +platform=ps3 + +GENPS3ISO_PATH=/cygdrive/c/Cobra_ODE_GenPS3iso_v2.3/genps3iso.exe +SCETOOL_PATH=/cygdrive/c/Users/aaa801/ps3tools/ps3tools/tools/scetool/scetool.exe +SCETOOL_FLAGS="--sce-type SELF --compress-data FALSE --self-type APP --key-revision 0004 --self-fw-version 0003004100000000 --self-app-version 0001000000000000 --self-auth-id 1010000001000003 --self-vendor-id 01000002 --self-cap-flags 00000000000000000000000000000000000000000000003b0000000100040000" +fi make -C ../ -f Makefile.${platform}.salamander clean || exit 1 -make -C ../ -f Makefile.${platform} clean || exit 1 +if [ $PLATFORM = "ode-ps3" ]; then + make -C ../ -f Makefile.${platform}.cobra clean || exit 1 +else + make -C ../ -f Makefile.${platform} clean || exit 1 +fi make -C ../ -f Makefile.${platform}.salamander || exit 1 @@ -34,18 +46,28 @@ for f in *_${platform}.a ; do fi echo "-- Building core: $name --" cp -f "$f" ../libretro_${platform}.a - make -C ../ -f Makefile.${platform} $whole_archive $big_stack -j3 || exit 1 + if [ $PLATFORM = "ode-ps3" ] ; then + make -C ../ -f Makefile.${platform}.cobra $whole_archive -j3 || exit 1 + else + make -C ../ -f Makefile.${platform} $whole_archive $big_stack -j3 || exit 1 + fi if [ $PLATFORM = "dex-ps3" ] ; then $MAKE_FSELF_NPDRM ../retroarch_${platform}.elf ../CORE.SELF fi if [ $PLATFORM = "cex-ps3" ] ; then - make -C ../ -f Makefile.${platform} $whole_archive -j3 || exit 1 make_self_wc ../retroarch_${platform}.elf ../CORE.SELF fi + if [ $PLATFORM = "ode-ps3" ] ; then + $SCETOOL_PATH $SCETOOL_FLAGS --encrypt ../retroarch_${platform}.elf ../CORE.SELF + fi if [ $platform = "ps3" ] ; then - mv -f ../CORE.SELF ../pkg/${platform}/USRDIR/cores/"${name}_libretro_${platform}.SELF" + if [ $PLATFORM = "ode-ps3" ] ; then + mv -f ../CORE.SELF ../pkg/${platform}/USRDIR/cores/"${name}_libretro_${platform}.SELF" + else + mv -f ../CORE.SELF ../${platform}/iso/PS3_GAME/USRDIR/cores/"${name}_libretro_${platform}.SELF" + fi rm -f ../retroarch_${platform}.elf ../retroarch_${platform}.self ../CORE.SELF fi done @@ -64,3 +86,9 @@ if [ $PLATFORM = "cex-ps3" ] ; then rm -rf ../retroarch-salamander_${platform}.elf python2 ../ps3/ps3py/pkg.py --contentid UP0001-SSNE10000_00-0000000000000001 ../pkg/${platform} retroarch-${platform}-cfw-$RARCH_VERSION.pkg fi +if [ $PLATFORM = "ode-ps3" ] ; then + $SCETOOL_PATH $SCETOOL_FLAGS --encrypt ../retroarch-salamander_${platform}.elf ../${platform}/iso/PS3_GAME/USRDIR/EBOOT.BIN + rm -rf ../retroarch-salamander_${platform}.elf + + $GENPS3ISO_PATH ../${platform}/iso RetroArch-COBRA-ODE.iso +fi diff --git a/dist-scripts/ps3-cores-cex-355.sh b/dist-scripts/ps3-cores-cex-355.sh deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/dist-scripts/ps3-cores-cobraode.sh b/dist-scripts/ps3-cores-cobraode.sh deleted file mode 100644 index d8680ff358..0000000000 --- a/dist-scripts/ps3-cores-cobraode.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -#For this script to work correctly, you must place the "data" folder containing your ps3 keys for scetool to use in the dist-scripts folder. -platform=ps3 - -make -C ../ -f Makefile.${platform}.salamander clean || exit 1 -make -C ../ -f Makefile.${platform}.cobra clean || exit 1 - -make -C ../ -f Makefile.${platform}.salamander || exit 1 - -GENPS3ISO_PATH=/cygdrive/c/Cobra_ODE_GenPS3iso_v2.3/genps3iso.exe -SCETOOL_PATH=/cygdrive/c/Users/aaa801/ps3tools/ps3tools/tools/scetool/scetool.exe -SCETOOL_FLAGS="--sce-type SELF --compress-data FALSE --self-type APP --key-revision 0004 --self-fw-version 0003004100000000 --self-app-version 0001000000000000 --self-auth-id 1010000001000003 --self-vendor-id 01000002 --self-cap-flags 00000000000000000000000000000000000000000000003b0000000100040000" - -for f in *_${platform}.a ; do - name=`echo "$f" | sed "s/\(_libretro_${platform}\|\).a$//"` - whole_archive= - if [ $name = "nxengine" ] ; then - echo "NXEngine found, applying whole archive linking..." - whole_archive="WHOLE_ARCHIVE_LINK=1" - echo $name yes - fi - cp -f "$f" ../libretro_${platform}.a - make -C ../ -f Makefile.${platform}.cobra $whole_archive -j3 || exit 1 - $SCETOOL_PATH $SCETOOL_FLAGS --encrypt ../retroarch_${platform}.elf ../CORE.SELF - mv -f ../CORE.SELF ../${platform}/iso/PS3_GAME/USRDIR/cores/"${name}_libretro_${platform}.SELF" - rm -f ../retroarch_${platform}.elf ../retroarch_${platform}.self ../CORE.SELF -done - -cp -r ../media/rmenu/*.png ../ps3/iso/PS3_GAME/USRDIR/cores/borders/Menu/ - -make -C ../ -f Makefile.griffin platform=${platform}-cobra shaders-deploy - -$SCETOOL_PATH $SCETOOL_FLAGS --encrypt ../retroarch-salamander_${platform}.elf ../${platform}/iso/PS3_GAME/USRDIR/EBOOT.BIN -rm -rf ../retroarch-salamander_${platform}.elf - -$GENPS3ISO_PATH ../${platform}/iso RetroArch-COBRA-ODE.iso