From 37d6bd97c669766c5a344cb0952d48ab196b3ee5 Mon Sep 17 00:00:00 2001 From: Jon Maddox Date: Tue, 26 Mar 2013 09:18:20 -0400 Subject: [PATCH 1/6] initial start to the ios build script --- libretro-build-ios.sh | 74 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100755 libretro-build-ios.sh diff --git a/libretro-build-ios.sh b/libretro-build-ios.sh new file mode 100755 index 00000000..9a86791a --- /dev/null +++ b/libretro-build-ios.sh @@ -0,0 +1,74 @@ +#!/bin/sh + +set -e + +CORES_DIR="$PWD/.." +ROOT_DIR=$CORES_DIR/libretro-super +RARCH_DIR=$CORES_DIR/RetroArch +RARCH_DIST_DIR=$RARCH_DIR/ios/modules + +export IOSSDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/ + +# clone/fetch the emulator core repos +cd $CORES_DIR +"$ROOT_DIR/libretro-fetch.sh" + + +MEDNAFEN_DIR_NAME=libretro-mednafen +build_libretro_mednafen() +{ + cd $CORES_DIR + if [ -d "$MEDNAFEN_DIR_NAME" ]; then + echo "=== Building Mednafen ===" + cd $MEDNAFEN_DIR_NAME + make clean + make -f Makefile platform=ios + cp "mednafen_psx_libretro.dylib" "$RARCH_DIST_DIR" + else + echo "Mednafen not fetched, skipping ..." + fi +} + + + + + +S9X_NEXT_DIR_NAME=libretro-s9x-next +build_libretro_s9x_next() +{ + cd $CORES_DIR + if [ -d "$S9X_NEXT_DIR_NAME" ]; then + echo "=== Building SNES9x-Next ===" + cd $S9X_NEXT_DIR_NAME + make -f Makefile.libretro clean + make -f Makefile.libretro platform=ios + + cp "snes9x_next_libretro.dylib" "$RARCH_DIST_DIR" + else + echo "SNES9x-Next not fetched, skipping ..." + fi +} + +NESTOPIA_DIR_NAME=libretro-nestopia/libretro +build_libretro_nestopia() +{ + cd $CORES_DIR + if [ -d "$NESTOPIA_DIR_NAME" ]; then + echo "=== Building Nestopia ===" + cd $NESTOPIA_DIR_NAME + make clean + make -f Makefile platform=ios + + cp "nestopia_libretro.dylib" "$RARCH_DIST_DIR" + else + echo "Nestopia not fetched, skipping ..." + fi +} + + + +build_libretro_mednafen +build_libretro_s9x_next +build_libretro_nestopia + + From ba1355d0d40eda12a654138eb382174aace58c19 Mon Sep 17 00:00:00 2001 From: Jon Maddox Date: Tue, 26 Mar 2013 10:06:31 -0400 Subject: [PATCH 2/6] all of the cores --- libretro-build-ios.sh | 195 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 190 insertions(+), 5 deletions(-) diff --git a/libretro-build-ios.sh b/libretro-build-ios.sh index 9a86791a..b23d1c7a 100755 --- a/libretro-build-ios.sh +++ b/libretro-build-ios.sh @@ -29,10 +29,6 @@ build_libretro_mednafen() fi } - - - - S9X_NEXT_DIR_NAME=libretro-s9x-next build_libretro_s9x_next() { @@ -49,6 +45,171 @@ build_libretro_s9x_next() fi } +GENPLUS_DIR_NAME=libretro-genplus +build_libretro_genplus() +{ + cd $CORES_DIR + if [ -d "$GENPLUS_DIR_NAME" ]; then + echo "=== Building Genplus GX ===" + cd $GENPLUS_DIR_NAME + make -f Makefile.libretro clean + make -f Makefile.libretro platform=ios + + cp "genesis_plus_gx_libretro.dylib" "$RARCH_DIST_DIR" + else + echo "Genplus GX not fetched, skipping ..." + fi +} + +FBA_DIR_NAME=libretro-fba +build_libretro_fba() +{ + cd $CORES_DIR + if [ -d "$FBA_DIR_NAME" ]; then + echo "=== Building Final Burn Alpha ===" + cd $FBA_DIR_NAME/svn-current/trunk + make -f makefile.libretro clean + make -f makefile.libretro platform=ios + + cp "fb_alpha_libretro.dylib" "$RARCH_DIST_DIR" + else + echo "Final Burn Alpha not fetched, skipping ..." + fi +} + +# TODO: get ios into makefile +# +# VBA_NEXT_DIR_NAME=libretro-vba +# build_libretro_vba() +# { +# cd $CORES_DIR +# if [ -d "$VBA_NEXT_DIR_NAME" ]; then +# echo "=== Building VBA-Next ===" +# cd $VBA_NEXT_DIR_NAME +# make -f Makefile.libretro clean +# make -f Makefile.libretro platform=ios +# +# +# else +# echo "VBA-Next not fetched, skipping ..." +# fi +# } + +# TODO: get ios into makefile +# +# FCEUMM_DIR_NAME=libretro-fceu +# build_libretro_fceu() +# { +# cd $CORES_DIR +# if [ -d "$FCEUMM_DIR_NAME" ]; then +# echo "=== Building FCEU ===" +# cd $FCEUMM_DIR_NAME +# make -f Makefile.libretro-fceux clean +# make -f Makefile.libretro-fceux platform=ios +# +# else +# echo "FCEU not fetched, skipping ..." +# fi +# } + +GAMBATTE_DIR_NAME=libretro-gambatte +build_libretro_gambatte() +{ + cd $CORES_DIR + if [ -d "$GAMBATTE_DIR_NAME" ]; then + echo "=== Building Gambatte ===" + cd $GAMBATTE_DIR_NAME/libgambatte + make -f Makefile.libretro clean + make -f Makefile.libretro platform=ios + + cp "gambatte_libretro.dylib" "$RARCH_DIST_DIR" + else + echo "Gambatte not fetched, skipping ..." + fi +} + +NXENGINE_DIR_NAME=libretro-nx +build_libretro_nx() +{ + cd $CORES_DIR + if [ -d "$NXENGINE_DIR_NAME" ]; then + echo "=== Building NXEngine ===" + cd $NXENGINE_DIR_NAME + make -f Makefile clean + make -f Makefile platform=ios + + cp "nxengine_libretro.dylib" "$RARCH_DIST_DIR" + else + echo "NXEngine not fetched, skipping ..." + fi +} + +PRBOOM_DIR_NAME=libretro-prboom +build_libretro_prboom() +{ + cd $CORES_DIR + if [ -d "$PRBOOM_DIR_NAME" ]; then + echo "=== Building PRBoom ===" + cd $PRBOOM_DIR_NAME + make -f Makefile clean + make -f Makefile platform=ios + + cp "prboom_libretro.dylib" "$RARCH_DIST_DIR" + else + echo "PRBoom not fetched, skipping ..." + fi +} + +STELLA_DIR_NAME=libretro-stella +build_libretro_stella() +{ + cd $CORES_DIR + if [ -d "$STELLA_DIR_NAME" ]; then + echo "=== Building Stella ===" + cd $STELLA_DIR_NAME + make -f Makefile clean + make -f Makefile platform=ios + + cp "stella_libretro.dylib" "$RARCH_DIST_DIR" + else + echo "Stella not fetched, skipping ..." + fi +} + +DESMUME_DIR_NAME=libretro-desmume +build_libretro_desmume() +{ + cd $CORES_DIR + if [ -d "$DESMUME_DIR_NAME" ]; then + echo "=== Building Desmume ===" + cd $DESMUME_DIR_NAME + make -f Makefile.libretro clean + make -f Makefile.libretro platform=ios + + cp "libretro.dylib" "$RARCH_DIST_DIR" + else + echo "Desmume not fetched, skipping ..." + fi +} + +# TODO: get ios into makefile +# +# QUICKNES_DIR_NAME=libretro-quicknes +# build_libretro_quicknes() +# { +# cd $CORES_DIR +# if [ -d "$QUICKNES_DIR_NAME" ]; then +# echo "=== Building QuickNES ===" +# cd $QUICKNES_DIR_NAME +# make -f Makefile clean +# make -f Makefile platform=ios +# +# # cp "quicknes_libretro.dylib" "$RARCH_DIST_DIR" +# else +# echo "QuickNES not fetched, skipping ..." +# fi +# } + NESTOPIA_DIR_NAME=libretro-nestopia/libretro build_libretro_nestopia() { @@ -65,10 +226,34 @@ build_libretro_nestopia() fi } +TYRQUAKE_DIR_NAME=libretro-tyrquake +build_libretro_tyrquake() +{ + cd $CORES_DIR + if [ -d "$TYRQUAKE_DIR_NAME" ]; then + echo "=== Building TyrQuake ===" + cd $TYRQUAKE_DIR_NAME + make -f Makefile.libretro clean + make -f Makefile.libretro platform=ios + cp "tyrquake_libretro.dylib" "$RARCH_DIST_DIR" + else + echo "TyrQuake not fetched, skipping ..." + fi +} build_libretro_mednafen build_libretro_s9x_next +build_libretro_genplus +build_libretro_fba +build_libretro_vba +build_libretro_fceu +build_libretro_gambatte +build_libretro_nx +build_libretro_prboom +build_libretro_stella +build_libretro_desmume +build_libretro_quicknes build_libretro_nestopia - +build_libretro_tyrquake From 4b8b14daee3d47371f9c1ff6186e94d8aae1e678 Mon Sep 17 00:00:00 2001 From: Jon Maddox Date: Tue, 26 Mar 2013 10:07:06 -0400 Subject: [PATCH 3/6] allow the ability to skip the fetching/cloning of the emu cores before building --- libretro-build-ios.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libretro-build-ios.sh b/libretro-build-ios.sh index b23d1c7a..a1fb9dbf 100755 --- a/libretro-build-ios.sh +++ b/libretro-build-ios.sh @@ -9,10 +9,11 @@ RARCH_DIST_DIR=$RARCH_DIR/ios/modules export IOSSDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/ -# clone/fetch the emulator core repos -cd $CORES_DIR -"$ROOT_DIR/libretro-fetch.sh" - +if ! $SKIPFETCH ; then + # clone/fetch the emulator core repos + cd $CORES_DIR + "$ROOT_DIR/libretro-fetch.sh" +fi MEDNAFEN_DIR_NAME=libretro-mednafen build_libretro_mednafen() From 41c790a3beedd7549c82a755ccb3608cec793003 Mon Sep 17 00:00:00 2001 From: Jon Maddox Date: Tue, 26 Mar 2013 10:35:45 -0400 Subject: [PATCH 4/6] quit early if we can't find the RetroArch repo --- libretro-build-ios.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libretro-build-ios.sh b/libretro-build-ios.sh index a1fb9dbf..c966f1de 100755 --- a/libretro-build-ios.sh +++ b/libretro-build-ios.sh @@ -7,6 +7,12 @@ ROOT_DIR=$CORES_DIR/libretro-super RARCH_DIR=$CORES_DIR/RetroArch RARCH_DIST_DIR=$RARCH_DIR/ios/modules +if [ ! -d "$RARCH_DIST_DIR" ] +then + echo "Can't find the RetroArch directory, quitting..." + exit 0 +fi + export IOSSDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/ if ! $SKIPFETCH ; then From 9e5056d047734fa215494e467a1e15c44aca1bc8 Mon Sep 17 00:00:00 2001 From: Jon Maddox Date: Tue, 26 Mar 2013 11:06:31 -0400 Subject: [PATCH 5/6] ignore these for now until we get them building the right way --- libretro-build-ios.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libretro-build-ios.sh b/libretro-build-ios.sh index c966f1de..84f41a18 100755 --- a/libretro-build-ios.sh +++ b/libretro-build-ios.sh @@ -253,14 +253,14 @@ build_libretro_mednafen build_libretro_s9x_next build_libretro_genplus build_libretro_fba -build_libretro_vba -build_libretro_fceu +# build_libretro_vba +# build_libretro_fceu build_libretro_gambatte build_libretro_nx build_libretro_prboom build_libretro_stella build_libretro_desmume -build_libretro_quicknes +# build_libretro_quicknes build_libretro_nestopia build_libretro_tyrquake From 6825695aea37507b7ce516f8c9259f8ac5d58f9e Mon Sep 17 00:00:00 2001 From: Jon Maddox Date: Tue, 26 Mar 2013 12:50:13 -0400 Subject: [PATCH 6/6] uhh do this right --- libretro-build-ios.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libretro-build-ios.sh b/libretro-build-ios.sh index 84f41a18..0d592b1d 100755 --- a/libretro-build-ios.sh +++ b/libretro-build-ios.sh @@ -15,7 +15,9 @@ fi export IOSSDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/ -if ! $SKIPFETCH ; then +if [ $SKIPFETCH == "true" ] ; then + echo "Skipping fetch of emulator cores." +else # clone/fetch the emulator core repos cd $CORES_DIR "$ROOT_DIR/libretro-fetch.sh"