From 6eb71feccfddf0c2f2826c422ebe6f15b5b2d2f2 Mon Sep 17 00:00:00 2001 From: radius Date: Sat, 7 Mar 2015 16:51:20 -0500 Subject: [PATCH 01/30] finishing touches --- libretro-buildbot-recipe.sh | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 0aeae734..c756a51e 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -1528,9 +1528,9 @@ then then cd $RADIR - rm -rfv wii/bot_pkg + #rm -rfv wii/pkg echo "BUILDBOT JOB: $jobid Building" - echo + echo if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then @@ -1538,8 +1538,8 @@ then cd dist-scripts rm *.a cp -v $RARCH_DIST_DIR/*.a . - - ls -1 *.a | awk -F "." ' { print "cp " $0 " " $1 "_psp1." $2 }' |sh + + ls -1 *.a | awk -F "." ' { print "cp " $0 " " $1 "_wii." $2 }' |sh sh ./wii-cores.sh if [ $? -eq 0 ]; then @@ -1550,24 +1550,25 @@ then echo $MESSAGE fi buildbot_log "$MESSAGE" - cd .. + cd .. + + fi - fi - echo "Packaging" echo ============================================ cp retroarch.cfg retroarch.default.cfg - - - mkdir -p wii/bot_pkg/ - mkdir -p wii/bot_pkg/cheats - mkdir -p wii/bot_pkg/database - mkdir -p wii/bot_pkg/database/cursors - mkdir -p wii/bot_pkg/database/rdb - - cp -Rfv media/libretrodb/cht/* wii/bot_pkg/cheats - cp -Rfv media/libretrodb/rdb/* wii/bot_pkg/database/rdb - cp -Rfv media/libretrodb/cursors/* wii/bot_pkg/database/cursors + + mkdir -p wii/pkg/ + mkdir -p wii/pkg/overlays + mkdir -p wii/pkg/cheats + mkdir -p wii/pkg/database + mkdir -p wii/pkg/database/cursors + mkdir -p wii/pkg/database/rdb + + cp -Rfv media/libretrodb/cht/* wii/pkg/cheats + cp -Rfv media/libretrodb/rdb/* wii/pkg/database/rdb + cp -Rfv media/libretrodb/cursors/* wii/pkg/database/cursors + cp -Rfv media/overlays/* wii/pkg/overlays fi From 26dbe162df7c2f577c0b324aaeeb9483df74def7 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 8 Mar 2015 14:21:11 -0400 Subject: [PATCH 02/30] add additional recipes --- recipes/wii/devkitwii | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/recipes/wii/devkitwii b/recipes/wii/devkitwii index 76689c1a..0f1ba8fa 100644 --- a/recipes/wii/devkitwii +++ b/recipes/wii/devkitwii @@ -1,4 +1,24 @@ -gambatte libretro-gambatte https://github.com/libretro/gambatte-libretro.git PROJECT YES GENERIC_ALT Makefile.libretro libgambatte -fceumm libretro-fceuumm https://github.com/libretro/libretro-fceumm.git PROJECT YES GENERIC Makefile.libretro . -nxengine libretro-nxengine https://github.com/libretro/nxengine-libretro.git PROJECT YES GENERIC Makefile . - +gambatte libretro-gambatte https://github.com/libretro/gambatte-libretro.git PROJECT YES GENERIC_ALT Makefile.libretro libgambatte +fceumm libretro-fceuumm https://github.com/libretro/libretro-fceumm.git PROJECT YES GENERIC Makefile.libretro . +nxengine libretro-nxengine https://github.com/libretro/nxengine-libretro.git PROJECT YES GENERIC Makefile . +fb_alpha libretro-fba https://github.com/libretro/fba-libretro.git PROJECT YES GENERIC makefile.libretro svn-current/trunk +fba_cores_cps1 libretro-fba https://github.com/libretro/fba-libretro.git PROJECT YES GENERIC makefile.libretro svn-current/trunk/fbacores/cps1 +fba_cores_cps2 libretro-fba https://github.com/libretro/fba-libretro.git PROJECT YES GENERIC makefile.libretro svn-current/trunk/fbacores/cps2 +fba_cores_neo libretro-fba https://github.com/libretro/fba-libretro.git PROJECT YES GENERIC makefile.libretro svn-current/trunk/fbacores/neogeo +fceumm libretro-fceuumm https://github.com/libretro/libretro-fceumm.git PROJECT YES GENERIC Makefile.libretro . +gambatte libretro-gambatte https://github.com/libretro/gambatte-libretro.git PROJECT YES GENERIC Makefile.libretro libgambatte +genesis_plus_gx libretro-genesis_plus_gx https://github.com/libretro/Genesis-Plus-GX.git PROJECT YES GENERIC Makefile.libretro . +mednafen_ngp libretro-mednafen_ngp https://github.com/libretro/beetle-ngp-libretro.git PROJECT YES GENERIC Makefile . +mednafen_pce_fast libretro-mednafen_pce_fast https://github.com/libretro/beetle-pce-fast-libretro.git PROJECT YES GENERIC Makefile . +mednafen_pcfx libretro-mednafen_pcfx https://github.com/libretro/beetle-pcfx-libretro.git PROJECT YES GENERIC Makefile . +mednafen_supergrafx libretro-mednafen_supergrafx https://github.com/libretro/beetle-supergrafx-libretro.git PROJECT YES GENERIC Makefile . +mednafen_vb libretro-mednafen_vb https://github.com/libretro/beetle-vb-libretro.git PROJECT YES GENERIC Makefile . +mednafen_wswan libretro-mednafen_wswan https://github.com/libretro/beetle-wswan-libretro.git PROJECT YES GENERIC Makefile . +quicknes libretro-quicknes https://github.com/libretro/QuickNES_Core.git PROJECT YES GENERIC Makefile libretro +snes9x libretro-snes9x https://github.com/libretro/snes9x.git PROJECT YES GENERIC Makefile libretro +snes9x_next libretro-snes9x_next https://github.com/libretro/snes9x-next.git PROJECT YES GENERIC_ALT Makefile.libretro . +tyrquake libretro-tyrquake https://github.com/libretro/tyrquake.git PROJECT YES GENERIC Makefile . +vba_next libretro-vba_next https://github.com/libretro/vba-next.git PROJECT YES GENERIC Makefile.libretro . +nestopia libretro-nestopia https://github.com/libretro/nestopia.git PROJECT YES GENERIC Makefile libretro +dosbox libretro-dosbox https://github.com/libretro/dosbox-libretro.git PROJECT YES GENERIC Makefile.libretro . +prboom libretro-prboom https://github.com/libretro/libretro-prboom.git PROJECT YES GENERIC_ALT Makefile . From 676c813b4a9e7c7791ff218ece30d78dd029a939 Mon Sep 17 00:00:00 2001 From: radius Date: Sun, 8 Mar 2015 14:22:20 -0400 Subject: [PATCH 03/30] sort recipes --- recipes/wii/devkitwii | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/recipes/wii/devkitwii b/recipes/wii/devkitwii index 0f1ba8fa..d2e6670b 100644 --- a/recipes/wii/devkitwii +++ b/recipes/wii/devkitwii @@ -1,12 +1,9 @@ -gambatte libretro-gambatte https://github.com/libretro/gambatte-libretro.git PROJECT YES GENERIC_ALT Makefile.libretro libgambatte -fceumm libretro-fceuumm https://github.com/libretro/libretro-fceumm.git PROJECT YES GENERIC Makefile.libretro . -nxengine libretro-nxengine https://github.com/libretro/nxengine-libretro.git PROJECT YES GENERIC Makefile . fb_alpha libretro-fba https://github.com/libretro/fba-libretro.git PROJECT YES GENERIC makefile.libretro svn-current/trunk fba_cores_cps1 libretro-fba https://github.com/libretro/fba-libretro.git PROJECT YES GENERIC makefile.libretro svn-current/trunk/fbacores/cps1 fba_cores_cps2 libretro-fba https://github.com/libretro/fba-libretro.git PROJECT YES GENERIC makefile.libretro svn-current/trunk/fbacores/cps2 fba_cores_neo libretro-fba https://github.com/libretro/fba-libretro.git PROJECT YES GENERIC makefile.libretro svn-current/trunk/fbacores/neogeo fceumm libretro-fceuumm https://github.com/libretro/libretro-fceumm.git PROJECT YES GENERIC Makefile.libretro . -gambatte libretro-gambatte https://github.com/libretro/gambatte-libretro.git PROJECT YES GENERIC Makefile.libretro libgambatte +gambatte libretro-gambatte https://github.com/libretro/gambatte-libretro.git PROJECT YES GENERIC_ALT Makefile.libretro libgambatte genesis_plus_gx libretro-genesis_plus_gx https://github.com/libretro/Genesis-Plus-GX.git PROJECT YES GENERIC Makefile.libretro . mednafen_ngp libretro-mednafen_ngp https://github.com/libretro/beetle-ngp-libretro.git PROJECT YES GENERIC Makefile . mednafen_pce_fast libretro-mednafen_pce_fast https://github.com/libretro/beetle-pce-fast-libretro.git PROJECT YES GENERIC Makefile . @@ -14,11 +11,11 @@ mednafen_pcfx libretro-mednafen_pcfx https://github.com/libretro/beetle-pcfx-lib mednafen_supergrafx libretro-mednafen_supergrafx https://github.com/libretro/beetle-supergrafx-libretro.git PROJECT YES GENERIC Makefile . mednafen_vb libretro-mednafen_vb https://github.com/libretro/beetle-vb-libretro.git PROJECT YES GENERIC Makefile . mednafen_wswan libretro-mednafen_wswan https://github.com/libretro/beetle-wswan-libretro.git PROJECT YES GENERIC Makefile . +nestopia libretro-nestopia https://github.com/libretro/nestopia.git PROJECT YES GENERIC Makefile libretro +nxengine libretro-nxengine https://github.com/libretro/nxengine-libretro.git PROJECT YES GENERIC Makefile . +prboom libretro-prboom https://github.com/libretro/libretro-prboom.git PROJECT YES GENERIC_ALT Makefile . quicknes libretro-quicknes https://github.com/libretro/QuickNES_Core.git PROJECT YES GENERIC Makefile libretro snes9x libretro-snes9x https://github.com/libretro/snes9x.git PROJECT YES GENERIC Makefile libretro snes9x_next libretro-snes9x_next https://github.com/libretro/snes9x-next.git PROJECT YES GENERIC_ALT Makefile.libretro . tyrquake libretro-tyrquake https://github.com/libretro/tyrquake.git PROJECT YES GENERIC Makefile . vba_next libretro-vba_next https://github.com/libretro/vba-next.git PROJECT YES GENERIC Makefile.libretro . -nestopia libretro-nestopia https://github.com/libretro/nestopia.git PROJECT YES GENERIC Makefile libretro -dosbox libretro-dosbox https://github.com/libretro/dosbox-libretro.git PROJECT YES GENERIC Makefile.libretro . -prboom libretro-prboom https://github.com/libretro/libretro-prboom.git PROJECT YES GENERIC_ALT Makefile . From f9057245cdcfe6c4f69af18b5d4ea462110f3ee1 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Mon, 9 Mar 2015 05:23:17 -0700 Subject: [PATCH 04/30] Purely whitespace --- libretro-buildbot-recipe.sh | 550 +++++++++++++++--------------------- libretro-buildbot-task.sh | 327 +++++++++------------ 2 files changed, 352 insertions(+), 525 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 509de6b2..1669ce93 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -20,8 +20,7 @@ while read line; do KEY=`echo $line | cut --fields=1 --delimiter=" "` VALUE=`echo $line | cut --fields=2 --delimiter=" "` - if [ "${KEY}" == "PATH" ]; - then + if [ "${KEY}" == "PATH" ]; then export PATH=${VALUE}:${ORIGPATH} echo New PATH: $PATH @@ -29,7 +28,7 @@ while read line; do export ${KEY}=${VALUE} echo $KEY: $VALUE fi -done < $1.conf +done < $1.conf echo echo @@ -49,8 +48,7 @@ read_link() TARGET_FILE="$1" cd $(dirname "$TARGET_FILE") TARGET_FILE=$(basename "$TARGET_FILE") - while [ -L "$TARGET_FILE" ] - do + while [ -L "$TARGET_FILE" ]; do TARGET_FILE=$(readlink "$TARGET_FILE") cd $(dirname "$TARGET_FILE") TARGET_FILE=$(basename "$TARGET_FILE") @@ -70,18 +68,17 @@ fi mkdir -v -p "$RARCH_DIST_DIR" -if [ "${PLATFORM}" == "android" ]; -then +if [ "${PLATFORM}" == "android" ]; then -IFS=' ' read -ra ABIS <<< "$TARGET_ABIS" - for a in "${ABIS[@]}"; do + IFS=' ' read -ra ABIS <<< "$TARGET_ABIS" + for a in "${ABIS[@]}"; do echo $a if [ -d $RARCH_DIST_DIR/${a} ]; then echo "Directory $RARCH_DIST_DIR/${a} already exists, skipping creation..." else mkdir $RARCH_DIST_DIR/${a} fi - done + done fi if [ "$HOST_CC" ]; then @@ -93,7 +90,7 @@ fi if [ -z "$MAKE" ]; then - if uname -s | grep -i MINGW32 > /dev/null 2>&1; then + if uname -s | grep -i MINGW32 > /dev/null 2>&1; then MAKE=mingw32-make else if type gmake > /dev/null 2>&1; then @@ -101,37 +98,37 @@ if [ -z "$MAKE" ]; then else MAKE=make fi - fi + fi fi if [ -z "$CC" ]; then - if [ $FORMAT_COMPILER_TARGET = "osx" ]; then + if [ $FORMAT_COMPILER_TARGET = "osx" ]; then CC=cc - elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then + elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then CC=mingw32-gcc - else + else CC=gcc - fi + fi fi if [ -z "$CXX" ]; then - if [ $FORMAT_COMPILER_TARGET = "osx" ]; then + if [ $FORMAT_COMPILER_TARGET = "osx" ]; then CXX=c++ CXX11="clang++ -std=c++11 -stdlib=libc++" - elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then + elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then CXX=mingw32-g++ CXX11=mingw32-g++ - else + else CXX=g++ CXX11=g++ - fi + fi fi if [ "${CC}" ] && [ "${CXX}" ]; then - COMPILER="CC=${CC} CXX=${CXX}" + COMPILER="CC=${CC} CXX=${CXX}" else - COMPILER="" + COMPILER="" fi echo @@ -148,7 +145,7 @@ RESET_FORMAT_COMPILER_TARGET=$FORMAT_COMPILER_TARGET RESET_FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET_ALT check_opengl() { - if [ "${BUILD_LIBRETRO_GL}" ]; then + if [ "${BUILD_LIBRETRO_GL}" ]; then if [ "${ENABLE_GLES}" ]; then echo '=== OpenGL ES enabled ===' export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-gles" @@ -158,14 +155,14 @@ check_opengl() { export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-opengl" export FORMAT_COMPILER_TARGET_ALT="${FORMAT_COMPILER_TARGET}" fi - else + else echo '=== OpenGL disabled in build ===' - fi + fi } reset_compiler_targets() { - export FORMAT_COMPILER_TARGET=$RESET_FORMAT_COMPILER_TARGET - export FORMAT_COMPILER_TARGET_ALT=$RESET_FORMAT_COMPILER_TARGET_ALT + export FORMAT_COMPILER_TARGET=$RESET_FORMAT_COMPILER_TARGET + export FORMAT_COMPILER_TARGET_ALT=$RESET_FORMAT_COMPILER_TARGET_ALT } @@ -196,21 +193,18 @@ build_libretro_generic_makefile() { cd $DIR cd $SUBDIR - if [ "${NAME}" == "mame078" ]; - then - OLDJ=$JOBS + if [ "${NAME}" == "mame078" ]; then + OLDJ=$JOBS JOBS=1 fi - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." + if [ -z "${NOCLEAN}" ]; then + echo "cleaning up..." echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean - if [ $? -eq 0 ]; - then + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $1 cleanup success! else echo BUILDBOT JOB: $jobid $1 cleanup failure! @@ -218,23 +212,20 @@ build_libretro_generic_makefile() { fi echo "compiling..." - if [ -z "${ARGS}" ] - then + if [ -z "${ARGS}" ]; then echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} else - if [ "${NAME}" == "mame2010" ]; - then + if [ "${NAME}" == "mame2010" ]; then - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools fi echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}.${FORMAT_EXT} else @@ -263,13 +254,11 @@ build_libretro_generic_theos() { ln -s $THEOS theos - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." + if [ -z "${NOCLEAN}" ]; then + echo "cleaning up..." echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean - if [ $? -eq 0 ]; - then + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $1 cleanup success! else echo BUILDBOT JOB: $jobid $1 cleanup failure! @@ -277,8 +266,7 @@ build_libretro_generic_theos() { fi echo "compiling..." - if [ -z "${ARGS}" ] - then + if [ -z "${ARGS}" ]; then echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} else @@ -286,8 +274,7 @@ build_libretro_generic_theos() { ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" cp -v objs/obj/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} else @@ -312,13 +299,11 @@ build_libretro_generic_jni() { cd ${DIR}/${SUBDIR} for a in "${ABIS[@]}"; do - if [ -z "${NOCLEAN}" ]; - then + if [ -z "${NOCLEAN}" ]; then echo "cleaning up..." echo "cleanup command: ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean" ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $a $1 cleanup success! else echo BUILDBOT JOB: $jobid $a $1 cleanup failure! @@ -326,16 +311,14 @@ build_libretro_generic_jni() { fi echo "compiling for ${a}..." - if [ -z "${ARGS}" ] - then + if [ -z "${ARGS}" ]; then echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" ${NDK} -j${JOBS} APP_ABI=${a} else echo "build command: ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} " ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1-$a build successful ($jobid)" echo BUILDBOT JOB: $MESSAGE buildbot_log "$MESSAGE" @@ -367,30 +350,26 @@ build_libretro_bsnes_jni() { cd ${DIR}/${SUBDIR} for a in "${ABIS[@]}"; do - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${NDK} -j${JOBS} APP_ABI=${a} clean" + if [ -z "${NOCLEAN}" ]; then + echo "cleaning up..." + echo "cleanup command: ${NDK} -j${JOBS} APP_ABI=${a} clean" ${NDK} -j${JOBS} APP_ABI=${a} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi + if [ $? -eq 0 ]; then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi fi - echo "compiling for ${a}..." - if [ -z "${ARGS}" ] - then + echo "compiling for ${a}..." + if [ -z "${ARGS}" ]; then echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" ${NDK} -j${JOBS} APP_ABI=${a} else echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" ${NDK} -j${JOBS} APP_ABI=${a} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" cp -v ../libs/${a}/libretro_${CORENAME}_${PROFILE}.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${NAME}_${PROFILE}_libretro${FORMAT}.${FORMAT_EXT} else @@ -419,13 +398,11 @@ build_libretro_generic_gl_makefile() { cd $DIR cd $SUBDIR - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." + if [ -z "${NOCLEAN}" ]; then + echo "cleaning up..." echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean - if [ $? -eq 0 ]; - then + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $1 cleanup success! else echo BUILDBOT JOB: $jobid $1 cleanup failure! @@ -433,8 +410,7 @@ build_libretro_generic_gl_makefile() { fi echo "compiling..." - if [ -z "${ARGS}" ]; - then + if [ -z "${ARGS}" ]; then echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} else @@ -442,8 +418,7 @@ build_libretro_generic_gl_makefile() { ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} else @@ -472,22 +447,19 @@ build_libretro_bsnes() { cd $DIR - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." + if [ -z "${NOCLEAN}" ]; then + echo "cleaning up..." rm -f obj/*.{o,"${FORMAT_EXT}"} rm -f out/*.{o,"${FORMAT_EXT}"} - if [ "${PROFILE}" == "cpp98" -o "${PROFILE}" == "bnes" ]; - then - ${MAKE} clean - fi + if [ "${PROFILE}" == "cpp98" -o "${PROFILE}" == "bnes" ]; then + ${MAKE} clean + fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $1 cleanup success! else echo BUILDBOT JOB: $jobid $1 cleanup failure! @@ -497,11 +469,9 @@ build_libretro_bsnes() { echo "compiling..." - if [ "${PROFILE}" == "cpp98" ]; - then + if [ "${PROFILE}" == "cpp98" ]; then ${MAKE} platform="${PLATFORM}" ${COMPILER} "-j${JOBS}" - elif [ "${PROFILE}" == "bnes" ]; - then + elif [ "${PROFILE}" == "bnes" ]; then echo "build command: ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler=${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler="${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} else @@ -509,17 +479,14 @@ build_libretro_bsnes() { ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" - if [ "${PROFILE}" == "cpp98" ]; - then + if [ "${PROFILE}" == "cpp98" ]; then cp -fv "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" - elif [ "${PROFILE}" == "bnes" ]; - then + elif [ "${PROFILE}" == "bnes" ]; then cp -fv "libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" else - cp -fv "out/${NAME}_${PROFILE}_libretro$FORMAT.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} + cp -fv "out/${NAME}_libretro$FORMAT.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} fi else MESSAGE="$1 build failure ($jobid)" @@ -547,8 +514,7 @@ while read line; do MAKEFILE=`echo $line | cut --fields=7 --delimiter=" "` SUBDIR=`echo $line | cut --fields=8 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; - then + if [ "${ENABLED}" == "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo URL: $URL @@ -563,57 +529,48 @@ while read line; do ARGS="" TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi - ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" echo ARGS: $ARGS echo echo - if [ "${TYPE}" == "PROJECT" ]; - then - if [ -d "${DIR}/.git" ]; - then + if [ "${TYPE}" == "PROJECT" ]; then + if [ -d "${DIR}/.git" ]; then cd $DIR echo "pulling from repo... " OUT=`git pull` - if [[ $OUT == *"Already up-to-date"* ]] - then + if [[ $OUT == *"Already up-to-date"* ]]; then BUILD="NO" else BUILD="YES" @@ -642,16 +599,13 @@ while read line; do git clone --depth=1 "$URL" "$DIR" BUILD="YES" fi - elif [ "${TYPE}" == "psp_hw_render" ]; - then - if [ -d "${DIR}/.git" ]; - then + elif [ "${TYPE}" == "psp_hw_render" ]; then + if [ -d "${DIR}/.git" ]; then cd $DIR echo "pulling from repo... " OUT=`git pull` - if [[ $OUT == *"Already up-to-date"* ]] - then + if [[ $OUT == *"Already up-to-date"* ]]; then BUILD="NO" else BUILD="YES" @@ -667,16 +621,13 @@ while read line; do BUILD="YES" fi - elif [ "${TYPE}" == "SUBMODULE" ]; - then - if [ -d "${DIR}/.git" ]; - then + elif [ "${TYPE}" == "SUBMODULE" ]; then + if [ -d "${DIR}/.git" ]; then cd $DIR echo "pulling from repo... " OUT=`git pull` - if [[ $OUT == *"Already up-to-date"* ]] - then + if [[ $OUT == *"Already up-to-date"* ]]; then BUILD="NO" else BUILD="YES" @@ -693,8 +644,7 @@ while read line; do cd .. fi - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then echo building core... if [ "${COMMAND}" == "GENERIC" ]; then build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" @@ -710,11 +660,10 @@ while read line; do build_libretro_generic_theos $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" elif [ "${COMMAND}" == "BSNES" ]; then build_libretro_bsnes $NAME $DIR "${ARGS}" $MAKEFILE ${FORMAT_COMPILER_TARGET} ${CXX11} - + fi + else + echo BUILDBOT JOB: $jobid $NAME already up-to-date... fi - else - echo BUILDBOT JOB: $jobid $NAME already up-to-date... - fi echo fi @@ -723,15 +672,14 @@ while read line; do PREVCORE=$NAME PREVBUILD=$BUILD -done < $1 +done < $1 echo "BUILDBOT JOB: $jobid Building Retroarch" echo cd $WORK BUILD="" -if [ "${PLATFORM}" == "android" ] && [ "${RA}" == "YES" ]; -then +if [ "${PLATFORM}" == "android" ] && [ "${RA}" == "YES" ]; then while read line; do @@ -742,8 +690,7 @@ then ENABLED=`echo $line | cut --fields=5 --delimiter=" "` PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; - then + if [ "${ENABLED}" == "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo NAME: $NAME @@ -756,38 +703,32 @@ then ARGS="" TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi @@ -795,18 +736,15 @@ then echo ARGS: $ARGS - if [ -d "${PARENTDIR}/${DIR}/.git" ]; - then + if [ -d "${PARENTDIR}/${DIR}/.git" ]; then cd $PARENTDIR cd $DIR echo "pulling from repo... " OUT=`git pull` echo $OUT - if [ "${TYPE}" == "PROJECT" ]; - then + if [ "${TYPE}" == "PROJECT" ]; then RADIR=$DIR - if [[ $OUT == *"Already up-to-date"* ]] - then + if [[ $OUT == *"Already up-to-date"* ]]; then BUILD="NO" else BUILD="YES" @@ -819,8 +757,7 @@ then cd $PARENTDIR git clone "$URL" "$DIR" --depth=1 cd $DIR - if [ "${TYPE}" == "PROJECT" ]; - then + if [ "${TYPE}" == "PROJECT" ]; then BUILD="YES" RADIR=$DIR @@ -831,61 +768,58 @@ then echo echo - done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then + done < $1.ra + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then echo "BUILDBOT JOB: $jobid Compiling Shaders" echo - echo RADIR $RADIR - cd $RADIR - $MAKE -f Makefile.griffin shaders-convert-glsl PYTHON3=$PYTHON + echo RADIR $RADIR + cd $RADIR + $MAKE -f Makefile.griffin shaders-convert-glsl PYTHON3=$PYTHON - echo "BUILDBOT JOB: $jobid Processing Assets" - echo + echo "BUILDBOT JOB: $jobid Processing Assets" + echo - mkdir -p android/phoenix/assets/ - rm -Rfv android/phoenix/assets/assets - cp -Rfv media/assets android/phoenix/assets/ - rm -Rfv android/phoenix/assets/libretrodb - cp -Rfv media/libretrodb android/phoenix//assets/libretrodb/ - rm -Rfv android/phoenix/assets/overlays - cp -Rfv media/overlays android/phoenix/assets/ - rm -Rfv android/phoenix/assets/shaders_glsl - cp -Rfv media/shaders_glsl android/phoenix/assets/ - rm -Rfv android/phoenix/assets/autoconfig - cp -Rfv media/autoconfig android/phoenix/assets/ - rm -Rfv android/phoenix/assets/info - cp -Rfv $RARCH_DIR/info android/phoenix/assets/ + mkdir -p android/phoenix/assets/ + rm -Rfv android/phoenix/assets/assets + cp -Rfv media/assets android/phoenix/assets/ + rm -Rfv android/phoenix/assets/libretrodb + cp -Rfv media/libretrodb android/phoenix//assets/libretrodb/ + rm -Rfv android/phoenix/assets/overlays + cp -Rfv media/overlays android/phoenix/assets/ + rm -Rfv android/phoenix/assets/shaders_glsl + cp -Rfv media/shaders_glsl android/phoenix/assets/ + rm -Rfv android/phoenix/assets/autoconfig + cp -Rfv media/autoconfig android/phoenix/assets/ + rm -Rfv android/phoenix/assets/info + cp -Rfv $RARCH_DIR/info android/phoenix/assets/ - echo "BUILDBOT JOB: $jobid Building" - echo - cd android/phoenix - rm bin/*.apk + echo "BUILDBOT JOB: $jobid Building" + echo + cd android/phoenix + rm bin/*.apk - $NDK clean - $NDK -j${JOBS} - ant clean - android update project --path . --target android-21 - android update project --path libs/googleplay --target android-21 - android update project --path libs/appcompat --target android-21 - ant debug - if [ $? -eq 0 ]; - then - MESSAGE="retroarch build successful ($jobid)" - echo $MESSAGE + $NDK clean + $NDK -j${JOBS} + ant clean + android update project --path . --target android-21 + android update project --path libs/googleplay --target android-21 + android update project --path libs/appcompat --target android-21 + ant debug + if [ $? -eq 0 ]; then + MESSAGE="retroarch build successful ($jobid)" + echo $MESSAGE else - MESSAGE="retroarch buildf failed ($jobid)" - echo $MESSAGE + MESSAGE="retroarch buildf failed ($jobid)" + echo $MESSAGE fi - buildbot_log "$MESSAGE" + buildbot_log "$MESSAGE" fi fi -if [ "${PLATFORM}" == "theos_ios" ] && [ "${RA}" == "YES" ]; -then +if [ "${PLATFORM}" == "theos_ios" ] && [ "${RA}" == "YES" ]; then while read line; do @@ -896,8 +830,7 @@ then ENABLED=`echo $line | cut --fields=5 --delimiter=" "` PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; - then + if [ "${ENABLED}" == "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo NAME: $NAME @@ -910,38 +843,32 @@ then ARGS="" TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi @@ -949,18 +876,15 @@ then echo ARGS: $ARGS - if [ -d "${PARENTDIR}/${DIR}/.git" ]; - then + if [ -d "${PARENTDIR}/${DIR}/.git" ]; then cd $PARENTDIR cd $DIR echo "pulling from repo... " OUT=`git pull` echo $OUT - if [ "${TYPE}" == "PROJECT" ]; - then + if [ "${TYPE}" == "PROJECT" ]; then RADIR=$DIR - if [[ $OUT == *"Already up-to-date"* ]] - then + if [[ $OUT == *"Already up-to-date"* ]]; then BUILD="NO" else BUILD="YES" @@ -973,8 +897,7 @@ then cd $PARENTDIR git clone "$URL" "$DIR" --depth=1 cd $DIR - if [ "${TYPE}" == "PROJECT" ]; - then + if [ "${TYPE}" == "PROJECT" ]; then BUILD="YES" RADIR=$DIR @@ -985,9 +908,8 @@ then echo echo - done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then + done < $1.ra + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then echo "BUILDBOT JOB: $jobid Compiling Shaders" echo @@ -1022,8 +944,7 @@ then fi -if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" == "YES" ]; -then +if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" == "YES" ]; then while read line; do @@ -1034,8 +955,7 @@ then ENABLED=`echo $line | cut --fields=5 --delimiter=" "` PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; - then + if [ "${ENABLED}" == "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo NAME: $NAME @@ -1054,32 +974,27 @@ then fi TEMP="" TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi @@ -1087,18 +1002,15 @@ then echo ARGS: $ARGS - if [ -d "${PARENTDIR}/${DIR}/.git" ]; - then + if [ -d "${PARENTDIR}/${DIR}/.git" ]; then cd $PARENTDIR cd $DIR echo "pulling from repo... " OUT=`git pull` echo $OUT - if [ "${TYPE}" == "PROJECT" ]; - then + if [ "${TYPE}" == "PROJECT" ]; then RADIR=$DIR - if [[ $OUT == *"Already up-to-date"* ]] - then + if [[ $OUT == *"Already up-to-date"* ]]; then BUILD="NO" else BUILD="YES" @@ -1111,8 +1023,7 @@ then git clone "$URL" "$DIR" --depth=1 cd $DIR - if [ "${TYPE}" == "PROJECT" ]; - then + if [ "${TYPE}" == "PROJECT" ]; then BUILD="YES" RADIR=$DIR @@ -1123,9 +1034,8 @@ then echo echo - done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then + done < $1.ra + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then cd $RADIR echo "BUILDBOT JOB: $jobid Building" @@ -1135,8 +1045,7 @@ then cd audio/audio_filters echo "audio filter build command: ${MAKE}" $MAKE - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid audio filter build success! else echo BUILDBOT JOB: $jobid audio filter build failure! @@ -1149,8 +1058,7 @@ then cd gfx/video_filters echo "audio filter build command: ${MAKE}" $MAKE - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid video filter build success! else echo BUILDBOT JOB: $jobid video filter build failure! @@ -1163,8 +1071,7 @@ then echo "cleanup command: $MAKE clean" $MAKE clean - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid retroarch cleanup success! else echo BUILDBOT JOB: $jobid retroarch cleanup failure! @@ -1174,8 +1081,7 @@ then echo "configure command: $CONFIGURE" ${CONFIGURE} - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid retroarch configure success! else echo BUILDBOT JOB: $jobid retroarch configure failure! @@ -1185,8 +1091,7 @@ then echo "build command: $MAKE -j${JOBS}" $MAKE -j${JOBS} - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="retroarch build successful ($jobid)" echo $MESSAGE buildbot_log "$MESSAGE" @@ -1264,8 +1169,7 @@ EOF fi -if [ "${PLATFORM}" == "psp1" ] && [ "${RA}" == "YES" ]; -then +if [ "${PLATFORM}" == "psp1" ] && [ "${RA}" == "YES" ]; then while read line; do @@ -1276,8 +1180,7 @@ then ENABLED=`echo $line | cut --fields=5 --delimiter=" "` PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; - then + if [ "${ENABLED}" == "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo NAME: $NAME @@ -1290,38 +1193,32 @@ then ARGS="" TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi @@ -1329,18 +1226,15 @@ then echo ARGS: $ARGS - if [ -d "${PARENTDIR}/${DIR}/.git" ]; - then + if [ -d "${PARENTDIR}/${DIR}/.git" ]; then cd $PARENTDIR cd $DIR echo "pulling from repo... " OUT=`git pull` echo $OUT - if [ "${TYPE}" == "PROJECT" ]; - then + if [ "${TYPE}" == "PROJECT" ]; then RADIR=$DIR - if [[ $OUT == *"Already up-to-date"* ]] - then + if [[ $OUT == *"Already up-to-date"* ]]; then BUILD="NO" else BUILD="YES" @@ -1353,8 +1247,7 @@ then git clone "$URL" "$DIR" --depth=1 cd $DIR - if [ "${TYPE}" == "PROJECT" ]; - then + if [ "${TYPE}" == "PROJECT" ]; then BUILD="YES" RADIR=$DIR @@ -1365,49 +1258,46 @@ then echo echo - done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then + done < $1.ra + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then cd $RADIR - rm -rfv psp1/pkg + rm -rfv psp1/pkg echo "BUILDBOT JOB: $jobid Building" echo - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + + cd dist-scripts + rm *.a + cp -v $RARCH_DIST_DIR/* . + sh ./psp1-cores.sh + if [ $? -eq 0 ]; then + MESSAGE="retroarch build successful ($jobid)" + echo $MESSAGE + else + MESSAGE="retroarch build failed ($jobid)" + echo $MESSAGE + fi + buildbot_log "$MESSAGE" + cd .. - cd dist-scripts - rm *.a - cp -v $RARCH_DIST_DIR/* . - sh ./psp1-cores.sh - if [ $? -eq 0 ]; - then - MESSAGE="retroarch build successful ($jobid)" - echo $MESSAGE - else - MESSAGE="retroarch build failed ($jobid)" - echo $MESSAGE fi - buildbot_log "$MESSAGE" - cd .. - fi - - echo "Packaging" - echo ============================================ - cp retroarch.cfg retroarch.default.cfg - - - mkdir -p psp1/pkg/ - mkdir -p psp1/pkg/cheats - mkdir -p psp1/pkg/database - mkdir -p psp1/pkg/database/cursors - mkdir -p psp1/pkg/database/rdb - - cp -Rfv media/libretrodb/cht/* psp1/pkg/cheats - cp -Rfv media/libretrodb/rdb/* psp1/pkg/database/rdb - cp -Rfv media/libretrodb/cursors/* psp1/pkg/database/cursors + echo "Packaging" + echo ============================================ + cp retroarch.cfg retroarch.default.cfg + + + mkdir -p psp1/pkg/ + mkdir -p psp1/pkg/cheats + mkdir -p psp1/pkg/database + mkdir -p psp1/pkg/database/cursors + mkdir -p psp1/pkg/database/rdb + + cp -Rfv media/libretrodb/cht/* psp1/pkg/cheats + cp -Rfv media/libretrodb/rdb/* psp1/pkg/database/rdb + cp -Rfv media/libretrodb/cursors/* psp1/pkg/database/cursors fi diff --git a/libretro-buildbot-task.sh b/libretro-buildbot-task.sh index 96d8d025..5c17a750 100755 --- a/libretro-buildbot-task.sh +++ b/libretro-buildbot-task.sh @@ -25,8 +25,7 @@ while read line; do KEY=`echo $line | cut --fields=1 --delimiter=" "` VALUE=`echo $line | cut --fields=2 --delimiter=" "` - if [ "${KEY}" == "PATH" ]; - then + if [ "${KEY}" == "PATH" ]; then export PATH=${VALUE}:${ORIGPATH} echo New PATH: $PATH @@ -34,7 +33,7 @@ while read line; do export ${KEY}=${VALUE} echo $KEY: $VALUE fi -done < $1.conf +done < $1.conf echo echo @@ -54,8 +53,7 @@ read_link() TARGET_FILE="$1" cd $(dirname "$TARGET_FILE") TARGET_FILE=$(basename "$TARGET_FILE") - while [ -L "$TARGET_FILE" ] - do + while [ -L "$TARGET_FILE" ]; do TARGET_FILE=$(readlink "$TARGET_FILE") cd $(dirname "$TARGET_FILE") TARGET_FILE=$(basename "$TARGET_FILE") @@ -75,18 +73,17 @@ fi mkdir -v -p "$RARCH_DIST_DIR" -if [ "${PLATFORM}" == "android" ]; -then +if [ "${PLATFORM}" == "android" ]; then -IFS=' ' read -ra ABIS <<< "$TARGET_ABIS" - for a in "${ABIS[@]}"; do - echo $a - if [ -d $RARCH_DIST_DIR/${a} ]; then - echo "Directory $RARCH_DIST_DIR/${a} already exists, skipping creation..." - else - mkdir $RARCH_DIST_DIR/${a} - fi - done + IFS=' ' read -ra ABIS <<< "$TARGET_ABIS" + for a in "${ABIS[@]}"; do + echo $a + if [ -d $RARCH_DIST_DIR/${a} ]; then + echo "Directory $RARCH_DIST_DIR/${a} already exists, skipping creation..." + else + mkdir $RARCH_DIST_DIR/${a} + fi + done fi if [ "$HOST_CC" ]; then @@ -111,32 +108,32 @@ fi if [ -z "$CC" ]; then - if [ $FORMAT_COMPILER_TARGET = "osx" ]; then + if [ $FORMAT_COMPILER_TARGET = "osx" ]; then CC=cc - elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then + elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then CC=mingw32-gcc - else + else CC=gcc - fi + fi fi if [ -z "$CXX" ]; then - if [ $FORMAT_COMPILER_TARGET = "osx" ]; then + if [ $FORMAT_COMPILER_TARGET = "osx" ]; then CXX=c++ CXX11="clang++ -std=c++11 -stdlib=libc++" - elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then + elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then CXX=mingw32-g++ CXX11=mingw32-g++ - else + else CXX=g++ CXX11=g++ - fi + fi fi if [ "${CC}" ] && [ "${CXX}" ]; then - COMPILER="CC=${CC} CXX=${CXX}" + COMPILER="CC=${CC} CXX=${CXX}" else - COMPILER="" + COMPILER="" fi echo @@ -153,7 +150,7 @@ RESET_FORMAT_COMPILER_TARGET=$FORMAT_COMPILER_TARGET RESET_FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET_ALT check_opengl() { - if [ "${BUILD_LIBRETRO_GL}" ]; then + if [ "${BUILD_LIBRETRO_GL}" ]; then if [ "${ENABLE_GLES}" ]; then echo '=== OpenGL ES enabled ===' export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-gles" @@ -165,12 +162,12 @@ check_opengl() { fi else echo '=== OpenGL disabled in build ===' - fi + fi } reset_compiler_targets() { - export FORMAT_COMPILER_TARGET=$RESET_FORMAT_COMPILER_TARGET - export FORMAT_COMPILER_TARGET_ALT=$RESET_FORMAT_COMPILER_TARGET_ALT + export FORMAT_COMPILER_TARGET=$RESET_FORMAT_COMPILER_TARGET + export FORMAT_COMPILER_TARGET_ALT=$RESET_FORMAT_COMPILER_TARGET_ALT } @@ -199,21 +196,18 @@ build_libretro_generic_makefile() { cd $DIR cd $SUBDIR - if [ "${NAME}" == "mame078" ]; - then - OLDJ=$JOBS + if [ "${NAME}" == "mame078" ]; then + OLDJ=$JOBS JOBS=1 fi - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." + if [ -z "${NOCLEAN}" ]; then + echo "cleaning up..." echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean - if [ $? -eq 0 ]; - then + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $1 cleanup success! else echo BUILDBOT JOB: $jobid $1 cleanup failure! @@ -221,23 +215,20 @@ build_libretro_generic_makefile() { fi echo "compiling..." - if [ -z "${ARGS}" ] - then + if [ -z "${ARGS}" ]; then echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} else - if [ "${NAME}" == "mame2010" ]; - then + if [ "${NAME}" == "mame2010" ]; then - echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools + echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools fi echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}.${FORMAT_EXT} else @@ -266,13 +257,11 @@ build_libretro_generic_theos() { ln -s $THEOS theos - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." + if [ -z "${NOCLEAN}" ]; then + echo "cleaning up..." echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean - if [ $? -eq 0 ]; - then + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $1 cleanup success! else echo BUILDBOT JOB: $jobid $1 cleanup failure! @@ -280,8 +269,7 @@ build_libretro_generic_theos() { fi echo "compiling..." - if [ -z "${ARGS}" ] - then + if [ -z "${ARGS}" ]; then echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} else @@ -289,8 +277,7 @@ build_libretro_generic_theos() { ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" cp -v objs/obj/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} else @@ -315,13 +302,11 @@ build_libretro_generic_jni() { cd ${DIR}/${SUBDIR} for a in "${ABIS[@]}"; do - if [ -z "${NOCLEAN}" ]; - then + if [ -z "${NOCLEAN}" ]; then echo "cleaning up..." echo "cleanup command: ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean" ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $a $1 cleanup success! else echo BUILDBOT JOB: $jobid $a $1 cleanup failure! @@ -329,16 +314,14 @@ build_libretro_generic_jni() { fi echo "compiling for ${a}..." - if [ -z "${ARGS}" ] - then + if [ -z "${ARGS}" ]; then echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" ${NDK} -j${JOBS} APP_ABI=${a} else echo "build command: ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} " ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1-$a build successful ($jobid)" echo BUILDBOT JOB: $MESSAGE buildbot_log "$MESSAGE" @@ -349,8 +332,8 @@ build_libretro_generic_jni() { buildbot_log "$MESSAGE" fi done - - + + } @@ -370,30 +353,26 @@ build_libretro_bsnes_jni() { cd ${DIR}/${SUBDIR} for a in "${ABIS[@]}"; do - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." - echo "cleanup command: ${NDK} -j${JOBS} APP_ABI=${a} clean" + if [ -z "${NOCLEAN}" ]; then + echo "cleaning up..." + echo "cleanup command: ${NDK} -j${JOBS} APP_ABI=${a} clean" ${NDK} -j${JOBS} APP_ABI=${a} clean - if [ $? -eq 0 ]; - then - echo BUILDBOT JOB: $jobid $1 cleanup success! - else - echo BUILDBOT JOB: $jobid $1 cleanup failure! - fi + if [ $? -eq 0 ]; then + echo BUILDBOT JOB: $jobid $1 cleanup success! + else + echo BUILDBOT JOB: $jobid $1 cleanup failure! + fi fi - echo "compiling for ${a}..." - if [ -z "${ARGS}" ] - then + echo "compiling for ${a}..." + if [ -z "${ARGS}" ]; then echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" ${NDK} -j${JOBS} APP_ABI=${a} else echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" ${NDK} -j${JOBS} APP_ABI=${a} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" cp -v ../libs/${a}/libretro_${CORENAME}_${PROFILE}.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${NAME}_${PROFILE}_libretro${FORMAT}.${FORMAT_EXT} else @@ -422,13 +401,11 @@ build_libretro_generic_gl_makefile() { cd $DIR cd $SUBDIR - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." + if [ -z "${NOCLEAN}" ]; then + echo "cleaning up..." echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean" - ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean - if [ $? -eq 0 ]; - then + ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $1 cleanup success! else echo BUILDBOT JOB: $jobid $1 cleanup failure! @@ -436,8 +413,7 @@ build_libretro_generic_gl_makefile() { fi echo "compiling..." - if [ -z "${ARGS}" ]; - then + if [ -z "${ARGS}" ]; then echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} else @@ -445,8 +421,7 @@ build_libretro_generic_gl_makefile() { ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} else @@ -475,22 +450,19 @@ build_libretro_bsnes() { cd $DIR - if [ -z "${NOCLEAN}" ]; - then - echo "cleaning up..." + if [ -z "${NOCLEAN}" ]; then + echo "cleaning up..." rm -f obj/*.{o,"${FORMAT_EXT}"} rm -f out/*.{o,"${FORMAT_EXT}"} - if [ "${PROFILE}" == "cpp98" -o "${PROFILE}" == "bnes" ]; - then - ${MAKE} clean - fi + if [ "${PROFILE}" == "cpp98" -o "${PROFILE}" == "bnes" ]; then + ${MAKE} clean + fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $1 cleanup success! else echo BUILDBOT JOB: $jobid $1 cleanup failure! @@ -500,11 +472,9 @@ build_libretro_bsnes() { echo "compiling..." - if [ "${PROFILE}" == "cpp98" ]; - then + if [ "${PROFILE}" == "cpp98" ]; then ${MAKE} platform="${PLATFORM}" ${COMPILER} "-j${JOBS}" - elif [ "${PROFILE}" == "bnes" ]; - then + elif [ "${PROFILE}" == "bnes" ]; then echo "build command: ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler=${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler="${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} else @@ -512,14 +482,11 @@ build_libretro_bsnes() { ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS} fi - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" - if [ "${PROFILE}" == "cpp98" ]; - then + if [ "${PROFILE}" == "cpp98" ]; then cp -fv "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" - elif [ "${PROFILE}" == "bnes" ]; - then + elif [ "${PROFILE}" == "bnes" ]; then cp -fv "libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" else cp -fv "out/${NAME}_libretro$FORMAT.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} @@ -537,8 +504,7 @@ build_libretro_bsnes() { #sleep 10 export jobid=$1 -if [ -z "$2" ] -then +if [ -z "$2" ]; then echo no argument supplied else echo processing $2 only @@ -560,19 +526,16 @@ while read line; do SUBDIR=`echo $line | cut --fields=8 --delimiter=" "` - if [ ! -z "$TASK" ] - then - if [ "${TASK}" != "${NAME}" ] - then + if [ ! -z "$TASK" ]; then + if [ "${TASK}" != "${NAME}" ]; then continue fi fi - if [ "${ENABLED}" == "YES" ]; - then + if [ "${ENABLED}" == "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" - echo + echo echo URL: $URL echo REPO TYPE: $TYPE echo ENABLED: $ENABLED @@ -586,69 +549,61 @@ while read line; do ARGS="" TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi - ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" - echo ARGS: $ARGS - echo - echo + echo ARGS: $ARGS + echo + echo - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then - echo building core... - if [ "${COMMAND}" == "GENERIC" ]; then - build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + echo building core... + if [ "${COMMAND}" == "GENERIC" ]; then + build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" elif [ "${COMMAND}" == "GENERIC_GL" ]; then - build_libretro_generic_gl_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_ALT" ]; then - build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_JNI" ]; then - build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "BSNES_JNI" ]; then - build_libretro_bsnes_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_THEOS" ]; then - build_libretro_generic_theos $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "BSNES" ]; then - build_libretro_bsnes $NAME $DIR "${ARGS}" $MAKEFILE ${FORMAT_COMPILER_TARGET} ${CXX11} - + build_libretro_generic_gl_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" + elif [ "${COMMAND}" == "GENERIC_ALT" ]; then + build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "GENERIC_JNI" ]; then + build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "BSNES_JNI" ]; then + build_libretro_bsnes_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "GENERIC_THEOS" ]; then + build_libretro_generic_theos $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" + elif [ "${COMMAND}" == "BSNES" ]; then + build_libretro_bsnes $NAME $DIR "${ARGS}" $MAKEFILE ${FORMAT_COMPILER_TARGET} ${CXX11} + fi + else + echo BUILDBOT JOB: $jobid $NAME already up-to-date... fi - else - echo BUILDBOT JOB: $jobid $NAME already up-to-date... - fi echo fi @@ -657,23 +612,20 @@ while read line; do PREVCORE=$NAME PREVBUILD=$BUILD -done < $1 +done < $1 echo cd $WORK BUILD="" -if [ ! -z "$TASK" ] -then - if [ "${TASK}" != "retroarch" ] - then - exit +if [ ! -z "$TASK" ]; then + if [ "${TASK}" != "retroarch" ]; then + exit fi fi -if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" == "YES" ]; -then +if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" == "YES" ]; then while read line; do @@ -684,15 +636,12 @@ then ENABLED=`echo $line | cut --fields=5 --delimiter=" "` PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ ! -z "$TASK" ] - then - if [ "${TASK}" != "${NAME}" ] - then + if [ ! -z "$TASK" ]; then + if [ "${TASK}" != "${NAME}" ]; then continue fi - fi - if [ "${ENABLED}" == "YES" ]; - then + fi + if [ "${ENABLED}" == "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo NAME: $NAME @@ -705,38 +654,32 @@ then ARGS="" TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then + if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi @@ -748,9 +691,8 @@ then echo echo - done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then + done < $1.ra + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then cd $3 echo "BUILDBOT JOB: $jobid Building" @@ -760,8 +702,7 @@ then cd audio/audio_filters echo "audio filter build command: ${MAKE}" $MAKE - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid audio filter build success! else echo BUILDBOT JOB: $jobid audio filter build failure! @@ -774,8 +715,7 @@ then cd gfx/video_filters echo "audio filter build command: ${MAKE}" $MAKE - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid video filter build success! else echo BUILDBOT JOB: $jobid video filter build failure! @@ -788,8 +728,7 @@ then echo "cleanup command: $MAKE clean" $MAKE clean - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid retroarch cleanup success! else echo BUILDBOT JOB: $jobid retroarch cleanup failure! @@ -799,8 +738,7 @@ then echo "configure command: $CONFIGURE" ${CONFIGURE} - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid retroarch configure success! else echo BUILDBOT JOB: $jobid retroarch configure failure! @@ -810,8 +748,7 @@ then echo "build command: $MAKE -j${JOBS}" $MAKE -j${JOBS} - if [ $? -eq 0 ]; - then + if [ $? -eq 0 ]; then MESSAGE="retroarch build successful ($jobid)" echo $MESSAGE buildbot_log "$MESSAGE" From 5093fe608803ddd416c52e9ac816a60e3c6fa14d Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Mon, 9 Mar 2015 05:28:13 -0700 Subject: [PATCH 05/30] Use of == with sh test/[ is technically illegal --- libretro-buildbot-recipe.sh | 88 ++++++++++++++++++------------------- libretro-buildbot-task.sh | 42 +++++++++--------- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 1669ce93..fbf52b1d 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -20,7 +20,7 @@ while read line; do KEY=`echo $line | cut --fields=1 --delimiter=" "` VALUE=`echo $line | cut --fields=2 --delimiter=" "` - if [ "${KEY}" == "PATH" ]; then + if [ "${KEY}" = "PATH" ]; then export PATH=${VALUE}:${ORIGPATH} echo New PATH: $PATH @@ -68,7 +68,7 @@ fi mkdir -v -p "$RARCH_DIST_DIR" -if [ "${PLATFORM}" == "android" ]; then +if [ "${PLATFORM}" = "android" ]; then IFS=' ' read -ra ABIS <<< "$TARGET_ABIS" for a in "${ABIS[@]}"; do @@ -193,7 +193,7 @@ build_libretro_generic_makefile() { cd $DIR cd $SUBDIR - if [ "${NAME}" == "mame078" ]; then + if [ "${NAME}" = "mame078" ]; then OLDJ=$JOBS JOBS=1 fi @@ -216,7 +216,7 @@ build_libretro_generic_makefile() { echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} else - if [ "${NAME}" == "mame2010" ]; then + if [ "${NAME}" = "mame2010" ]; then echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools @@ -454,7 +454,7 @@ build_libretro_bsnes() { rm -f out/*.{o,"${FORMAT_EXT}"} - if [ "${PROFILE}" == "cpp98" -o "${PROFILE}" == "bnes" ]; then + if [ "${PROFILE}" = "cpp98" -o "${PROFILE}" = "bnes" ]; then ${MAKE} clean fi @@ -469,9 +469,9 @@ build_libretro_bsnes() { echo "compiling..." - if [ "${PROFILE}" == "cpp98" ]; then + if [ "${PROFILE}" = "cpp98" ]; then ${MAKE} platform="${PLATFORM}" ${COMPILER} "-j${JOBS}" - elif [ "${PROFILE}" == "bnes" ]; then + elif [ "${PROFILE}" = "bnes" ]; then echo "build command: ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler=${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler="${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} else @@ -481,9 +481,9 @@ build_libretro_bsnes() { if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" - if [ "${PROFILE}" == "cpp98" ]; then + if [ "${PROFILE}" = "cpp98" ]; then cp -fv "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" - elif [ "${PROFILE}" == "bnes" ]; then + elif [ "${PROFILE}" = "bnes" ]; then cp -fv "libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" else cp -fv "out/${NAME}_libretro$FORMAT.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} @@ -514,7 +514,7 @@ while read line; do MAKEFILE=`echo $line | cut --fields=7 --delimiter=" "` SUBDIR=`echo $line | cut --fields=8 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; then + if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo URL: $URL @@ -564,7 +564,7 @@ while read line; do echo echo - if [ "${TYPE}" == "PROJECT" ]; then + if [ "${TYPE}" = "PROJECT" ]; then if [ -d "${DIR}/.git" ]; then cd $DIR @@ -576,17 +576,17 @@ while read line; do BUILD="YES" fi - if [ "${PREVCORE}" == "bsnes" -a "${PREVBUILD}" == "YES" -a "${COMMAND}" == "BSNES" ]; then + if [ "${PREVCORE}" = "bsnes" -a "${PREVBUILD}" = "YES" -a "${COMMAND}" = "BSNES" ]; then FORCE="YES" BUILD="YES" fi - if [ "${PREVCORE}" == "mame" -a "${PREVBUILD}" == "YES" -a "${NAME}" == "mess" ]; then + if [ "${PREVCORE}" = "mame" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "mess" ]; then FORCE="YES" BUILD="YES" fi - if [ "${PREVCORE}" == "mess" -a "${PREVBUILD}" == "YES" -a "${NAME}" == "ume" ]; then + if [ "${PREVCORE}" = "mess" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "ume" ]; then FORCE="YES" BUILD="YES" fi @@ -599,7 +599,7 @@ while read line; do git clone --depth=1 "$URL" "$DIR" BUILD="YES" fi - elif [ "${TYPE}" == "psp_hw_render" ]; then + elif [ "${TYPE}" = "psp_hw_render" ]; then if [ -d "${DIR}/.git" ]; then cd $DIR @@ -644,21 +644,21 @@ while read line; do cd .. fi - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then echo building core... - if [ "${COMMAND}" == "GENERIC" ]; then + if [ "${COMMAND}" = "GENERIC" ]; then build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_GL" ]; then + elif [ "${COMMAND}" = "GENERIC_GL" ]; then build_libretro_generic_gl_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_ALT" ]; then + elif [ "${COMMAND}" = "GENERIC_ALT" ]; then build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_JNI" ]; then + elif [ "${COMMAND}" = "GENERIC_JNI" ]; then build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "BSNES_JNI" ]; then + elif [ "${COMMAND}" = "BSNES_JNI" ]; then build_libretro_bsnes_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_THEOS" ]; then + elif [ "${COMMAND}" = "GENERIC_THEOS" ]; then build_libretro_generic_theos $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "BSNES" ]; then + elif [ "${COMMAND}" = "BSNES" ]; then build_libretro_bsnes $NAME $DIR "${ARGS}" $MAKEFILE ${FORMAT_COMPILER_TARGET} ${CXX11} fi else @@ -679,7 +679,7 @@ echo cd $WORK BUILD="" -if [ "${PLATFORM}" == "android" ] && [ "${RA}" == "YES" ]; then +if [ "${PLATFORM}" = "android" ] && [ "${RA}" = "YES" ]; then while read line; do @@ -690,7 +690,7 @@ if [ "${PLATFORM}" == "android" ] && [ "${RA}" == "YES" ]; then ENABLED=`echo $line | cut --fields=5 --delimiter=" "` PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; then + if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo NAME: $NAME @@ -742,7 +742,7 @@ if [ "${PLATFORM}" == "android" ] && [ "${RA}" == "YES" ]; then echo "pulling from repo... " OUT=`git pull` echo $OUT - if [ "${TYPE}" == "PROJECT" ]; then + if [ "${TYPE}" = "PROJECT" ]; then RADIR=$DIR if [[ $OUT == *"Already up-to-date"* ]]; then BUILD="NO" @@ -757,7 +757,7 @@ if [ "${PLATFORM}" == "android" ] && [ "${RA}" == "YES" ]; then cd $PARENTDIR git clone "$URL" "$DIR" --depth=1 cd $DIR - if [ "${TYPE}" == "PROJECT" ]; then + if [ "${TYPE}" = "PROJECT" ]; then BUILD="YES" RADIR=$DIR @@ -769,7 +769,7 @@ if [ "${PLATFORM}" == "android" ] && [ "${RA}" == "YES" ]; then echo echo done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Compiling Shaders" echo @@ -819,7 +819,7 @@ if [ "${PLATFORM}" == "android" ] && [ "${RA}" == "YES" ]; then fi -if [ "${PLATFORM}" == "theos_ios" ] && [ "${RA}" == "YES" ]; then +if [ "${PLATFORM}" = "theos_ios" ] && [ "${RA}" = "YES" ]; then while read line; do @@ -830,7 +830,7 @@ if [ "${PLATFORM}" == "theos_ios" ] && [ "${RA}" == "YES" ]; then ENABLED=`echo $line | cut --fields=5 --delimiter=" "` PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; then + if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo NAME: $NAME @@ -882,7 +882,7 @@ if [ "${PLATFORM}" == "theos_ios" ] && [ "${RA}" == "YES" ]; then echo "pulling from repo... " OUT=`git pull` echo $OUT - if [ "${TYPE}" == "PROJECT" ]; then + if [ "${TYPE}" = "PROJECT" ]; then RADIR=$DIR if [[ $OUT == *"Already up-to-date"* ]]; then BUILD="NO" @@ -897,7 +897,7 @@ if [ "${PLATFORM}" == "theos_ios" ] && [ "${RA}" == "YES" ]; then cd $PARENTDIR git clone "$URL" "$DIR" --depth=1 cd $DIR - if [ "${TYPE}" == "PROJECT" ]; then + if [ "${TYPE}" = "PROJECT" ]; then BUILD="YES" RADIR=$DIR @@ -909,7 +909,7 @@ if [ "${PLATFORM}" == "theos_ios" ] && [ "${RA}" == "YES" ]; then echo echo done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Compiling Shaders" echo @@ -944,7 +944,7 @@ if [ "${PLATFORM}" == "theos_ios" ] && [ "${RA}" == "YES" ]; then fi -if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" == "YES" ]; then +if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] && [ "${RA}" = "YES" ]; then while read line; do @@ -955,7 +955,7 @@ if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" ENABLED=`echo $line | cut --fields=5 --delimiter=" "` PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; then + if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo NAME: $NAME @@ -1008,7 +1008,7 @@ if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" echo "pulling from repo... " OUT=`git pull` echo $OUT - if [ "${TYPE}" == "PROJECT" ]; then + if [ "${TYPE}" = "PROJECT" ]; then RADIR=$DIR if [[ $OUT == *"Already up-to-date"* ]]; then BUILD="NO" @@ -1023,7 +1023,7 @@ if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" git clone "$URL" "$DIR" --depth=1 cd $DIR - if [ "${TYPE}" == "PROJECT" ]; then + if [ "${TYPE}" = "PROJECT" ]; then BUILD="YES" RADIR=$DIR @@ -1035,7 +1035,7 @@ if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" echo echo done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then cd $RADIR echo "BUILDBOT JOB: $jobid Building" @@ -1169,7 +1169,7 @@ EOF fi -if [ "${PLATFORM}" == "psp1" ] && [ "${RA}" == "YES" ]; then +if [ "${PLATFORM}" = "psp1" ] && [ "${RA}" = "YES" ]; then while read line; do @@ -1180,7 +1180,7 @@ if [ "${PLATFORM}" == "psp1" ] && [ "${RA}" == "YES" ]; then ENABLED=`echo $line | cut --fields=5 --delimiter=" "` PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - if [ "${ENABLED}" == "YES" ]; then + if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo NAME: $NAME @@ -1232,7 +1232,7 @@ if [ "${PLATFORM}" == "psp1" ] && [ "${RA}" == "YES" ]; then echo "pulling from repo... " OUT=`git pull` echo $OUT - if [ "${TYPE}" == "PROJECT" ]; then + if [ "${TYPE}" = "PROJECT" ]; then RADIR=$DIR if [[ $OUT == *"Already up-to-date"* ]]; then BUILD="NO" @@ -1247,7 +1247,7 @@ if [ "${PLATFORM}" == "psp1" ] && [ "${RA}" == "YES" ]; then git clone "$URL" "$DIR" --depth=1 cd $DIR - if [ "${TYPE}" == "PROJECT" ]; then + if [ "${TYPE}" = "PROJECT" ]; then BUILD="YES" RADIR=$DIR @@ -1259,14 +1259,14 @@ if [ "${PLATFORM}" == "psp1" ] && [ "${RA}" == "YES" ]; then echo echo done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then cd $RADIR rm -rfv psp1/pkg echo "BUILDBOT JOB: $jobid Building" echo - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then cd dist-scripts rm *.a diff --git a/libretro-buildbot-task.sh b/libretro-buildbot-task.sh index 5c17a750..d41a9ae7 100755 --- a/libretro-buildbot-task.sh +++ b/libretro-buildbot-task.sh @@ -25,7 +25,7 @@ while read line; do KEY=`echo $line | cut --fields=1 --delimiter=" "` VALUE=`echo $line | cut --fields=2 --delimiter=" "` - if [ "${KEY}" == "PATH" ]; then + if [ "${KEY}" = "PATH" ]; then export PATH=${VALUE}:${ORIGPATH} echo New PATH: $PATH @@ -73,7 +73,7 @@ fi mkdir -v -p "$RARCH_DIST_DIR" -if [ "${PLATFORM}" == "android" ]; then +if [ "${PLATFORM}" = "android" ]; then IFS=' ' read -ra ABIS <<< "$TARGET_ABIS" for a in "${ABIS[@]}"; do @@ -196,7 +196,7 @@ build_libretro_generic_makefile() { cd $DIR cd $SUBDIR - if [ "${NAME}" == "mame078" ]; then + if [ "${NAME}" = "mame078" ]; then OLDJ=$JOBS JOBS=1 fi @@ -219,7 +219,7 @@ build_libretro_generic_makefile() { echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} else - if [ "${NAME}" == "mame2010" ]; then + if [ "${NAME}" = "mame2010" ]; then echo "build command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" buildtools ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} buildtools @@ -457,7 +457,7 @@ build_libretro_bsnes() { rm -f out/*.{o,"${FORMAT_EXT}"} - if [ "${PROFILE}" == "cpp98" -o "${PROFILE}" == "bnes" ]; then + if [ "${PROFILE}" = "cpp98" -o "${PROFILE}" = "bnes" ]; then ${MAKE} clean fi @@ -472,9 +472,9 @@ build_libretro_bsnes() { echo "compiling..." - if [ "${PROFILE}" == "cpp98" ]; then + if [ "${PROFILE}" = "cpp98" ]; then ${MAKE} platform="${PLATFORM}" ${COMPILER} "-j${JOBS}" - elif [ "${PROFILE}" == "bnes" ]; then + elif [ "${PROFILE}" = "bnes" ]; then echo "build command: ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler=${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler="${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} else @@ -484,9 +484,9 @@ build_libretro_bsnes() { if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" - if [ "${PROFILE}" == "cpp98" ]; then + if [ "${PROFILE}" = "cpp98" ]; then cp -fv "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" - elif [ "${PROFILE}" == "bnes" ]; then + elif [ "${PROFILE}" = "bnes" ]; then cp -fv "libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" else cp -fv "out/${NAME}_libretro$FORMAT.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} @@ -533,7 +533,7 @@ while read line; do fi - if [ "${ENABLED}" == "YES" ]; then + if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo URL: $URL @@ -584,21 +584,21 @@ while read line; do echo echo - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then echo building core... - if [ "${COMMAND}" == "GENERIC" ]; then + if [ "${COMMAND}" = "GENERIC" ]; then build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_GL" ]; then + elif [ "${COMMAND}" = "GENERIC_GL" ]; then build_libretro_generic_gl_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_ALT" ]; then + elif [ "${COMMAND}" = "GENERIC_ALT" ]; then build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_JNI" ]; then + elif [ "${COMMAND}" = "GENERIC_JNI" ]; then build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "BSNES_JNI" ]; then + elif [ "${COMMAND}" = "BSNES_JNI" ]; then build_libretro_bsnes_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "GENERIC_THEOS" ]; then + elif [ "${COMMAND}" = "GENERIC_THEOS" ]; then build_libretro_generic_theos $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" - elif [ "${COMMAND}" == "BSNES" ]; then + elif [ "${COMMAND}" = "BSNES" ]; then build_libretro_bsnes $NAME $DIR "${ARGS}" $MAKEFILE ${FORMAT_COMPILER_TARGET} ${CXX11} fi else @@ -625,7 +625,7 @@ if [ ! -z "$TASK" ]; then fi fi -if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" == "YES" ]; then +if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] && [ "${RA}" = "YES" ]; then while read line; do @@ -641,7 +641,7 @@ if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" continue fi fi - if [ "${ENABLED}" == "YES" ]; then + if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo NAME: $NAME @@ -692,7 +692,7 @@ if [ "${PLATFORM}" == "MINGW64" ] || [ "${PLATFORM}" == "MINGW32" ] && [ "${RA}" echo echo done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then cd $3 echo "BUILDBOT JOB: $jobid Building" From d02ff168c6111394baa193d161a5be58072ff033 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Mon, 9 Mar 2015 05:33:41 -0700 Subject: [PATCH 06/30] Getting ready for theos merge into libretro-build.sh --- libretro-config.sh | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/libretro-config.sh b/libretro-config.sh index 033b6a58..80dfa853 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -13,13 +13,10 @@ case "$platform" in ## ios) - # NOTE: This config requires a Mac with an Xcode version new enough for - # its xcrun program to support -show-sdk-path. That pretty much - # limits us to Xcode 5 and above unless someone wants to implement - # older Xcode version support using an alternate method. Any such - # support could only be for jailbreakers as any libretro core that - # could ever be added to the App Store would require a recent SDK - # and Xcode version to build. + # NOTE: This config requires a Mac with an Xcode installation. These + # scripts will work at least as far as 10.5 that we're sure of, but + # we build with clang targeting iOS >= 5. We'll accept patches for + # older versions of iOS. DIST_DIR="ios" FORMAT_EXT=dylib @@ -34,13 +31,28 @@ case "$platform" in IOSVER_MINOR=${iosver#*.} IOSVER=${IOSVER_MAJOR}${IOSVER_MINOR} - # Apple requires this stuff + # Tell system clang to build for iOS CC="clang -arch armv7 -miphoneos-version-min=5.0 -isysroot $IOSSDK" CXX="clang++ -arch armv7 -miphoneos-version-min=5.0 -isysroot $IOSSDK" CXX11="clang++ -std=c++11 -stdlib=libc++ -arch armv7 -miphoneos-version-min=5.0 -isysroot $IOSSDK" ;; + theos_ios) + DIST_DIR="theos_ios" + BUILD_PRODUCT_PREFIX="objs/obj" + FORMAT_EXT=dylib + IOS=1 + ARCH=armv7 + FORMAT=_ios + FORMAT_COMPILER_TARGET=theos_ios + FORMAT_COMPILER_TARGET_ALT=theos_ios + + # Make sure that the cross bins you need are first in your path + CXX11="clang++ -std=c++11 -stdlib=libc++ -miphoneos-version-min=5.0" + + ;; + ## ## Original libretro-config path ## @@ -105,10 +117,10 @@ case "$platform" in FORMAT_COMPILER_TARGET="psp1" DIST_DIR="psp1" ;; - *ios|theos_ios*) + theos_ios*) FORMAT_EXT="dylib" FORMAT_COMPILER_TARGET="theos_ios" - DIST_DIR="theos" + DIST_DIR="theos_ios" ;; android) FORMAT_EXT="so" From 03936814efe12e013274014fc918451a0b712156 Mon Sep 17 00:00:00 2001 From: sergiobenrocha2 Date: Tue, 10 Mar 2015 03:04:46 -0300 Subject: [PATCH 07/30] mGBA info. --- dist/info/mgba_libretro.info | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 dist/info/mgba_libretro.info diff --git a/dist/info/mgba_libretro.info b/dist/info/mgba_libretro.info new file mode 100644 index 00000000..0e2cc2a7 --- /dev/null +++ b/dist/info/mgba_libretro.info @@ -0,0 +1,12 @@ +display_name = "Game Boy Advance (mGBA)" +authors = "Jeffrey Pfau" +supported_extensions = "gba|bin" +corename = "mGBA" +manufacturer = "Nintendo" +categories = "Emulator" +systemname = "Game Boy Advance" +database = "Nintendo - Game Boy Advance|Nintendo - Game Boy Advance (e-Cards)" +license = "MPLv2.0" +permissions = "" +display_version = "Git" +supports_no_game = "false" From 28472bfce760c5123ba03e134d7100eb3619d0eb Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 02:45:18 -0700 Subject: [PATCH 08/30] Updated .gitignore --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 8ed1fd94..f6804ecb 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,12 @@ /libretro-fuse/ /libretro-lutro/ /libretro-gw/ +/libretro-cap32/ +/libretro-lutro_game_of_life/ +/libretro-lutro_iyfct/ +/libretro-lutro_platformer/ +/libretro-lutro_snake/ +/libretro-lutro_tetris/ /libretro-devkit/ /retroarch/ /build-summary.log From 54036227d1392493c1b70ad01ce10d570f404fb7 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 02:45:50 -0700 Subject: [PATCH 09/30] Don't need to build nxengine twice --- libretro-build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/libretro-build.sh b/libretro-build.sh index 5b1d8aaa..a503d5ce 100755 --- a/libretro-build.sh +++ b/libretro-build.sh @@ -178,7 +178,6 @@ else build_libretro_emux libretro_build_core fuse libretro_build_core stonesoup - libretro_build_core nxengine libretro_build_core gw libretro_build_core lutro From 2b53df705707cf0fc229d18ba79b9df6a86683b0 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 02:46:30 -0700 Subject: [PATCH 10/30] This got missed in libretro-build-common.sh --- libretro-build-common.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/libretro-build-common.sh b/libretro-build-common.sh index d5027869..ea782ffb 100755 --- a/libretro-build-common.sh +++ b/libretro-build-common.sh @@ -3,6 +3,7 @@ . "$BASE_DIR/script-modules/util.sh" . "$BASE_DIR/script-modules/fetch-rules.sh" . "$BASE_DIR/script-modules/cpu.sh" +. "$BASE_DIR/script-modules/modules.sh" . "$BASE_DIR/rules.d/core-rules.sh" From 604b0c3471909d6cb34b1afd28f3928fb0079eef Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 03:51:22 -0700 Subject: [PATCH 11/30] Ugly diff reduction of libretro-build-ios-theos.sh --- libretro-build-ios-theos.sh | 254 ++++++++++++++++++++++++++---------- 1 file changed, 187 insertions(+), 67 deletions(-) diff --git a/libretro-build-ios-theos.sh b/libretro-build-ios-theos.sh index 7d29fdee..2bd5e181 100755 --- a/libretro-build-ios-theos.sh +++ b/libretro-build-ios-theos.sh @@ -1,6 +1,8 @@ #! /usr/bin/env bash # vim: set ts=3 sw=3 noet ft=sh : bash +platform=theos_ios + SCRIPT="${0#./}" BASE_DIR="${SCRIPT%/*}" WORKDIR="$PWD" @@ -14,75 +16,193 @@ else fi fi -set -e +. "$BASE_DIR/libretro-config.sh" + +if [ -z "$RARCH_DIST_DIR" ]; then + RARCH_DIR="$WORKDIR/dist" + RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" +fi + +if [ -z "$JOBS" ]; then + JOBS=7 +fi + +if [ "$HOST_CC" ]; then + CC="${HOST_CC}-gcc" + CXX="${HOST_CC}-g++" + CXX11="${HOST_CC}-g++" + STRIP="${HOST_CC}-strip" +fi + +if [ -z "$MAKE" ]; then + if uname -s | grep -i MINGW32 > /dev/null 2>&1; then + MAKE=mingw32-make + else + if type gmake > /dev/null 2>&1; then + MAKE=gmake + else + MAKE=make + fi + fi +fi + +if [ -z "$CC" ]; then + if [ $FORMAT_COMPILER_TARGET = "osx" ]; then + CC=cc + elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then + CC=mingw32-gcc + else + CC=gcc + fi +fi + +if [ -z "$CXX" ]; then + if [ $FORMAT_COMPILER_TARGET = "osx" ]; then + CXX=c++ + CXX11="clang++ -std=c++11 -stdlib=libc++" + # FIXME: Do this right later. + if [ "$ARCH" = "i386" ]; then + CC="cc -arch i386" + CXX="c++ -arch i386" + CXX11="clang++ -arch i386 -std=c++11 -stdlib=libc++" + fi + elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then + CXX=mingw32-g++ + CXX11=mingw32-g++ + else + CXX=g++ + CXX11=g++ + fi +fi + +FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET + + +if [ "$FORMAT_COMPILER_TARGET" = "ios" ]; then + echo "iOS path: ${IOSSDK}" + echo "iOS version: ${IOSVER}" +fi +echo "CC = $CC" +echo "CXX = $CXX" +echo "CXX11 = $CXX11" +echo "STRIP = $STRIP" -RARCH_DIR=$BASE_DIR/dist -RARCH_DIST_DIR=$RARCH_DIR/theos_ios -FORMAT=_ios -FORMAT_COMPILER_TARGET=theos_ios -FORMAT_COMPILER_TARGET_ALT=theos_ios -FORMAT_EXT=dylib -JOBS=7 -MAKE=make -CXX11="clang++ -std=c++11 -stdlib=libc++ -miphoneos-version-min=5.0" -IOS=1 . "$BASE_DIR/libretro-build-common.sh" -if [ $1 ]; then - $1 -else - build_libretro_2048 - build_libretro_bluemsx - build_libretro_fmsx - #build_libretro_bsnes_cplusplus98 - #build_libretro_bsnes - #build_libretro_beetle_lynx - #build_libretro_beetle_gba - #build_libretro_beetle_ngp - #build_libretro_beetle_pce_fast - #build_libretro_beetle_supergrafx - #build_libretro_beetle_pcfx - #build_libretro_beetle_vb - #build_libretro_beetle_wswan - #build_libretro_mednafen_psx - #build_libretro_beetle_bsnes - build_libretro_catsfc - build_libretro_snes9x - build_libretro_snes9x_next - build_libretro_genesis_plus_gx - build_libretro_fb_alpha - build_libretro_vbam - build_libretro_vba_next - build_libretro_fceumm - build_libretro_gambatte - build_libretro_meteor - build_libretro_nx - build_libretro_prboom - build_libretro_stella - build_libretro_quicknes - build_libretro_nestopia - build_libretro_tyrquake - #build_libretro_mame078 - #build_libretro_mame - build_libretro_dosbox - #build_libretro_scummvm - #build_libretro_picodrive - build_libretro_handy - build_libretro_desmume - #build_libretro_pcsx_rearmed - #build_libretro_pcsx_rearmed_interpreter - #build_libretro_mupen64 - #build_libretro_yabause - #build_libretro_ffmpeg - build_libretro_3dengine - build_libretro_vecx - build_libretro_tgbdual - build_libretro_prosystem - #build_libretro_dinothawr - build_libretro_virtualjaguar - build_libretro_o2em - build_libretro_4do - build_libretro_gpsp - #build_libretro_emux +mkdir -p "$RARCH_DIST_DIR" + +if [ -n "$SKIP_UNCHANGED" ]; then + [ -z "$BUILD_REVISIONS_DIR" ] && BUILD_REVISIONS_DIR="$WORKDIR/build-revisions" + echo "mkdir -p \"$BUILD_REVISIONS_DIR\"" + mkdir -p "$BUILD_REVISIONS_DIR" fi + +if [ -n "$1" ]; then + while [ -n "$1" ]; do + case "$1" in + build_libretro_*) + # "Old"-style + $1 + ;; + *) + # New style (just generic cores for now) + libretro_build_core $1 + ;; + esac + shift + done +else + libretro_build_core 2048 + libretro_build_core 4do + libretro_build_core bluemsx + libretro_build_core fmsx + if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then + build_libretro_bsnes_cplusplus98 + build_libretro_bsnes + build_libretro_bsnes_mercury + libretro_build_core beetle_lynx + libretro_build_core beetle_gba + libretro_build_core beetle_ngp + libretro_build_core beetle_pce_fast + libretro_build_core beetle_supergrafx + libretro_build_core beetle_pcfx + libretro_build_core beetle_vb + libretro_build_core beetle_wswan + libretro_build_core mednafen_psx + libretro_build_core beetle_snes + fi + libretro_build_core catsfc + libretro_build_core snes9x + libretro_build_core snes9x_next + if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then + libretro_build_core genesis_plus_gx + fi + libretro_build_core fb_alpha + libretro_build_core vbam + libretro_build_core vba_next + libretro_build_core fceumm + libretro_build_core gambatte + libretro_build_core meteor + libretro_build_core nxengine + libretro_build_core prboom + libretro_build_core stella + libretro_build_core quicknes + libretro_build_core nestopia + libretro_build_core tyrquake + if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then + libretro_build_core mame078 + build_libretro_mame_prerule + fi + libretro_build_core dosbox + if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then + libretro_build_core scummvm + libretro_build_core picodrive + fi + libretro_build_core handy + libretro_build_core desmume + if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then + if [ $FORMAT_COMPILER_TARGET != "win" ]; then + libretro_build_core pcsx_rearmed + fi + if [ $FORMAT_COMPILER_TARGET = "ios" ]; then + # For self-signed iOS (without jailbreak) + build_libretro_pcsx_rearmed_interpreter + fi + libretro_build_core yabause + fi + libretro_build_core vecx + libretro_build_core tgbdual + libretro_build_core prosystem + if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then + libretro_build_core dinothawr + fi + libretro_build_core virtualjaguar + if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then + build_libretro_mupen64 + fi + libretro_build_core 3dengine + if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then + if [ $FORMAT_COMPILER_TARGET != "ios" ]; then + # These don't currently build on iOS + build_libretro_bnes + libretro_build_core ffmpeg + libretro_build_core ppsspp + fi + fi + libretro_build_core o2em + if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then + libretro_build_core hatari + fi + libretro_build_core gpsp + if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then + build_libretro_emux + libretro_build_core fuse + libretro_build_core stonesoup + libretro_build_core gw + libretro_build_core lutro + + build_libretro_test + fi +fi +build_summary From 63cbb06d1d3d169b66b3d3fbfa3aa9cbe7b3492d Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 05:40:57 -0700 Subject: [PATCH 12/30] =?UTF-8?q?I=20dunno=20how=20this=20has=20been=20mis?= =?UTF-8?q?sed=20so=20long=E2=80=94fixed=20mednafen/beetle=20builds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libretro-build-common.sh | 20 ++++++++++---------- libretro-build-ios-theos.sh | 18 +++++++++--------- libretro-build.sh | 18 +++++++++--------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/libretro-build-common.sh b/libretro-build-common.sh index ea782ffb..ddd6f2c2 100755 --- a/libretro-build-common.sh +++ b/libretro-build-common.sh @@ -649,34 +649,34 @@ build_libretro_4do() { libretro_build_core 4do } build_libretro_beetle_gba() { - libretro_build_core beetle_gba + libretro_build_core mednafen_gba } build_libretro_beetle_lynx() { - libretro_build_core beetle_lynx + libretro_build_core mednafen_lynx } build_libretro_beetle_ngp() { - libretro_build_core beetle_ngp + libretro_build_core mednafen_ngp } build_libretro_beetle_pce_fast() { - libretro_build_core beetle_pce_fast + libretro_build_core mednafen_pce_fast } build_libretro_beetle_pcfx() { - libretro_build_core beetle_pcfx + libretro_build_core mednafen_pcfx } build_libretro_beetle_psx() { - libretro_build_core beetle_psx + libretro_build_core mednafen_psx } build_libretro_beetle_snes() { - libretro_build_core beetle_snes + libretro_build_core mednafen_snes } build_libretro_beetle_supergrafx() { - libretro_build_core beetle_supergrafx + libretro_build_core mednafen_supergrafx } build_libretro_beetle_vb() { - libretro_build_core beetle_vb + libretro_build_core mednafen_vb } build_libretro_beetle_wswan() { - libretro_build_core beetle_wsawn + libretro_build_core mednafen_wsawn } build_libretro_bluemsx() { libretro_build_core bluemsx diff --git a/libretro-build-ios-theos.sh b/libretro-build-ios-theos.sh index 2bd5e181..94f94e06 100755 --- a/libretro-build-ios-theos.sh +++ b/libretro-build-ios-theos.sh @@ -121,16 +121,16 @@ else build_libretro_bsnes_cplusplus98 build_libretro_bsnes build_libretro_bsnes_mercury - libretro_build_core beetle_lynx - libretro_build_core beetle_gba - libretro_build_core beetle_ngp - libretro_build_core beetle_pce_fast - libretro_build_core beetle_supergrafx - libretro_build_core beetle_pcfx - libretro_build_core beetle_vb - libretro_build_core beetle_wswan + libretro_build_core mednafen_lynx + libretro_build_core mednafen_gba + libretro_build_core mednafen_ngp + libretro_build_core mednafen_pce_fast + libretro_build_core mednafen_supergrafx + libretro_build_core mednafen_pcfx + libretro_build_core mednafen_vb + libretro_build_core mednafen_wswan libretro_build_core mednafen_psx - libretro_build_core beetle_snes + libretro_build_core mednafen_snes fi libretro_build_core catsfc libretro_build_core snes9x diff --git a/libretro-build.sh b/libretro-build.sh index a503d5ce..38c3e2b7 100755 --- a/libretro-build.sh +++ b/libretro-build.sh @@ -118,16 +118,16 @@ else build_libretro_bsnes_cplusplus98 build_libretro_bsnes build_libretro_bsnes_mercury - libretro_build_core beetle_lynx - libretro_build_core beetle_gba - libretro_build_core beetle_ngp - libretro_build_core beetle_pce_fast - libretro_build_core beetle_supergrafx - libretro_build_core beetle_pcfx - libretro_build_core beetle_vb - libretro_build_core beetle_wswan + libretro_build_core mednafen_lynx + libretro_build_core mednafen_gba + libretro_build_core mednafen_ngp + libretro_build_core mednafen_pce_fast + libretro_build_core mednafen_supergrafx + libretro_build_core mednafen_pcfx + libretro_build_core mednafen_vb + libretro_build_core mednafen_wswan libretro_build_core mednafen_psx - libretro_build_core beetle_snes + libretro_build_core mednafen_snes libretro_build_core catsfc libretro_build_core snes9x libretro_build_core snes9x_next From f494a26f819276abe8476e9cff9369892b785a62 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 07:17:44 -0700 Subject: [PATCH 13/30] Canonicalize $platform a bit --- libretro-config.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libretro-config.sh b/libretro-config.sh index b2ee448a..88f08ae0 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -93,36 +93,43 @@ B ARM=true [ -z "$platform" ] && platform="$(uname)" case "$platform" in *BSD*) + platform=bsd FORMAT_EXT="so" FORMAT_COMPILER_TARGET="unix" DIST_DIR="bsd" ;; osx|*Darwin*) + platform=osx FORMAT_EXT="dylib" FORMAT_COMPILER_TARGET="osx" DIST_DIR="osx" ;; win|*mingw32*|*MINGW32*|*MSYS_NT*) + platform=win FORMAT_EXT="dll" FORMAT_COMPILER_TARGET="win" DIST_DIR="win_x86" ;; win64|*mingw64*|*MINGW64*) + platform=win FORMAT_EXT="dll" FORMAT_COMPILER_TARGET="win" DIST_DIR="win_x64" ;; *psp1*) + platform=psp1 FORMAT_EXT="a" FORMAT_COMPILER_TARGET="psp1" DIST_DIR="psp1" ;; *wii*) + platform=wii FORMAT_EXT="a" FORMAT_COMPILER_TARGET="wii" DIST_DIR="wii" ;; theos_ios*) + platform=theos_ios FORMAT_EXT="dylib" FORMAT_COMPILER_TARGET="theos_ios" DIST_DIR="theos_ios" From 90d8054990828fdffda2f83af844592f5287af42 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 07:20:11 -0700 Subject: [PATCH 14/30] Fetch only the cores we can build with --cores option --- libretro-fetch.sh | 54 ++++++++++++++++++++++++++------------- script-modules/modules.sh | 54 +++++++++++++++++++++++++++++++++++---- 2 files changed, 85 insertions(+), 23 deletions(-) diff --git a/libretro-fetch.sh b/libretro-fetch.sh index 916ca50d..4e0c3a44 100755 --- a/libretro-fetch.sh +++ b/libretro-fetch.sh @@ -25,7 +25,6 @@ fi . "$BASE_DIR/rules.d/devkit-rules.sh" # TODO: Read these programmatically - # libretro_fetch: Download the given core using its fetch rules # # $1 Name of the core to fetch @@ -97,30 +96,49 @@ libretro_fetch() { fi } +libretro_players="retroarch" +libretro_devkits="devkit" + if [ -n "$1" ]; then + fetch_devel="" no_more_args="" while [ -n "$1" ]; do - if [ -z "$no_more_args" ]; then + if [[ "$1" = -* && -z "$no_more_args" ]]; then case "$1" in - --) - no_more_args="1" - ;; - - *) - # New style (just cores for now) - libretro_fetch $1 - ;; + --) no_more_args=1 ;; + --devel) fetch_devel=1 ;; + --cores) fetch_cores="$libretro_cores" ;; + --devkit) fetch_devkits="$libretro_devkits" ;; + --players) fetch_players="$libretro_players" ;; + --retroarch) fetch_players="retroarch" ;; + *) ;; esac - else - libretro_fetch $1 + shift + continue fi + + fetch_cores="$fetch_cores $1" + # Handle non-commands shift done else - libretro_fetch retroarch - libretro_fetch devkit - - for a in $libretro_cores; do - libretro_fetch "${a%%:*}" - done + # Make libretro-fetch.sh with no args behave traditionally by default + fetch_devel=1 + fetch_cores="$libretro_cores" + fetch_players="retroarch" + fetch_devkit="devkit" fi + +for a in $fetch_players; do + libretro_fetch $a +done + +for a in $fetch_devkits; do + libretro_fetch $a +done + +for a in $fetch_cores; do + if [ -n "$fetch_devel" ] || can_build_module "$a"; then + libretro_fetch "${a%%:*}" + fi +done diff --git a/script-modules/modules.sh b/script-modules/modules.sh index 3cf26f43..e251bc9d 100644 --- a/script-modules/modules.sh +++ b/script-modules/modules.sh @@ -1,17 +1,35 @@ # vim: set ts=3 sw=3 noet ft=sh : bash register_module() { - case "$1" in + mod_type="$1" + mod_name="$2" + shift 2 + + case "$mod_type" in core|devkit|player) - if [ -n "$2" ]; then - eval "libretro_${1}s=\"\$libretro_${1}s $2::\"" + if [ -n "$mod_name" ]; then + build_plats="" + skip_plats="" + while [ -n "$1" ]; do + if [[ "$1" = -* ]]; then + skip_plats="$skip_plats,$1" + else + build_plats="$build_plats,$1" + fi + shift + done + + build_plats="${build_plats#,}" + skip_plats="${skip_plats#,}" + + eval "libretro_${mod_type}s=\"\$libretro_${mod_type}s $mod_name:${build_plats:-any}:$skip_plats\"" else - echo "register_module:Trying to register a $1 without a name" + echo "register_module:Trying to register a $mod_type without a name" exit 1 fi ;; *) - echo "register_module:Unknown module type \"$1\"" + echo "register_module:Unknown module type \"$mod_type\"" exit 1 ;; esac @@ -20,3 +38,29 @@ register_module() { register_core() { register_module core $@ } + +can_build_module() { + if [[ "$1" != *:*:* ]]; then + # Not in :: format, assume developer mode + return 0 + fi + + build_plats="${1#*:}" + build_plats="${build_plats%:*}" + skip_plats="${1##*:}" + + if [ "$build_plats" != "any" ]; then + # Module is exclusive to certain platforms + if [[ "$platform" != *${build_plats}* ]]; then + # And this isn't one of them. + return 1 + fi + fi + + if [[ "$skip_plats" = *${platform}* ]]; then + # Module is disabled on this particular platform + return 1 + fi + + return 0 +} From ca822daa5049a1a081aaaf21f6522ef8f044a6a8 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 07:21:13 -0700 Subject: [PATCH 15/30] Update rules to match current build script state --- rules.d/core-rules.sh | 124 +++++++++++++++++++++--------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/rules.d/core-rules.sh b/rules.d/core-rules.sh index f56d525e..6b0cf9b3 100644 --- a/rules.d/core-rules.sh +++ b/rules.d/core-rules.sh @@ -1,27 +1,27 @@ # vim: set ts=3 sw=3 noet ft=sh : bash -register_module core "bsnes" +register_core "bsnes" -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_bsnes_name="bsnes/higan" libretro_bsnes_git_url="https://github.com/libretro/bsnes-libretro.git" libretro_bsnes_build_rule=none # NEED CUSTOM RULE -register_core "snes9x" +register_core "snes9x" -ngc -ps3 -psp1 -wii libretro_snes9x_name="SNES9x" libretro_snes9x_git_url="https://github.com/libretro/snes9x.git" libretro_snes9x_build_subdir="libretro" -register_core "snes9x_next" +register_core "snes9x_next" -ps3 libretro_snes9x_next_name="SNES9x Next" libretro_snes9x_next_git_url="https://github.com/libretro/snes9x-next.git" libretro_snes9x_next_build_makefile="Makefile.libretro" libretro_snes9x_next_build_platform="$FORMAT_COMPILER_TARGET_ALT" -register_core "genesis_plus_gx" +register_core "genesis_plus_gx" -theos_ios libretro_genesis_plus_gx_name="Genesis Plus GX" libretro_genesis_plus_gx_git_url="https://github.com/libretro/Genesis-Plus-GX.git" libretro_genesis_plus_gx_build_makefile="Makefile.libretro" -register_core "fb_alpha" +register_core "fb_alpha" -psp1 libretro_fb_alpha_name="Final Burn Alpha" libretro_fb_alpha_git_url="https://github.com/libretro/fba-libretro.git" libretro_fb_alpha_build_subdir="svn-current/trunk" @@ -33,23 +33,23 @@ libretro_vba_next_git_url="https://github.com/libretro/vba-next.git" libretro_vba_next_build_makefile="Makefile.libretro" libretro_vba_next_build_platform="$FORMAT_COMPILER_TARGET_ALT" -register_core "vbam" +register_core "vbam" -ngc -ps3 -psp1 -wii libretro_vbam_name="VBA-M" libretro_vbam_git_url="https://github.com/libretro/vbam-libretro.git" libretro_vbam_build_subdir="src/libretro" libretro_vbam_build_makefile="Makefile" libretro_vbam_build_platform="$FORMAT_COMPILER_TARGET_ALT" -register_core "handy" +register_core "handy" -ngc -wii libretro_handy_name="Handy" libretro_handy_git_url="https://github.com/libretro/libretro-handy.git" -register_core "cap32" +register_core "cap32" -ngc -ps3 -psp1 -qnx -wii libretro_cap32_name="Caprice32" libretro_cap32_git_url="https://github.com/libretro/libretro-cap32.git" libretro_cap32_build_makefile="Makefile" -register_core "bnes" +register_core "bnes" -ios -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_bnes_name="bnes/higan" libretro_bnes_git_url="https://github.com/libretro/bnes-libretro.git" libretro_bnes_build_rule=none # NEED CUSTOM RULE @@ -66,7 +66,7 @@ libretro_gambatte_build_subdir="libgambatte" libretro_gambatte_build_makefile="Makefile.libretro" libretro_gambatte_build_platform="$FORMAT_COMPILER_TARGET_ALT" -register_core "meteor" +register_core "meteor" -ngc -ps3 -psp1 -qnx -wii libretro_meteor_name="Meteor" libretro_meteor_git_url="https://github.com/libretro/meteor-libretro.git" libretro_meteor_build_subdir="libretro" @@ -80,11 +80,11 @@ libretro_prboom_name="PrBoom" libretro_prboom_git_url="https://github.com/libretro/libretro-prboom.git" libretro_prboom_build_platform="$FORMAT_COMPILER_TARGET_ALT" -register_core "stella" +register_core "stella" -ngc -wii libretro_stella_name="Stella" libretro_stella_git_url="https://github.com/libretro/stella-libretro.git" -register_core "desmume" +register_core "desmume" -ngc -ps3 -psp1 -qnx -wii libretro_desmume_name="DeSmuME" libretro_desmume_git_url="https://github.com/libretro/desmume.git" libretro_desmume_build_subdir="desmume" @@ -105,237 +105,237 @@ libretro_tyrquake_name="TyrQuake" libretro_tyrquake_git_url="https://github.com/libretro/tyrquake.git" libretro_tyrquake_build_makefile="Makefile" -register_core "pcsx_rearmed" +register_core "pcsx_rearmed" -theos_ios -ngc -ps3 -psp1 -wii libretro_pcsx_rearmed_name="PCSX ReARMed" libretro_pcsx_rearmed_git_url="https://github.com/libretro/pcsx_rearmed.git" libretro_pcsx_rearmed_build_makefile="Makefile.libretro" -register_core "mednafen_gba" +register_core "mednafen_gba" -theos_ios libretro_mednafen_gba_name="Mednafen/Beetle GBA" libretro_mednafen_gba_git_url="https://github.com/libretro/beetle-gba-libretro.git" -register_core "mednafen_lynx" +register_core "mednafen_lynx" -theos_ios libretro_mednafen_lynx_name="Mednafen/Beetle Lynx" libretro_mednafen_lynx_git_url="https://github.com/libretro/beetle-lynx-libretro.git" -register_core "mednafen_ngp" +register_core "mednafen_ngp" -theos_ios -qnx libretro_mednafen_ngp_name="Mednafen/Beetle NeoPop" libretro_mednafen_ngp_git_url="https://github.com/libretro/beetle-ngp-libretro.git" -register_core "mednafen_pce_fast" +register_core "mednafen_pce_fast" -theos_ios libretro_mednafen_pce_fast_name="Mednafen/Beetle PCE FAST" libretro_mednafen_pce_fast_git_url="https://github.com/libretro/beetle-pce-fast-libretro.git" -register_core "mednafen_supergrafx" +register_core "mednafen_supergrafx" -theos_ios libretro_mednafen_supergrafx_name="Mednafen/Beetle SuperGrafx" libretro_mednafen_supergrafx_git_url="https://github.com/libretro/beetle-supergrafx-libretro.git" -register_core "mednafen_psx" +register_core "mednafen_psx" -theos_ios -ngc -psp1 libretro_mednafen_psx_name="Mednafen PSX" libretro_mednafen_psx_git_url="https://github.com/libretro/mednafen-psx-libretro.git" -register_core "mednafen_pcfx" +register_core "mednafen_pcfx" -theos_ios libretro_mednafen_pcfx_name="Mednafen/Beetle PC-FX" libretro_mednafen_pcfx_git_url="https://github.com/libretro/beetle-pcfx-libretro.git" -register_core "mednafen_snes" +register_core "mednafen_snes" -theos_ios libretro_mednafen_snes_name="Mednafen/Beetle bsnes" libretro_mednafen_snes_git_url="https://github.com/libretro/beetle-bsnes-libretro.git" -register_core "mednafen_vb" +register_core "mednafen_vb" -theos_ios libretro_mednafen_vb_name="Mednafen/Beetle VB" libretro_mednafen_vb_git_url="https://github.com/libretro/beetle-vb-libretro.git" -register_core "mednafen_wswan" +register_core "mednafen_wswan" -theos_ios -psp1 libretro_mednafen_wswan_name="Mednafen/Beetle WonderSwan" libretro_mednafen_wswan_git_url="https://github.com/libretro/beetle-wswan-libretro.git" -register_core "scummvm" +register_core "scummvm" -theos_ios -ngc -ps3 -psp1 -wii libretro_scummvm_name="ScummVM" libretro_scummvm_git_url="https://github.com/libretro/scummvm.git" libretro_scummvm_build_subdir="backends/platform/libretro/build" -register_core "yabause" +register_core "yabause" -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_yabause_name="Yabause" libretro_yabause_git_url="https://github.com/libretro/yabause.git" libretro_yabause_build_subdir="libretro" -register_core "dosbox" +register_core "dosbox" -ngc -ps3 -psp1 -wii libretro_dosbox_name="DOSBox" libretro_dosbox_git_url="https://github.com/libretro/dosbox-libretro.git" libretro_dosbox_makefile="Makefile.libretro" -register_core "virtualjaguar" +register_core "virtualjaguar" -ngc -ps3 -psp1 -wii libretro_virtualjaguar_name="Virtual Jaguar" libretro_virtualjaguar_git_url="https://github.com/libretro/virtualjaguar-libretro.git" libretro_virtualjaguar_makefile="Makefile" -register_core "mame078" +register_core "mame078" -theos_ios -ngc -psp1 -wii libretro_mame078_name="MAME 2003 (0.78)" libretro_mame078_git_url="https://github.com/libretro/mame2003-libretro.git" libretro_mame078_makefile="Makefile" -register_core "mame139" +register_core "mame139" none -psp1 -qnx -wii libretro_mame139_name="MAME 2010 (0.139)" libretro_mame139_git_url="https://github.com/libretro/mame2010-libretro.git" libretro_mame139_build_rule=none # NEED A BUILD RULE -register_core "mame" +register_core "mame" -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_mame_name="MAME (git)" libretro_mame_git_url="https://github.com/libretro/mame.git" libretro_mame_build_rule=none # NEED CUSTOM RULE -register_core "ffmpeg" +register_core "ffmpeg" -ios -theos_ios -osx -ngc -ps3 -psp1 -qnx -wii libretro_ffmpeg_name="FFmpeg" libretro_ffmpeg_git_url="https://github.com/libretro/FFmpeg.git" libretro_ffmpeg_build_subdir="libretro" libretro_ffmpeg_build_opengl="optional" -register_core "bsnes_cplusplus98" +register_core "bsnes_cplusplus98" -theos_ios -ngc -ps3 -psp1 -wii libretro_bsnes_cplusplus98_name="bsnes C++98 (v0.85)" libretro_bsnes_cplusplus98_git_url="https://github.com/libretro/bsnes-libretro-cplusplus98.git" libretro_bsnes_cplusplus98_build_rule=none # NEED CUSTOM RULE -register_core "bsnes_mercury" +register_core "bsnes_mercury" -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_bsnes_mercury_name="bsnes-mercury" libretro_bsnes_mercury_git_url="https://github.com/libretro/bsnes-mercury.git" libretro_bsnes_mercury_build_rule=none # NEED CUSTOM RULE -register_core "picodrive" +register_core "picodrive" -theos_ios -ngc -ps3 -wii libretro_picodrive_name="Picodrive" libretro_picodrive_git_url="https://github.com/libretro/picodrive.git" libretro_picodrive_git_submodules="yes" libretro_picodrive_build_makefile="Makefile.libretro" -register_core "tgbdual" +register_core "tgbdual" -ngc -ps3 -wii libretro_tgbdual_name="TGB Dual" libretro_tgbdual_git_url="https://github.com/libretro/tgbdual-libretro.git" -register_core "mupen64plus" +register_core "mupen64plus" -theos_ios -ngc -ps3 -psp1 -wii libretro_mupen64plus_name="Mupen64Plus" libretro_mupen64plus_git_url="https://github.com/libretro/mupen64plus-libretro.git" libretro_mupen64plus_build_rule=none # NEED CUSTOM RULE -register_core "dinothawr" +register_core "dinothawr" -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_dinothawr_name="Dinothawr" libretro_dinothawr_git_url="https://github.com/libretro/Dinothawr.git" libretro_dinothawr_build_platform="$FORMAT_COMPILER_TARGET_ALT" -register_core "uae" +register_core "uae" none -psp1 -qnx -wii libretro_uae_name="UAE" libretro_uae_git_url="https://github.com/libretro/libretro-uae.git" libretro_uae_build_rule=none # NEED A BUILD RULE -register_core "3dengine" +register_core "3dengine" -ngc -ps3 -psp1 -wii libretro_3dengine_name="3DEngine" libretro_3dengine_git_url="https://github.com/libretro/libretro-3dengine.git" libretro_3dengine_build_opengl=yes -register_core "remotejoy" +register_core "remotejoy" -ngc -ps3 -psp1 -qnx -wii libretro_remotejoy_name="RemoteJoy" libretro_remotejoy_git_url="https://github.com/libretro/libretro-remotejoy.git" libretro_remotejoy_build_makefile="Makefile" -register_core "bluemsx" +register_core "bluemsx" -ps3 libretro_bluemsx_name="blueMSX" libretro_bluemsx_git_url="https://github.com/libretro/blueMSX-libretro.git" libretro_bluemsx_build_makefile="Makefile.libretro" -register_core "fmsx" +register_core "fmsx" -ps3 libretro_fmsx_name="fMSX" libretro_fmsx_git_url="https://github.com/libretro/fmsx-libretro.git" -register_module core "2048" +register_core "2048" -ngc -ps3 -wii libretro_2048_git_url="https://github.com/libretro/libretro-2048.git" libretro_2048_build_makefile="Makefile.libretro" -register_module core "vecx" +register_core "vecx" -ngc -ps3 -wii libretro_vecx_git_url="https://github.com/libretro/libretro-vecx.git" libretro_vecx_build_makefile="Makefile.libretro" -register_core "ppsspp" +register_core "ppsspp" -ios -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_ppsspp_name="PPSSPP" libretro_ppsspp_git_url="https://github.com/libretro/ppsspp.git" libretro_ppsspp_git_submodules="yes" libretro_ppsspp_build_subdir="libretro" libretro_ppsspp_build_opengl="yes" -register_core "prosystem" +register_core "prosystem" -ngc -ps3 -wii libretro_prosystem_name="ProSystem" libretro_prosystem_git_url="https://github.com/libretro/prosystem-libretro.git" -register_core "o2em" +register_core "o2em" -ngc -ps3 -wii libretro_o2em_name="O2EM" libretro_o2em_git_url="https://github.com/libretro/libretro-o2em.git" -register_core "4do" +register_core "4do" -ngc -ps3 -psp1 -wii libretro_4do_name="4DO" libretro_4do_git_url="https://github.com/libretro/4do-libretro.git" -register_core "catsfc" +register_core "catsfc" -ngc -ps3 -psp1 -wii libretro_catsfc_name="CATSFC" libretro_catsfc_git_url="https://github.com/libretro/CATSFC-libretro.git" -register_core "stonesoup" +register_core "stonesoup" -ngc -ps3 -psp1 -qnx -wii libretro_stonesoup_name="Dungeon Crawl Stone Soup" libretro_stonesoup_git_url="https://github.com/libretro/crawl-ref.git" libretro_stonesoup_git_submodules="clone" libretro_stonesoup_build_subdir="crawl-ref" libretro_stonesoup_build_makefile="Makefile.libretro" -register_core "hatari" +register_core "hatari" -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_hatari_name="Hatari" libretro_hatari_git_url="https://github.com/libretro/hatari.git" libretro_hatari_build_makefile="Makefile.libretro" -register_core "tempgba" +register_core "tempgba" none libretro_tempgba_name="TempGBA" libretro_tempgba_git_url="https://github.com/libretro/TempGBA-libretro.git" libretro_tempgba_build_rule=none # NEED A BUILD RULE -register_core "gpsp" +register_core "gpsp" -ngc -ps3 -psp1 -wii libretro_gpsp_name="gpSP" libretro_gpsp_git_url="https://github.com/libretro/gpsp.git" -register_core "emux" +register_core "emux" -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_emux_name="Emux" libretro_emux_git_url="https://github.com/libretro/emux.git" libretro_emux_build_rule=none # NEED CUSTOM RULE -register_core "fuse" +register_core "fuse" -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_fuse_name="Fuse" libretro_fuse_git_url="https://github.com/libretro/fuse-libretro.git" libretro_fuse_build_makefile="Makefile.libretro" libretro_fuse_build_platform="$FORMAT_COMPILER_TARGET_ALT" -register_core "gw" +register_core "gw" -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_gw_name="Game & Watch" libretro_gw_git_url="https://github.com/libretro/gw-libretro.git" libretro_gw_git_submodules="yes" libretro_gw_build_makefile="Makefile.libretro" -register_core "lutro" +register_core "lutro" -theos_ios -ngc -ps3 -psp1 -qnx -wii libretro_lutro_name="Lutro" libretro_lutro_git_url="https://github.com/libretro/libretro-lutro.git" libretro_lutro_build_makefile="Makefile" -register_core "lutro_platformer" +register_core "lutro_platformer" none libretro_lutro_platformer_name="Lutro-Platformer" libretro_lutro_platformer_git_url="https://github.com/libretro/lutro-platformer.git" -register_core "lutro_tetris" +register_core "lutro_tetris" none libretro_lutro_tetris_name="Lutro-tetris" libretro_lutro_tetris_git_url="https://github.com/libretro/lutro-tetris.git" -register_core "lutro_snake" +register_core "lutro_snake" none libretro_lutro_snake_name="Lutro-snake" libretro_lutro_snake_git_url="https://github.com/libretro/lutro-snake.git" -register_core "lutro_iyfct" +register_core "lutro_iyfct" none libretro_lutro_iyfct_name="Lutro-iyfct" libretro_lutro_iyfct_git_url="https://github.com/libretro/lutro-iyfct.git" -register_core "lutro_game_of_life" +register_core "lutro_game_of_life" none libretro_lutro_game_of_life_name="Lutro-Game-of-Life" libretro_lutro_game_of_life_git_url="https://github.com/libretro/lutro-game-of-life.git" From f29d2d9cb6fbc4a6ac52d4b45c1e6b291e5a93c8 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 07:24:57 -0700 Subject: [PATCH 16/30] Remove skip archs from cores that have none as build arch --- rules.d/core-rules.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules.d/core-rules.sh b/rules.d/core-rules.sh index 6b0cf9b3..75ebbf6e 100644 --- a/rules.d/core-rules.sh +++ b/rules.d/core-rules.sh @@ -175,7 +175,7 @@ libretro_mame078_name="MAME 2003 (0.78)" libretro_mame078_git_url="https://github.com/libretro/mame2003-libretro.git" libretro_mame078_makefile="Makefile" -register_core "mame139" none -psp1 -qnx -wii +register_core "mame139" none libretro_mame139_name="MAME 2010 (0.139)" libretro_mame139_git_url="https://github.com/libretro/mame2010-libretro.git" libretro_mame139_build_rule=none # NEED A BUILD RULE @@ -221,7 +221,7 @@ libretro_dinothawr_name="Dinothawr" libretro_dinothawr_git_url="https://github.com/libretro/Dinothawr.git" libretro_dinothawr_build_platform="$FORMAT_COMPILER_TARGET_ALT" -register_core "uae" none -psp1 -qnx -wii +register_core "uae" none libretro_uae_name="UAE" libretro_uae_git_url="https://github.com/libretro/libretro-uae.git" libretro_uae_build_rule=none # NEED A BUILD RULE From de0382d2c7e2a54467def3341b53ff78b4b30345 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 07:46:19 -0700 Subject: [PATCH 17/30] Make theos build products hack a little less hacky --- libretro-build-common.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libretro-build-common.sh b/libretro-build-common.sh index ddd6f2c2..3a62a147 100755 --- a/libretro-build-common.sh +++ b/libretro-build-common.sh @@ -41,7 +41,11 @@ echo "$FORMAT_COMPILER_TARGET_ALT" RESET_FORMAT_COMPILER_TARGET=$FORMAT_COMPILER_TARGET RESET_FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET_ALT +CORE_PREFIX="" CORE_SUFFIX="_libretro${FORMAT}.$FORMAT_EXT" +if [ "$platform" = "theos_ios" ]; then + CORE_PREFIX="objs/obj/" +fi build_summary_log() { @@ -156,11 +160,7 @@ build_libretro_fba_cps1() { copy_core_to_dist() { - if [ "$FORMAT_COMPILER_TARGET" = "theos_ios" ]; then - echo_cmd "cp \"objs/obj/$1$CORE_SUFFIX\" \"$RARCH_DIST_DIR\"" - else - echo_cmd "cp \"$1$CORE_SUFFIX\" \"$RARCH_DIST_DIR\"" - fi + echo_cmd "cp \"$CORE_PREFIX$1$CORE_SUFFIX\" \"$RARCH_DIST_DIR\"" ret=$? build_summary_log $ret "$1" From b3f59614f6e88b705d045528b5bfef2d73dbe130 Mon Sep 17 00:00:00 2001 From: Radius Date: Tue, 10 Mar 2015 13:14:35 -0500 Subject: [PATCH 18/30] cleanup recipes --- recipes/psp/devkitpsp | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/psp/devkitpsp b/recipes/psp/devkitpsp index f0dffb88..a455b3e0 100644 --- a/recipes/psp/devkitpsp +++ b/recipes/psp/devkitpsp @@ -5,3 +5,4 @@ fmsx libretro-fmsx https://github.com/libretro/fmsx-libretro.git PROJECT YES GEN prboom libretro-prboom https://github.com/libretro/libretro-prboom.git PROJECT YES GENERIC Makefile . tempgba libretro-tempgba https://github.com/libretro/TempGBA-libretro.git PROJECT YES GENERIC Makefile . mednafen_pce_fast libretro-mednafen_pce_fast https://github.com/aliaspider/beetle-pce-fast-libretro.git psp_hw_render YES GENERIC Makefile . + From 0143866764f085667b2bbf16a9dfb077ea5efbfe Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 11:21:54 -0700 Subject: [PATCH 19/30] Everything now uses copy_core_to_dist --- libretro-build-common.sh | 65 +++++++++++++++++-------------------- libretro-buildbot-recipe.sh | 4 +-- libretro-buildbot-task.sh | 4 +-- 3 files changed, 33 insertions(+), 40 deletions(-) diff --git a/libretro-build-common.sh b/libretro-build-common.sh index 3a62a147..ae59091f 100755 --- a/libretro-build-common.sh +++ b/libretro-build-common.sh @@ -57,6 +57,16 @@ build_summary_log() { fi } +copy_core_to_dist() { + [ -z "$1" ] && return 1 + dest="${2:-$1}" + echo_cmd "cp \"$CORE_PREFIX$1$CORE_SUFFIX\" \"$RARCH_DIST_DIR/$dest$CORE_SUFFIX\"" + + ret=$? + build_summary_log $ret "$dest" + return $ret +} + build_should_skip() { [ -z "$SKIP_UNCHANGED" ] && return 1 @@ -118,8 +128,7 @@ build_libretro_pcsx_rearmed_interpreter() { echo_cmd "$MAKE -f Makefile.libretro platform=\"$FORMAT_COMPILER_TARGET\" \"-j$JOBS\" clean" || die 'Failed to clean PCSX ReARMed' fi echo_cmd "$MAKE -f Makefile.libretro USE_DYNAREC=0 platform=\"$FORMAT_COMPILER_TARGET\" $COMPILER \"-j$JOBS\"" || die 'Failed to build PCSX ReARMed' - echo_cmd "cp \"pcsx_rearmed$CORE_SUFFIX\" \"$RARCH_DIST_DIR/pcsx_rearmed_interpreter${FORMAT}.$FORMAT_EXT\"" - build_summary_log $? "pcsx_rearmed_interpreter" + copy_core_to_dist "pcsx_rearmed" "pcsx_rearmed_interpreter" build_save_revision $? "pcsx_rearmed_interpreter" else echo 'PCSX ReARMed not fetched, skipping ...' @@ -141,8 +150,7 @@ build_libretro_generic_makefile_subcore() { echo_cmd "$MAKE -f \"$4\" platform=$5 -j$JOBS clean" || die "Failed to clean $2" fi echo_cmd "$MAKE -f $4 platform=$5 -j$JOBS" || die "Failed to build $2" - echo_cmd "cp $2$CORE_SUFFIX $RARCH_DIST_DIR/$2$CORE_SUFFIX" - build_summary_log $? "$2" + copy_core_to_dist "$2" fi } @@ -159,14 +167,6 @@ build_libretro_fba_cps1() { } -copy_core_to_dist() { - echo_cmd "cp \"$CORE_PREFIX$1$CORE_SUFFIX\" \"$RARCH_DIST_DIR\"" - - ret=$? - build_summary_log $ret "$1" - return $ret -} - build_libretro_generic() { echo_cmd "cd \"$5/$2\"" @@ -310,7 +310,7 @@ libretro_build_core() { build_libretro_test() { - build_dir="$WORKDIR/$1" + build_dir="$WORKDIR/retroarch" if build_should_skip "test" "$build_dir"; then echo "Core test is already built, skipping..." @@ -378,10 +378,8 @@ build_libretro_mame_modern() { fi [ "$ret" -gt 0 ] && die 'Failed to build MAME' - echo_cmd "cp \"$2$CORE_SUFFIX\" \"$RARCH_DIST_DIR\"" - ret=$? - build_summary_log $ret "$2" - return $ret + copy_core_to_dist "$2" + return $? else echo 'MAME not fetched, skipping ...' fi @@ -421,9 +419,11 @@ build_libretro_mame_prerule() { else for target in mame mess ume; do echo_cmd "$MAKE -f Makefile.libretro $extra_args \"TARGET=$target\" platform=\"$FORMAT_COMPILER_TARGET\" $COMPILER \"-j$JOBS\" emulator" || die "Failed to build $target" - echo_cmd "cp \"$target$CORE_SUFFIX\" \"$RARCH_DIST_DIR\"" + copy_core_to_dist "$target" ret=$? - build_summary_log $ret "$target" + + # If a target fails, stop here... + [ $ret -eq 0 ] || break done fi @@ -431,7 +431,6 @@ build_libretro_mame_prerule() { echo 'MAME not fetched, skipping ...' fi - # TODO: Like others, this saves the revision if ume builds... build_save_revision $ret mame } @@ -472,9 +471,7 @@ build_libretro_bsnes_modern() { ret=0 for a in accuracy balanced performance; do echo_cmd "$cmdline profile=$a" - echo_cmd "cp -f \"out/${1}_$a$CORE_SUFFIX\" \"$RARCH_DIST_DIR/${1}_$a$CORE_SUFFIX\"" - ret=$? - build_summary_log $ret "${1}_$a" + copy_core_to_dist "out/${1}_$a" "${1}_$a" [ $ret -eq 0 ] || break done @@ -518,14 +515,14 @@ build_libretro_bsnes_cplusplus98() { echo_cmd "cd \"$build_dir\"" if [ -z "$NOCLEAN" ]; then - echo_cmd "$MAKE clean" || die "Failed to clean $CORENAME" + # byuu's "make clean" doesn't + echo_cmd "rm -f obj/*.{o,\"$FORMAT_EXT\"}" + echo_cmd "rm -f out/*.{o,\"$FORMAT_EXT\"}" fi echo_cmd "$MAKE platform=\"$FORMAT_COMPILER_TARGET\" $COMPILER \"-j$JOBS\"" - echo_cmd "cp \"out/libretro.$FORMAT_EXT\" \"$RARCH_DIST_DIR/$CORENAME$CORE_SUFFIX\"" - ret=$? - build_summary_log $ret $CORENAME - build_save_revision $ret $CORENAME + copy_core_to_dist "out/$CORENAME" "$CORENAME" + build_save_revision $? $CORENAME else echo "$CORENAME not fetched, skipping ..." fi @@ -548,10 +545,8 @@ build_libretro_bnes() { echo_cmd "$MAKE -f Makefile \"-j$JOBS\" clean" || die 'Failed to clean bNES' fi echo_cmd "$MAKE -f Makefile $COMPILER \"-j$JOBS\" compiler=\"${CXX11}\"" || die 'Failed to build bNES' - echo_cmd "cp \"libretro${FORMAT}.$FORMAT_EXT\" \"$RARCH_DIST_DIR/bnes$CORE_SUFFIX\"" - ret=$? - build_summary_log $ret "bnes" - build_save_revision $ret "bnes" + copy_core_to_dist "bnes" + build_save_revision $? "bnes" else echo 'bNES not fetched, skipping ...' fi @@ -586,10 +581,8 @@ build_libretro_mupen64() { echo_cmd "$MAKE $dynarec platform=\"$FORMAT_COMPILER_TARGET_ALT\" $COMPILER \"-j$JOBS\"" || die 'Failed to build Mupen 64' - echo_cmd "cp \"mupen64plus$CORE_SUFFIX\" \"$RARCH_DIST_DIR\"" - ret=$? - build_summary_log $ret "mupen64plus" - build_save_revision $ret "mupen64plus" + copy_core_to_dist "mupen64plus" + build_save_revision $? "mupen64plus" else echo 'Mupen64 Plus not fetched, skipping ...' fi diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 5a962d2a..55cc5321 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -487,9 +487,9 @@ build_libretro_bsnes() { if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" if [ "${PROFILE}" = "cpp98" ]; then - cp -fv "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" + cp -fv "out/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" elif [ "${PROFILE}" = "bnes" ]; then - cp -fv "libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" + cp -fv "${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" else cp -fv "out/${NAME}_libretro$FORMAT.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} fi diff --git a/libretro-buildbot-task.sh b/libretro-buildbot-task.sh index d41a9ae7..e8e1a511 100755 --- a/libretro-buildbot-task.sh +++ b/libretro-buildbot-task.sh @@ -485,9 +485,9 @@ build_libretro_bsnes() { if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" if [ "${PROFILE}" = "cpp98" ]; then - cp -fv "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" + cp -fv "out/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" elif [ "${PROFILE}" = "bnes" ]; then - cp -fv "libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" + cp -fv "${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT}" else cp -fv "out/${NAME}_libretro$FORMAT.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} fi From 3b0cacbe5233645dddc1574600db629fe9c7825e Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 12:25:22 -0700 Subject: [PATCH 20/30] Fix a bug and clean up the whitespace some more --- libretro-buildbot-recipe.sh | 556 ++++++++++++++++-------------------- 1 file changed, 241 insertions(+), 315 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 55cc5321..229e8bbf 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -17,13 +17,12 @@ WORK=$PWD echo Original PATH: $PATH while read line; do - KEY=`echo $line | cut --fields=1 --delimiter=" "` - VALUE=`echo $line | cut --fields=2 --delimiter=" "` + KEY=`echo $line | cut -f 1 -d " "` + VALUE=`echo $line | cut -f 2 -d " "` if [ "${KEY}" = "PATH" ]; then export PATH=${VALUE}:${ORIGPATH} echo New PATH: $PATH - else export ${KEY}=${VALUE} echo $KEY: $VALUE @@ -32,7 +31,7 @@ done < $1.conf echo echo -. ./libretro-config.sh +. $WORK/libretro-config.sh echo [[ "${ARM_NEON}" ]] && echo 'ARM NEON opts enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-neon" @@ -69,7 +68,6 @@ fi mkdir -v -p "$RARCH_DIST_DIR" if [ "${PLATFORM}" = "android" ]; then - IFS=' ' read -ra ABIS <<< "$TARGET_ABIS" for a in "${ABIS[@]}"; do echo $a @@ -174,7 +172,7 @@ buildbot_log() { MESSAGE=`echo -e $1` - HASH=`echo -n "$MESSAGE" | openssl sha1 -hmac $SIG | cut --fields=2 --delimiter=" "` + HASH=`echo -n "$MESSAGE" | openssl sha1 -hmac $SIG | cut -f 2 -d " "` curl --data "message=$MESSAGE&sign=$HASH" $LOGURL @@ -198,8 +196,6 @@ build_libretro_generic_makefile() { JOBS=1 fi - - if [ -z "${NOCLEAN}" ]; then echo "cleaning up..." echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" @@ -227,11 +223,10 @@ build_libretro_generic_makefile() { if [ $? -eq 0 ]; then MESSAGE="$1 build successful ($jobid)" - if [ "${MAKEPORTABLE}" == "YES" ]; - then - echo "$1 running retrolink ($jobid)" - $WORK/retrolink.sh ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} - fi + if [ "${MAKEPORTABLE}" == "YES" ]; then + echo "$1 running retrolink ($jobid)" + $WORK/retrolink.sh ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} + fi cp -v ${NAME}_libretro${FORMAT}${SUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}.${FORMAT_EXT} else MESSAGE="$1 build failed ($jobid)" @@ -239,11 +234,9 @@ build_libretro_generic_makefile() { echo BUILDBOT JOB: $MESSAGE buildbot_log "$MESSAGE" JOBS=$OLDJ - } build_libretro_generic_theos() { - echo PARAMETERS: DIR $2, SUBDIR: $3, MAKEFILE: $4 NAME=$1 @@ -256,9 +249,6 @@ build_libretro_generic_theos() { cd $DIR cd $SUBDIR - ln -s $THEOS theos - - if [ -z "${NOCLEAN}" ]; then echo "cleaning up..." echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" @@ -287,11 +277,9 @@ build_libretro_generic_theos() { fi echo BUILDBOT JOB: $MESSAGE buildbot_log "$MESSAGE" - } build_libretro_generic_jni() { - echo PARAMETERS: DIR $2, SUBDIR: $3 NAME=$1 @@ -315,7 +303,7 @@ build_libretro_generic_jni() { fi fi - echo "compiling for ${a}..." + echo "compiling for ${a}..." if [ -z "${ARGS}" ]; then echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" ${NDK} -j${JOBS} APP_ABI=${a} @@ -334,13 +322,9 @@ build_libretro_generic_jni() { buildbot_log "$MESSAGE" fi done - - - } build_libretro_bsnes_jni() { - echo PARAMETERS: DIR $2, SUBDIR: $3 NAME=$1 @@ -382,14 +366,12 @@ build_libretro_bsnes_jni() { fi echo BUILDBOT JOB: $MESSAGE buildbot_log "$MESSAGE" - done } build_libretro_generic_gl_makefile() { - NAME=$1 DIR=$2 SUBDIR=$3 @@ -397,7 +379,6 @@ build_libretro_generic_gl_makefile() { PLATFORM=$5 ARGS=$6 - check_opengl cd $DIR @@ -433,14 +414,11 @@ build_libretro_generic_gl_makefile() { buildbot_log "$MESSAGE" reset_compiler_targets - - } build_libretro_bsnes() { - NAME=$1 DIR=$2 PROFILE=$3 @@ -448,22 +426,18 @@ build_libretro_bsnes() { PLATFORM=$5 BSNESCOMPILER=$6 - cd $DIR - if [ -z "${NOCLEAN}" ]; then echo "cleaning up..." rm -f obj/*.{o,"${FORMAT_EXT}"} rm -f out/*.{o,"${FORMAT_EXT}"} - if [ "${PROFILE}" = "cpp98" -o "${PROFILE}" = "bnes" ]; then ${MAKE} clean fi - if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $1 cleanup success! else @@ -473,7 +447,6 @@ build_libretro_bsnes() { echo "compiling..." - if [ "${PROFILE}" = "cpp98" ]; then ${MAKE} platform="${PLATFORM}" ${COMPILER} "-j${JOBS}" elif [ "${PROFILE}" = "bnes" ]; then @@ -498,7 +471,6 @@ build_libretro_bsnes() { fi echo BUILDBOT JOB: $MESSAGE buildbot_log "$MESSAGE" - } #fetch a project and mark it for building if there have been any changes @@ -509,15 +481,14 @@ export jobid=$1 echo echo while read line; do - - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - COMMAND=`echo $line | cut --fields=6 --delimiter=" "` - MAKEFILE=`echo $line | cut --fields=7 --delimiter=" "` - SUBDIR=`echo $line | cut --fields=8 --delimiter=" "` + NAME=`echo $line | cut -f 1 -d " "` + DIR=`echo $line | cut -f 2 -d " "` + URL=`echo $line | cut -f 3 -d " "` + TYPE=`echo $line | cut -f 4 -d " "` + ENABLED=`echo $line | cut -f 5 -d " "` + COMMAND=`echo $line | cut -f 6 -d " "` + MAKEFILE=`echo $line | cut -f 7 -d " "` + SUBDIR=`echo $line | cut -f 8 -d " "` if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" @@ -530,35 +501,34 @@ while read line; do echo DIR: $DIR echo SUBDIR: $SUBDIR - ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` + TEMP=`echo $line | cut -f 9 -d " "` if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` + TEMP=`echo $line | cut -f 10 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` + TEMP=`echo $line | cut -f 11 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` + TEMP=`echo $line | cut -f 12 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` + TEMP=`echo $line | cut -f 13 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` + TEMP=`echo $line | cut -f 14 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi @@ -596,9 +566,7 @@ while read line; do BUILD="YES" fi - cd .. - else echo "cloning repo..." git clone --depth=1 "$URL" "$DIR" @@ -676,7 +644,6 @@ while read line; do cd "${BASE_DIR}" PREVCORE=$NAME PREVBUILD=$BUILD - done < $1 echo "BUILDBOT JOB: $jobid Building Retroarch" @@ -685,15 +652,13 @@ cd $WORK BUILD="" if [ "${PLATFORM}" = "android" ] && [ "${RA}" = "YES" ]; then - while read line; do - - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` + NAME=`echo $line | cut -f 1 -d " "` + DIR=`echo $line | cut -f 2 -d " "` + URL=`echo $line | cut -f 3 -d " "` + TYPE=`echo $line | cut -f 4 -d " "` + ENABLED=`echo $line | cut -f 5 -d " "` + PARENTDIR=`echo $line | cut -f 6 -d " "` if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" @@ -707,32 +672,32 @@ if [ "${PLATFORM}" = "android" ] && [ "${RA}" = "YES" ]; then ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` + TEMP=`echo $line | cut -f 9 -d " "` if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` + TEMP=`echo $line | cut -f 10 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` + TEMP=`echo $line | cut -f 11 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` + TEMP=`echo $line | cut -f 12 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` + TEMP=`echo $line | cut -f 13 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` + TEMP=`echo $line | cut -f 14 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi @@ -765,7 +730,6 @@ if [ "${PLATFORM}" = "android" ] && [ "${RA}" = "YES" ]; then if [ "${TYPE}" = "PROJECT" ]; then BUILD="YES" RADIR=$DIR - fi cd $WORK fi @@ -774,6 +738,7 @@ if [ "${PLATFORM}" = "android" ] && [ "${RA}" = "YES" ]; then echo echo done < $1.ra + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Compiling Shaders" echo @@ -825,15 +790,13 @@ if [ "${PLATFORM}" = "android" ] && [ "${RA}" = "YES" ]; then fi if [ "${PLATFORM}" = "theos_ios" ] && [ "${RA}" = "YES" ]; then - while read line; do - - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` + NAME=`echo $line | cut -f 1 -d " "` + DIR=`echo $line | cut -f 2 -d " "` + URL=`echo $line | cut -f 3 -d " "` + TYPE=`echo $line | cut -f 4 -d " "` + ENABLED=`echo $line | cut -f 5 -d " "` + PARENTDIR=`echo $line | cut -f 6 -d " "` if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" @@ -847,32 +810,32 @@ if [ "${PLATFORM}" = "theos_ios" ] && [ "${RA}" = "YES" ]; then ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` + TEMP=`echo $line | cut -f 9 -d " "` if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` + TEMP=`echo $line | cut -f 10 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` + TEMP=`echo $line | cut -f 11 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` + TEMP=`echo $line | cut -f 12 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` + TEMP=`echo $line | cut -f 13 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` + TEMP=`echo $line | cut -f 14 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi @@ -914,6 +877,7 @@ if [ "${PLATFORM}" = "theos_ios" ] && [ "${RA}" = "YES" ]; then echo echo done < $1.ra + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Compiling Shaders" echo @@ -950,15 +914,13 @@ if [ "${PLATFORM}" = "theos_ios" ] && [ "${RA}" = "YES" ]; then fi if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] && [ "${RA}" = "YES" ]; then - while read line; do - - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` + NAME=`echo $line | cut -f 1 -d " "` + DIR=`echo $line | cut -f 2 -d " "` + URL=`echo $line | cut -f 3 -d " "` + TYPE=`echo $line | cut -f 4 -d " "` + ENABLED=`echo $line | cut -f 5 -d " "` + PARENTDIR=`echo $line | cut -f 6 -d " "` if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" @@ -972,33 +934,33 @@ if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] && [ "${RA}" = ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` + TEMP=`echo $line | cut -f 9 -d " "` if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` + TEMP=`echo $line | cut -f 10 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` + TEMP=`echo $line | cut -f 11 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` + TEMP=`echo $line | cut -f 12 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` + TEMP=`echo $line | cut -f 13 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` + TEMP=`echo $line | cut -f 14 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi @@ -1031,7 +993,6 @@ if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] && [ "${RA}" = if [ "${TYPE}" = "PROJECT" ]; then BUILD="YES" RADIR=$DIR - fi cd $WORK fi @@ -1040,8 +1001,8 @@ if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] && [ "${RA}" = echo echo done < $1.ra - if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then cd $RADIR echo "BUILDBOT JOB: $jobid Building" echo @@ -1133,8 +1094,6 @@ video_shader_dir = ":\shaders" EOF - - rm -rfv windows mkdir -p windows mkdir -p windows/overlays @@ -1148,7 +1107,7 @@ EOF mkdir -p windows/database mkdir -p windows/database/cursors mkdir -p windows/database/rdb - + cp -v *.cfg windows/ cp -v *.exe tools/*.exe windows/ cp -Rfv media/overlays/* windows/overlays @@ -1163,27 +1122,22 @@ EOF cp -Rfv audio/audio_filters/*.dsp windows/filters/audio cp -Rfv gfx/video_filters/*.dll windows/filters/video cp -Rfv gfx/video_filters/*.filt windows/filters/video - else MESSAGE="retroarch build failed ($jobid)" echo $MESSAGE buildbot_log "$MESSAGE" fi - fi - fi if [ "${PLATFORM}" = "psp1" ] && [ "${RA}" = "YES" ]; then - while read line; do - - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` + NAME=`echo $line | cut -f 1 -d " "` + DIR=`echo $line | cut -f 2 -d " "` + URL=`echo $line | cut -f 3 -d " "` + TYPE=`echo $line | cut -f 4 -d " "` + ENABLED=`echo $line | cut -f 5 -d " "` + PARENTDIR=`echo $line | cut -f 6 -d " "` if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" @@ -1197,131 +1151,121 @@ if [ "${PLATFORM}" = "psp1" ] && [ "${RA}" = "YES" ]; then ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` + TEMP=`echo $line | cut -f 9 -d " "` if [ -n ${TEMP} ]; then ARGS="${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; then - ARGS="${ARGS} ${TEMP}" - fi - - ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" - - echo ARGS: $ARGS - - if [ -d "${PARENTDIR}/${DIR}/.git" ]; then - cd $PARENTDIR - cd $DIR - echo "pulling from repo... " - OUT=`git pull` - echo $OUT - if [ "${TYPE}" = "PROJECT" ]; then - RADIR=$DIR - if [[ $OUT == *"Already up-to-date"* ]]; then - BUILD="NO" - else - BUILD="YES" - fi fi - cd $WORK - else - echo "cloning repo..." + TEMP="" + TEMP=`echo $line | cut -f 10 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 11 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 12 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 13 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 14 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + + echo ARGS: $ARGS + + if [ -d "${PARENTDIR}/${DIR}/.git" ]; then cd $PARENTDIR - git clone "$URL" "$DIR" --depth=1 - cd $DIR - - if [ "${TYPE}" = "PROJECT" ]; then - BUILD="YES" - RADIR=$DIR - + cd $DIR + echo "pulling from repo... " + OUT=`git pull` + echo $OUT + if [ "${TYPE}" = "PROJECT" ]; then + RADIR=$DIR + if [[ $OUT == *"Already up-to-date"* ]]; then + BUILD="NO" + else + BUILD="YES" + fi + fi + cd $WORK + else + echo "cloning repo..." + cd $PARENTDIR + git clone "$URL" "$DIR" --depth=1 + cd $DIR + + if [ "${TYPE}" = "PROJECT" ]; then + BUILD="YES" + RADIR=$DIR + fi + cd $WORK fi - cd $WORK fi - fi - echo - echo + echo + echo done < $1.ra - if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then cd $RADIR rm -rfv psp1/pkg echo "BUILDBOT JOB: $jobid Building" echo if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + cd dist-scripts + rm *.a + cp -v $RARCH_DIST_DIR/*.a . + ls -1 *.a | awk -F "." ' { print "cp " $0 " " $1 "_psp1." $2 }' |sh - cd dist-scripts - rm *.a - cp -v $RARCH_DIST_DIR/*.a . - ls -1 *.a | awk -F "." ' { print "cp " $0 " " $1 "_psp1." $2 }' |sh + ./psp1-cores.sh + if [ $? -eq 0 ]; then + MESSAGE="retroarch build successful ($jobid)" + echo $MESSAGE + else + MESSAGE="retroarch build failed ($jobid)" + echo $MESSAGE + fi + echo "Packaging" + echo ============================================ + cp retroarch.cfg retroarch.default.cfg - ./psp1-cores.sh - if [ $? -eq 0 ]; then - MESSAGE="retroarch build successful ($jobid)" - echo $MESSAGE - else - MESSAGE="retroarch build failed ($jobid)" - echo $MESSAGE + mkdir -p psp1/pkg/ + mkdir -p psp1/pkg/cheats + mkdir -p psp1/pkg/database + mkdir -p psp1/pkg/database/cursors + mkdir -p psp1/pkg/database/rdb + + cp -Rfv media/libretrodb/cht/* psp1/pkg/cheats + cp -Rfv media/libretrodb/rdb/* psp1/pkg/database/rdb + cp -Rfv media/libretrodb/cursors/* psp1/pkg/database/cursors fi - - echo "Packaging" - echo ============================================ - cp retroarch.cfg retroarch.default.cfg - - - mkdir -p psp1/pkg/ - mkdir -p psp1/pkg/cheats - mkdir -p psp1/pkg/database - mkdir -p psp1/pkg/database/cursors - mkdir -p psp1/pkg/database/rdb - - cp -Rfv media/libretrodb/cht/* psp1/pkg/cheats - cp -Rfv media/libretrodb/rdb/* psp1/pkg/database/rdb - cp -Rfv media/libretrodb/cursors/* psp1/pkg/database/cursors - - fi - fi -if [ "${PLATFORM}" == "wii" ] && [ "${RA}" == "YES" ]; -then - +if [ "${PLATFORM}" == "wii" ] && [ "${RA}" == "YES" ]; then while read line; do + NAME=`echo $line | cut -f 1 -d " "` + DIR=`echo $line | cut -f 2 -d " "` + URL=`echo $line | cut -f 3 -d " "` + TYPE=`echo $line | cut -f 4 -d " "` + ENABLED=`echo $line | cut -f 5 -d " "` + PARENTDIR=`echo $line | cut -f 6 -d " "` - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` - - if [ "${ENABLED}" == "YES" ]; - then + if [ "${ENABLED}" == "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo echo NAME: $NAME @@ -1333,93 +1277,81 @@ then ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` - if [ -n ${TEMP} ]; - then + TEMP=`echo $line | cut -f 9 -d " "` + if [ -n ${TEMP} ]; then ARGS="${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi - TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` - if [ -n ${TEMP} ]; - then - ARGS="${ARGS} ${TEMP}" - fi + fi + TEMP="" + TEMP=`echo $line | cut -f 10 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 11 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 12 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 13 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 14 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi - ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" - echo ARGS: $ARGS + echo ARGS: $ARGS - if [ -d "${PARENTDIR}/${DIR}/.git" ]; - then - cd $PARENTDIR - cd $DIR - echo "pulling from repo... " - OUT=`git pull` - echo $OUT - if [ "${TYPE}" == "PROJECT" ]; - then - RADIR=$DIR - if [[ $OUT == *"Already up-to-date"* ]] - then - BUILD="NO" - else - BUILD="YES" + if [ -d "${PARENTDIR}/${DIR}/.git" ]; then + cd $PARENTDIR + cd $DIR + echo "pulling from repo... " + OUT=`git pull` + echo $OUT + if [ "${TYPE}" == "PROJECT" ]; then + RADIR=$DIR + if [[ $OUT == *"Already up-to-date"* ]]; then + BUILD="NO" + else + BUILD="YES" + fi fi - fi - cd $WORK - else - echo "cloning repo..." - cd $PARENTDIR - git clone "$URL" "$DIR" --depth=1 - cd $DIR - - if [ "${TYPE}" == "PROJECT" ]; - then - BUILD="YES" - RADIR=$DIR + cd $WORK + else + echo "cloning repo..." + cd $PARENTDIR + git clone "$URL" "$DIR" --depth=1 + cd $DIR + + if [ "${TYPE}" == "PROJECT" ]; then + BUILD="YES" + RADIR=$DIR + fi + cd $WORK fi - cd $WORK fi - fi - echo - echo + echo + echo done < $1.ra - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then cd $RADIR - #rm -rfv wii/pkg + #rm -rfv wii/pkg echo "BUILDBOT JOB: $jobid Building" echo - if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; - then + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then cd dist-scripts rm *.a @@ -1427,38 +1359,32 @@ then ls -1 *.a | awk -F "." ' { print "cp " $0 " " $1 "_wii." $2 }' |sh sh ./wii-cores.sh - if [ $? -eq 0 ]; - then - MESSAGE="retroarch build successful ($jobid)" - echo $MESSAGE - else - MESSAGE="retroarch build failed ($jobid)" - echo $MESSAGE + if [ $? -eq 0 ]; then + MESSAGE="retroarch build successful ($jobid)" + echo $MESSAGE + else + MESSAGE="retroarch build failed ($jobid)" + echo $MESSAGE fi - buildbot_log "$MESSAGE" - cd .. - + buildbot_log "$MESSAGE" + cd .. fi - echo "Packaging" - echo ============================================ - cp retroarch.cfg retroarch.default.cfg + echo "Packaging" + echo ============================================ + cp retroarch.cfg retroarch.default.cfg - mkdir -p wii/pkg/ - mkdir -p wii/pkg/overlays - mkdir -p wii/pkg/cheats - mkdir -p wii/pkg/database - mkdir -p wii/pkg/database/cursors - mkdir -p wii/pkg/database/rdb - - cp -Rfv media/libretrodb/cht/* wii/pkg/cheats - cp -Rfv media/libretrodb/rdb/* wii/pkg/database/rdb - cp -Rfv media/libretrodb/cursors/* wii/pkg/database/cursors - cp -Rfv media/overlays/* wii/pkg/overlays - - - fi + mkdir -p wii/pkg/ + mkdir -p wii/pkg/overlays + mkdir -p wii/pkg/cheats + mkdir -p wii/pkg/database + mkdir -p wii/pkg/database/cursors + mkdir -p wii/pkg/database/rdb + cp -Rfv media/libretrodb/cht/* wii/pkg/cheats + cp -Rfv media/libretrodb/rdb/* wii/pkg/database/rdb + cp -Rfv media/libretrodb/cursors/* wii/pkg/database/cursors + cp -Rfv media/overlays/* wii/pkg/overlays fi PATH=$ORIGPATH From 7948e54625d3d7d5b7a64a8bc3a2994f838e8a1b Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 12:33:14 -0700 Subject: [PATCH 21/30] Stray B --- libretro-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-config.sh b/libretro-config.sh index 88f08ae0..961f8578 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -71,7 +71,7 @@ case "$platform" in X86=true ;; armv*) -B ARM=true + ARM=true export FORMAT_COMPILER_TARGET=armv export RARCHCFLAGS="$RARCHCFLAGS -marm" case "${ARCH}" in From 9d91e9e666deab1d64bdb99adaa58aff7e3fc0d7 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 12:36:15 -0700 Subject: [PATCH 22/30] One more try --- libretro-buildbot-recipe.sh | 60 ++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 229e8bbf..6a204731 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -1352,39 +1352,39 @@ if [ "${PLATFORM}" == "wii" ] && [ "${RA}" == "YES" ]; then echo if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; then + cd dist-scripts + rm *.a + cp -v $RARCH_DIST_DIR/*.a . - cd dist-scripts - rm *.a - cp -v $RARCH_DIST_DIR/*.a . - - ls -1 *.a | awk -F "." ' { print "cp " $0 " " $1 "_wii." $2 }' |sh - sh ./wii-cores.sh - if [ $? -eq 0 ]; then - MESSAGE="retroarch build successful ($jobid)" - echo $MESSAGE - else - MESSAGE="retroarch build failed ($jobid)" - echo $MESSAGE + ls -1 *.a | awk -F "." ' { print "cp " $0 " " $1 "_wii." $2 }' |sh + sh ./wii-cores.sh + if [ $? -eq 0 ]; then + MESSAGE="retroarch build successful ($jobid)" + echo $MESSAGE + else + MESSAGE="retroarch build failed ($jobid)" + echo $MESSAGE + fi + buildbot_log "$MESSAGE" + cd .. fi - buildbot_log "$MESSAGE" - cd .. + + echo "Packaging" + echo ============================================ + cp retroarch.cfg retroarch.default.cfg + + mkdir -p wii/pkg/ + mkdir -p wii/pkg/overlays + mkdir -p wii/pkg/cheats + mkdir -p wii/pkg/database + mkdir -p wii/pkg/database/cursors + mkdir -p wii/pkg/database/rdb + + cp -Rfv media/libretrodb/cht/* wii/pkg/cheats + cp -Rfv media/libretrodb/rdb/* wii/pkg/database/rdb + cp -Rfv media/libretrodb/cursors/* wii/pkg/database/cursors + cp -Rfv media/overlays/* wii/pkg/overlays fi - - echo "Packaging" - echo ============================================ - cp retroarch.cfg retroarch.default.cfg - - mkdir -p wii/pkg/ - mkdir -p wii/pkg/overlays - mkdir -p wii/pkg/cheats - mkdir -p wii/pkg/database - mkdir -p wii/pkg/database/cursors - mkdir -p wii/pkg/database/rdb - - cp -Rfv media/libretrodb/cht/* wii/pkg/cheats - cp -Rfv media/libretrodb/rdb/* wii/pkg/database/rdb - cp -Rfv media/libretrodb/cursors/* wii/pkg/database/cursors - cp -Rfv media/overlays/* wii/pkg/overlays fi PATH=$ORIGPATH From 8cad0c742d23f791f5ebf1d3dd1344731712e8c1 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 12:39:41 -0700 Subject: [PATCH 23/30] Use cut portably --- libretro-buildbot-task.sh | 58 +++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/libretro-buildbot-task.sh b/libretro-buildbot-task.sh index e8e1a511..ce1bfeeb 100755 --- a/libretro-buildbot-task.sh +++ b/libretro-buildbot-task.sh @@ -22,8 +22,8 @@ WORK=$PWD echo Original PATH: $PATH while read line; do - KEY=`echo $line | cut --fields=1 --delimiter=" "` - VALUE=`echo $line | cut --fields=2 --delimiter=" "` + KEY=`echo $line | cut -f 1 -d " "` + VALUE=`echo $line | cut -f 2 -d " "` if [ "${KEY}" = "PATH" ]; then export PATH=${VALUE}:${ORIGPATH} @@ -177,7 +177,7 @@ cd "${BASE_DIR}" ####build commands buildbot_log() { - HASH=`echo -n "$1" | openssl sha1 -hmac $SIG | cut --fields=2 --delimiter=" "` + HASH=`echo -n "$1" | openssl sha1 -hmac $SIG | cut -f 2 -d " "` curl --data "message=$1&sign=$HASH" $LOGURL @@ -516,14 +516,14 @@ echo echo while read line; do - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - COMMAND=`echo $line | cut --fields=6 --delimiter=" "` - MAKEFILE=`echo $line | cut --fields=7 --delimiter=" "` - SUBDIR=`echo $line | cut --fields=8 --delimiter=" "` + NAME=`echo $line | cut -f 1 -d " "` + DIR=`echo $line | cut -f 2 -d " "` + URL=`echo $line | cut -f 3 -d " "` + TYPE=`echo $line | cut -f 4 -d " "` + ENABLED=`echo $line | cut -f 5 -d " "` + COMMAND=`echo $line | cut -f 6 -d " "` + MAKEFILE=`echo $line | cut -f 7 -d " "` + SUBDIR=`echo $line | cut -f 8 -d " "` if [ ! -z "$TASK" ]; then @@ -548,32 +548,32 @@ while read line; do ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` + TEMP=`echo $line | cut -f 9 -d " "` if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` + TEMP=`echo $line | cut -f 10 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` + TEMP=`echo $line | cut -f 11 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` + TEMP=`echo $line | cut -f 12 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` + TEMP=`echo $line | cut -f 13 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` + TEMP=`echo $line | cut -f 14 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi @@ -629,12 +629,12 @@ if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] && [ "${RA}" = while read line; do - NAME=`echo $line | cut --fields=1 --delimiter=" "` - DIR=`echo $line | cut --fields=2 --delimiter=" "` - URL=`echo $line | cut --fields=3 --delimiter=" "` - TYPE=`echo $line | cut --fields=4 --delimiter=" "` - ENABLED=`echo $line | cut --fields=5 --delimiter=" "` - PARENTDIR=`echo $line | cut --fields=6 --delimiter=" "` + NAME=`echo $line | cut -f 1 -d " "` + DIR=`echo $line | cut -f 2 -d " "` + URL=`echo $line | cut -f 3 -d " "` + TYPE=`echo $line | cut -f 4 -d " "` + ENABLED=`echo $line | cut -f 5 -d " "` + PARENTDIR=`echo $line | cut -f 6 -d " "` if [ ! -z "$TASK" ]; then if [ "${TASK}" != "${NAME}" ]; then @@ -653,32 +653,32 @@ if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] && [ "${RA}" = ARGS="" - TEMP=`echo $line | cut --fields=9 --delimiter=" "` + TEMP=`echo $line | cut -f 9 -d " "` if [ -n ${TEMP} ]; then ARGS="${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=10 --delimiter=" "` + TEMP=`echo $line | cut -f 10 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=11 --delimiter=" "` + TEMP=`echo $line | cut -f 11 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=12 --delimiter=" "` + TEMP=`echo $line | cut -f 12 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=13 --delimiter=" "` + TEMP=`echo $line | cut -f 13 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi TEMP="" - TEMP=`echo $line | cut --fields=14 --delimiter=" "` + TEMP=`echo $line | cut -f 14 -d " "` if [ -n ${TEMP} ]; then ARGS="${ARGS} ${TEMP}" fi From 9f0b9ed145d2fb4aa189948fbf129683ee7f4209 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 12:44:19 -0700 Subject: [PATCH 24/30] Don't link to $THEOS (buildbot's theos has been fixed) --- libretro-buildbot-recipe.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 6a204731..3bb2be1b 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -896,7 +896,6 @@ if [ "${PLATFORM}" = "theos_ios" ] && [ "${RA}" = "YES" ]; then rm RetroArch.app -rf rm -rfv *.deb - ln -s $THEOS theos export PRODUCT_NAME=RetroArch $MAKE clean $MAKE -j8 From 38e9cd8e8e9f75879f7a3aaa99c2029adf2657b8 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 12:58:04 -0700 Subject: [PATCH 25/30] Diff reduction (almost 100% whitespace) --- libretro-buildbot-recipe.sh | 5 ---- libretro-buildbot-task.sh | 52 +++++-------------------------------- 2 files changed, 6 insertions(+), 51 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 3bb2be1b..7960f16d 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -164,7 +164,6 @@ reset_compiler_targets() { } - cd "${BASE_DIR}" ####build commands @@ -180,7 +179,6 @@ buildbot_log() { build_libretro_generic_makefile() { - NAME=$1 DIR=$2 SUBDIR=$3 @@ -638,7 +636,6 @@ while read line; do echo BUILDBOT JOB: $jobid $NAME already up-to-date... fi echo - fi cd "${BASE_DIR}" @@ -784,9 +781,7 @@ if [ "${PLATFORM}" = "android" ] && [ "${RA}" = "YES" ]; then echo $MESSAGE fi buildbot_log "$MESSAGE" - fi - fi if [ "${PLATFORM}" = "theos_ios" ] && [ "${RA}" = "YES" ]; then diff --git a/libretro-buildbot-task.sh b/libretro-buildbot-task.sh index ce1bfeeb..5f9fdfa6 100755 --- a/libretro-buildbot-task.sh +++ b/libretro-buildbot-task.sh @@ -14,7 +14,7 @@ ####environment configuration: echo "BUILDBOT JOB: Setting up Environment for $1" -echo +echo ORIGPATH=$PATH WORK=$PWD @@ -28,7 +28,6 @@ while read line; do if [ "${KEY}" = "PATH" ]; then export PATH=${VALUE}:${ORIGPATH} echo New PATH: $PATH - else export ${KEY}=${VALUE} echo $KEY: $VALUE @@ -37,7 +36,7 @@ done < $1.conf echo echo -. ./libretro-config.sh +. $WORK/libretro-config.sh echo [[ "${ARM_NEON}" ]] && echo 'ARM NEON opts enabled...' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-neon" @@ -74,7 +73,6 @@ fi mkdir -v -p "$RARCH_DIST_DIR" if [ "${PLATFORM}" = "android" ]; then - IFS=' ' read -ra ABIS <<< "$TARGET_ABIS" for a in "${ABIS[@]}"; do echo $a @@ -171,7 +169,6 @@ reset_compiler_targets() { } - cd "${BASE_DIR}" ####build commands @@ -179,13 +176,10 @@ buildbot_log() { HASH=`echo -n "$1" | openssl sha1 -hmac $SIG | cut -f 2 -d " "` curl --data "message=$1&sign=$HASH" $LOGURL - - } build_libretro_generic_makefile() { - NAME=$1 DIR=$2 SUBDIR=$3 @@ -201,8 +195,6 @@ build_libretro_generic_makefile() { JOBS=1 fi - - if [ -z "${NOCLEAN}" ]; then echo "cleaning up..." echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" @@ -237,11 +229,9 @@ build_libretro_generic_makefile() { echo BUILDBOT JOB: $MESSAGE buildbot_log "$MESSAGE" JOBS=$OLDJ - } build_libretro_generic_theos() { - echo PARAMETERS: DIR $2, SUBDIR: $3, MAKEFILE: $4 NAME=$1 @@ -254,9 +244,6 @@ build_libretro_generic_theos() { cd $DIR cd $SUBDIR - ln -s $THEOS theos - - if [ -z "${NOCLEAN}" ]; then echo "cleaning up..." echo "cleanup command: ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" @@ -285,11 +272,9 @@ build_libretro_generic_theos() { fi echo BUILDBOT JOB: $MESSAGE buildbot_log "$MESSAGE" - } build_libretro_generic_jni() { - echo PARAMETERS: DIR $2, SUBDIR: $3 NAME=$1 @@ -313,7 +298,7 @@ build_libretro_generic_jni() { fi fi - echo "compiling for ${a}..." + echo "compiling for ${a}..." if [ -z "${ARGS}" ]; then echo "build command: ${NDK} -j${JOBS} APP_ABI=${a}" ${NDK} -j${JOBS} APP_ABI=${a} @@ -332,13 +317,9 @@ build_libretro_generic_jni() { buildbot_log "$MESSAGE" fi done - - - } build_libretro_bsnes_jni() { - echo PARAMETERS: DIR $2, SUBDIR: $3 NAME=$1 @@ -380,14 +361,12 @@ build_libretro_bsnes_jni() { fi echo BUILDBOT JOB: $MESSAGE buildbot_log "$MESSAGE" - done } build_libretro_generic_gl_makefile() { - NAME=$1 DIR=$2 SUBDIR=$3 @@ -395,7 +374,6 @@ build_libretro_generic_gl_makefile() { PLATFORM=$5 ARGS=$6 - check_opengl cd $DIR @@ -431,14 +409,11 @@ build_libretro_generic_gl_makefile() { buildbot_log "$MESSAGE" reset_compiler_targets - - } build_libretro_bsnes() { - NAME=$1 DIR=$2 PROFILE=$3 @@ -446,22 +421,18 @@ build_libretro_bsnes() { PLATFORM=$5 BSNESCOMPILER=$6 - cd $DIR - if [ -z "${NOCLEAN}" ]; then echo "cleaning up..." rm -f obj/*.{o,"${FORMAT_EXT}"} rm -f out/*.{o,"${FORMAT_EXT}"} - if [ "${PROFILE}" = "cpp98" -o "${PROFILE}" = "bnes" ]; then ${MAKE} clean fi - if [ $? -eq 0 ]; then echo BUILDBOT JOB: $jobid $1 cleanup success! else @@ -471,7 +442,6 @@ build_libretro_bsnes() { echo "compiling..." - if [ "${PROFILE}" = "cpp98" ]; then ${MAKE} platform="${PLATFORM}" ${COMPILER} "-j${JOBS}" elif [ "${PROFILE}" = "bnes" ]; then @@ -496,7 +466,6 @@ build_libretro_bsnes() { fi echo BUILDBOT JOB: $MESSAGE buildbot_log "$MESSAGE" - } #fetch a project and mark it for building if there have been any changes @@ -515,7 +484,6 @@ fi echo echo while read line; do - NAME=`echo $line | cut -f 1 -d " "` DIR=`echo $line | cut -f 2 -d " "` URL=`echo $line | cut -f 3 -d " "` @@ -525,14 +493,12 @@ while read line; do MAKEFILE=`echo $line | cut -f 7 -d " "` SUBDIR=`echo $line | cut -f 8 -d " "` - if [ ! -z "$TASK" ]; then if [ "${TASK}" != "${NAME}" ]; then continue fi fi - if [ "${ENABLED}" = "YES" ]; then echo "BUILDBOT JOB: $jobid Processing $NAME" echo @@ -545,7 +511,6 @@ while read line; do echo SUBDIR: $SUBDIR DIR=$3 - ARGS="" TEMP=`echo $line | cut -f 9 -d " "` @@ -605,13 +570,11 @@ while read line; do echo BUILDBOT JOB: $jobid $NAME already up-to-date... fi echo - fi cd "${BASE_DIR}" PREVCORE=$NAME PREVBUILD=$BUILD - done < $1 echo @@ -626,9 +589,7 @@ if [ ! -z "$TASK" ]; then fi if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] && [ "${RA}" = "YES" ]; then - while read line; do - NAME=`echo $line | cut -f 1 -d " "` DIR=`echo $line | cut -f 2 -d " "` URL=`echo $line | cut -f 3 -d " "` @@ -689,9 +650,10 @@ if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] && [ "${RA}" = fi - echo - echo + echo + echo done < $1.ra + if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then cd $3 @@ -757,9 +719,7 @@ if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] && [ "${RA}" = echo $MESSAGE buildbot_log "$MESSAGE" fi - fi - fi PATH=$ORIGPATH From 4622f367980e8f5f9dc994e7c2db3894148e403d Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 14:16:07 -0700 Subject: [PATCH 26/30] Add a note about the lutro games (they're assets) --- rules.d/core-rules.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rules.d/core-rules.sh b/rules.d/core-rules.sh index 75ebbf6e..d894749e 100644 --- a/rules.d/core-rules.sh +++ b/rules.d/core-rules.sh @@ -319,6 +319,9 @@ libretro_lutro_name="Lutro" libretro_lutro_git_url="https://github.com/libretro/libretro-lutro.git" libretro_lutro_build_makefile="Makefile" +## TODO: The lutro modules here aren't really "cores", they're assets +## Figure out where to put them and what to do with them. + register_core "lutro_platformer" none libretro_lutro_platformer_name="Lutro-Platformer" libretro_lutro_platformer_git_url="https://github.com/libretro/lutro-platformer.git" From 9f34eee067d8fecfb25c494621d2944ba962e086 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 14:16:45 -0700 Subject: [PATCH 27/30] Theos has been diff reduced with minimum ugliness --- libretro-build-ios-theos.sh | 176 +++++++++++++++++------------------- libretro-build.sh | 157 +++++++++++++++++--------------- 2 files changed, 171 insertions(+), 162 deletions(-) diff --git a/libretro-build-ios-theos.sh b/libretro-build-ios-theos.sh index 94f94e06..58a9fb80 100755 --- a/libretro-build-ios-theos.sh +++ b/libretro-build-ios-theos.sh @@ -90,6 +90,90 @@ echo "STRIP = $STRIP" . "$BASE_DIR/libretro-build-common.sh" +build_default_cores() { + + # These build everywhere libretro-build.sh works + # (They also use rules builds, which will help later) + + libretro_build_core 2048 + libretro_build_core 3dengine + libretro_build_core 4do + libretro_build_core bluemsx + libretro_build_core catsfc + libretro_build_core desmume + libretro_build_core dosbox + libretro_build_core fb_alpha + libretro_build_core fceumm + libretro_build_core fmsx + libretro_build_core gambatte + libretro_build_core gpsp + libretro_build_core handy + libretro_build_core meteor + libretro_build_core nestopia + libretro_build_core nxengine + libretro_build_core o2em + libretro_build_core prboom + libretro_build_core prosystem + libretro_build_core quicknes + libretro_build_core snes9x + libretro_build_core snes9x_next + libretro_build_core stella + libretro_build_core tgbdual + libretro_build_core tyrquake + libretro_build_core vba_next + libretro_build_core vbam + libretro_build_core vecx + libretro_build_core virtualjaguar + + # Nothing past here supports theos + [ "$platform" = "theos_ios" ] && return + + libretro_build_core dinothawr + libretro_build_core fuse + libretro_build_core genesis_plus_gx + libretro_build_core gw + libretro_build_core hatari + libretro_build_core lutro + libretro_build_core mame078 + libretro_build_core mednafen_gba + libretro_build_core mednafen_lynx + libretro_build_core mednafen_ngp + libretro_build_core mednafen_pce_fast + libretro_build_core mednafen_pcfx + libretro_build_core mednafen_psx + libretro_build_core mednafen_snes + libretro_build_core mednafen_supergrafx + libretro_build_core mednafen_vb + libretro_build_core mednafen_wswan + libretro_build_core picodrive + libretro_build_core scummvm + libretro_build_core stonesoup + libretro_build_core yabause + + build_libretro_bsnes + build_libretro_bsnes_cplusplus98 + build_libretro_bsnes_mercury + build_libretro_emux + build_libretro_mame_prerule + build_libretro_mupen64 + + if [ $platform != "win" ]; then + libretro_build_core pcsx_rearmed + fi + if [ "$platform" = "ios" ]; then + build_libretro_pcsx_rearmed_interpreter # for non-jailbreak + fi + + if [ $platform != "ios" ]; then + libretro_build_core ffmpeg + libretro_build_core ppsspp + + build_libretro_bnes + fi + + build_libretro_test +} + mkdir -p "$RARCH_DIST_DIR" if [ -n "$SKIP_UNCHANGED" ]; then @@ -113,96 +197,6 @@ if [ -n "$1" ]; then shift done else - libretro_build_core 2048 - libretro_build_core 4do - libretro_build_core bluemsx - libretro_build_core fmsx - if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then - build_libretro_bsnes_cplusplus98 - build_libretro_bsnes - build_libretro_bsnes_mercury - libretro_build_core mednafen_lynx - libretro_build_core mednafen_gba - libretro_build_core mednafen_ngp - libretro_build_core mednafen_pce_fast - libretro_build_core mednafen_supergrafx - libretro_build_core mednafen_pcfx - libretro_build_core mednafen_vb - libretro_build_core mednafen_wswan - libretro_build_core mednafen_psx - libretro_build_core mednafen_snes - fi - libretro_build_core catsfc - libretro_build_core snes9x - libretro_build_core snes9x_next - if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then - libretro_build_core genesis_plus_gx - fi - libretro_build_core fb_alpha - libretro_build_core vbam - libretro_build_core vba_next - libretro_build_core fceumm - libretro_build_core gambatte - libretro_build_core meteor - libretro_build_core nxengine - libretro_build_core prboom - libretro_build_core stella - libretro_build_core quicknes - libretro_build_core nestopia - libretro_build_core tyrquake - if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then - libretro_build_core mame078 - build_libretro_mame_prerule - fi - libretro_build_core dosbox - if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then - libretro_build_core scummvm - libretro_build_core picodrive - fi - libretro_build_core handy - libretro_build_core desmume - if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then - if [ $FORMAT_COMPILER_TARGET != "win" ]; then - libretro_build_core pcsx_rearmed - fi - if [ $FORMAT_COMPILER_TARGET = "ios" ]; then - # For self-signed iOS (without jailbreak) - build_libretro_pcsx_rearmed_interpreter - fi - libretro_build_core yabause - fi - libretro_build_core vecx - libretro_build_core tgbdual - libretro_build_core prosystem - if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then - libretro_build_core dinothawr - fi - libretro_build_core virtualjaguar - if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then - build_libretro_mupen64 - fi - libretro_build_core 3dengine - if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then - if [ $FORMAT_COMPILER_TARGET != "ios" ]; then - # These don't currently build on iOS - build_libretro_bnes - libretro_build_core ffmpeg - libretro_build_core ppsspp - fi - fi - libretro_build_core o2em - if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then - libretro_build_core hatari - fi - libretro_build_core gpsp - if [ $FORMAT_COMPILER_TARGET != "theos_ios" ]; then - build_libretro_emux - libretro_build_core fuse - libretro_build_core stonesoup - libretro_build_core gw - libretro_build_core lutro - - build_libretro_test - fi + build_default_cores fi build_summary diff --git a/libretro-build.sh b/libretro-build.sh index 38c3e2b7..eea037d3 100755 --- a/libretro-build.sh +++ b/libretro-build.sh @@ -88,6 +88,91 @@ echo "STRIP = $STRIP" . "$BASE_DIR/libretro-build-common.sh" +build_default_cores() { + + # These build everywhere libretro-build.sh works + # (They also use rules builds, which will help later) + + libretro_build_core 2048 + libretro_build_core 3dengine + libretro_build_core 4do + libretro_build_core bluemsx + libretro_build_core catsfc + libretro_build_core desmume + libretro_build_core dosbox + libretro_build_core fb_alpha + libretro_build_core fceumm + libretro_build_core fmsx + libretro_build_core gambatte + libretro_build_core gpsp + libretro_build_core handy + libretro_build_core meteor + libretro_build_core nestopia + libretro_build_core nxengine + libretro_build_core o2em + libretro_build_core prboom + libretro_build_core prosystem + libretro_build_core quicknes + libretro_build_core snes9x + libretro_build_core snes9x_next + libretro_build_core stella + libretro_build_core tgbdual + libretro_build_core tyrquake + libretro_build_core vba_next + libretro_build_core vbam + libretro_build_core vecx + libretro_build_core virtualjaguar + + # Nothing past here supports theos + [ "$platform" = "theos_ios" ] && return + + libretro_build_core dinothawr + libretro_build_core fuse + libretro_build_core genesis_plus_gx + libretro_build_core gw + libretro_build_core hatari + libretro_build_core lutro + libretro_build_core mame078 + libretro_build_core mednafen_gba + libretro_build_core mednafen_lynx + libretro_build_core mednafen_ngp + libretro_build_core mednafen_pce_fast + libretro_build_core mednafen_pcfx + libretro_build_core mednafen_psx + libretro_build_core mednafen_snes + libretro_build_core mednafen_supergrafx + libretro_build_core mednafen_vb + libretro_build_core mednafen_wswan + libretro_build_core picodrive + libretro_build_core scummvm + libretro_build_core stonesoup + libretro_build_core yabause + + build_libretro_bsnes + build_libretro_bsnes_cplusplus98 + build_libretro_bsnes_mercury + build_libretro_emux + build_libretro_mame_prerule + build_libretro_mupen64 + + if [ $platform != "win" ]; then + libretro_build_core pcsx_rearmed + fi + if [ "$platform" = "ios" ]; then + build_libretro_pcsx_rearmed_interpreter # for non-jailbreak + fi + + if [ $platform != "ios" ]; then + libretro_build_core ffmpeg + libretro_build_core ppsspp + + build_libretro_bnes + fi + + build_libretro_test +} + + mkdir -p "$RARCH_DIST_DIR" if [ -n "$SKIP_UNCHANGED" ]; then @@ -111,76 +196,6 @@ if [ -n "$1" ]; then shift done else - libretro_build_core 2048 - libretro_build_core 4do - libretro_build_core bluemsx - libretro_build_core fmsx - build_libretro_bsnes_cplusplus98 - build_libretro_bsnes - build_libretro_bsnes_mercury - libretro_build_core mednafen_lynx - libretro_build_core mednafen_gba - libretro_build_core mednafen_ngp - libretro_build_core mednafen_pce_fast - libretro_build_core mednafen_supergrafx - libretro_build_core mednafen_pcfx - libretro_build_core mednafen_vb - libretro_build_core mednafen_wswan - libretro_build_core mednafen_psx - libretro_build_core mednafen_snes - libretro_build_core catsfc - libretro_build_core snes9x - libretro_build_core snes9x_next - libretro_build_core genesis_plus_gx - libretro_build_core fb_alpha - libretro_build_core vbam - libretro_build_core vba_next - libretro_build_core fceumm - libretro_build_core gambatte - libretro_build_core meteor - libretro_build_core nxengine - libretro_build_core prboom - libretro_build_core stella - libretro_build_core quicknes - libretro_build_core nestopia - libretro_build_core tyrquake - libretro_build_core mame078 - build_libretro_mame_prerule - libretro_build_core dosbox - libretro_build_core scummvm - libretro_build_core picodrive - libretro_build_core handy - libretro_build_core desmume - if [ $FORMAT_COMPILER_TARGET != "win" ]; then - libretro_build_core pcsx_rearmed - fi - if [ $FORMAT_COMPILER_TARGET = "ios" ]; then - # For self-signed iOS (without jailbreak) - build_libretro_pcsx_rearmed_interpreter - fi - libretro_build_core yabause - libretro_build_core vecx - libretro_build_core tgbdual - libretro_build_core prosystem - libretro_build_core dinothawr - libretro_build_core virtualjaguar - build_libretro_mupen64 - libretro_build_core 3dengine - if [ $FORMAT_COMPILER_TARGET != "ios" ]; then - # These don't currently build on iOS - build_libretro_bnes - libretro_build_core ffmpeg - libretro_build_core ppsspp - fi - libretro_build_core o2em - libretro_build_core hatari - libretro_build_core gpsp - build_libretro_emux - libretro_build_core fuse - libretro_build_core stonesoup - libretro_build_core gw - libretro_build_core lutro - - build_libretro_test + build_default_cores fi build_summary From 5a53b0e9e31615c593eb02c5ab4586ad0b46898e Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Tue, 10 Mar 2015 14:18:19 -0700 Subject: [PATCH 28/30] Stubify libretro-build-ios-theos.sh --- libretro-build-ios-theos.sh | 187 +----------------------------------- 1 file changed, 2 insertions(+), 185 deletions(-) diff --git a/libretro-build-ios-theos.sh b/libretro-build-ios-theos.sh index 58a9fb80..9c2d8299 100755 --- a/libretro-build-ios-theos.sh +++ b/libretro-build-ios-theos.sh @@ -1,8 +1,6 @@ #! /usr/bin/env bash # vim: set ts=3 sw=3 noet ft=sh : bash -platform=theos_ios - SCRIPT="${0#./}" BASE_DIR="${SCRIPT%/*}" WORKDIR="$PWD" @@ -16,187 +14,6 @@ else fi fi -. "$BASE_DIR/libretro-config.sh" +# The theos build rules have all been moved to libretro-build.sh -if [ -z "$RARCH_DIST_DIR" ]; then - RARCH_DIR="$WORKDIR/dist" - RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" -fi - -if [ -z "$JOBS" ]; then - JOBS=7 -fi - -if [ "$HOST_CC" ]; then - CC="${HOST_CC}-gcc" - CXX="${HOST_CC}-g++" - CXX11="${HOST_CC}-g++" - STRIP="${HOST_CC}-strip" -fi - -if [ -z "$MAKE" ]; then - if uname -s | grep -i MINGW32 > /dev/null 2>&1; then - MAKE=mingw32-make - else - if type gmake > /dev/null 2>&1; then - MAKE=gmake - else - MAKE=make - fi - fi -fi - -if [ -z "$CC" ]; then - if [ $FORMAT_COMPILER_TARGET = "osx" ]; then - CC=cc - elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then - CC=mingw32-gcc - else - CC=gcc - fi -fi - -if [ -z "$CXX" ]; then - if [ $FORMAT_COMPILER_TARGET = "osx" ]; then - CXX=c++ - CXX11="clang++ -std=c++11 -stdlib=libc++" - # FIXME: Do this right later. - if [ "$ARCH" = "i386" ]; then - CC="cc -arch i386" - CXX="c++ -arch i386" - CXX11="clang++ -arch i386 -std=c++11 -stdlib=libc++" - fi - elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then - CXX=mingw32-g++ - CXX11=mingw32-g++ - else - CXX=g++ - CXX11=g++ - fi -fi - -FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET - - -if [ "$FORMAT_COMPILER_TARGET" = "ios" ]; then - echo "iOS path: ${IOSSDK}" - echo "iOS version: ${IOSVER}" -fi -echo "CC = $CC" -echo "CXX = $CXX" -echo "CXX11 = $CXX11" -echo "STRIP = $STRIP" - - -. "$BASE_DIR/libretro-build-common.sh" - -build_default_cores() { - - # These build everywhere libretro-build.sh works - # (They also use rules builds, which will help later) - - libretro_build_core 2048 - libretro_build_core 3dengine - libretro_build_core 4do - libretro_build_core bluemsx - libretro_build_core catsfc - libretro_build_core desmume - libretro_build_core dosbox - libretro_build_core fb_alpha - libretro_build_core fceumm - libretro_build_core fmsx - libretro_build_core gambatte - libretro_build_core gpsp - libretro_build_core handy - libretro_build_core meteor - libretro_build_core nestopia - libretro_build_core nxengine - libretro_build_core o2em - libretro_build_core prboom - libretro_build_core prosystem - libretro_build_core quicknes - libretro_build_core snes9x - libretro_build_core snes9x_next - libretro_build_core stella - libretro_build_core tgbdual - libretro_build_core tyrquake - libretro_build_core vba_next - libretro_build_core vbam - libretro_build_core vecx - libretro_build_core virtualjaguar - - # Nothing past here supports theos - [ "$platform" = "theos_ios" ] && return - - libretro_build_core dinothawr - libretro_build_core fuse - libretro_build_core genesis_plus_gx - libretro_build_core gw - libretro_build_core hatari - libretro_build_core lutro - libretro_build_core mame078 - libretro_build_core mednafen_gba - libretro_build_core mednafen_lynx - libretro_build_core mednafen_ngp - libretro_build_core mednafen_pce_fast - libretro_build_core mednafen_pcfx - libretro_build_core mednafen_psx - libretro_build_core mednafen_snes - libretro_build_core mednafen_supergrafx - libretro_build_core mednafen_vb - libretro_build_core mednafen_wswan - libretro_build_core picodrive - libretro_build_core scummvm - libretro_build_core stonesoup - libretro_build_core yabause - - build_libretro_bsnes - build_libretro_bsnes_cplusplus98 - build_libretro_bsnes_mercury - build_libretro_emux - build_libretro_mame_prerule - build_libretro_mupen64 - - if [ $platform != "win" ]; then - libretro_build_core pcsx_rearmed - fi - if [ "$platform" = "ios" ]; then - build_libretro_pcsx_rearmed_interpreter # for non-jailbreak - fi - - if [ $platform != "ios" ]; then - libretro_build_core ffmpeg - libretro_build_core ppsspp - - build_libretro_bnes - fi - - build_libretro_test -} - -mkdir -p "$RARCH_DIST_DIR" - -if [ -n "$SKIP_UNCHANGED" ]; then - [ -z "$BUILD_REVISIONS_DIR" ] && BUILD_REVISIONS_DIR="$WORKDIR/build-revisions" - echo "mkdir -p \"$BUILD_REVISIONS_DIR\"" - mkdir -p "$BUILD_REVISIONS_DIR" -fi - -if [ -n "$1" ]; then - while [ -n "$1" ]; do - case "$1" in - build_libretro_*) - # "Old"-style - $1 - ;; - *) - # New style (just generic cores for now) - libretro_build_core $1 - ;; - esac - shift - done -else - build_default_cores -fi -build_summary +platform=theos_ios ${BASE_DIR}/libretro-build.sh $@ From b8194ce1d1ee10ff1d159100df1d50feda3ac0a0 Mon Sep 17 00:00:00 2001 From: Radius Date: Tue, 10 Mar 2015 19:20:56 -0500 Subject: [PATCH 29/30] fix psp build --- libretro-buildbot-recipe.sh | 6 ++++-- recipes/psp/devkitpsp | 14 +++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 7960f16d..2a8d1c07 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -1232,9 +1232,11 @@ if [ "${PLATFORM}" = "psp1" ] && [ "${RA}" = "YES" ]; then MESSAGE="retroarch build failed ($jobid)" echo $MESSAGE fi - + buildbot_log "$MESSAGE" + echo "Packaging" echo ============================================ + cd $WORK/$RADIR cp retroarch.cfg retroarch.default.cfg mkdir -p psp1/pkg/ @@ -1360,7 +1362,7 @@ if [ "${PLATFORM}" == "wii" ] && [ "${RA}" == "YES" ]; then echo $MESSAGE fi buildbot_log "$MESSAGE" - cd .. + cd $WORK/$RADIR fi echo "Packaging" diff --git a/recipes/psp/devkitpsp b/recipes/psp/devkitpsp index a455b3e0..f57e3dfb 100644 --- a/recipes/psp/devkitpsp +++ b/recipes/psp/devkitpsp @@ -1,8 +1,8 @@ -gambatte libretro-gambatte https://github.com/libretro/gambatte-libretro.git PROJECT YES GENERIC Makefile.libretro libgambatte -fceumm libretro-fceuumm https://github.com/libretro/libretro-fceumm.git PROJECT YES GENERIC Makefile.libretro . -nxengine libretro-nxengine https://github.com/libretro/nxengine-libretro.git PROJECT YES GENERIC Makefile . -fmsx libretro-fmsx https://github.com/libretro/fmsx-libretro.git PROJECT YES GENERIC Makefile . -prboom libretro-prboom https://github.com/libretro/libretro-prboom.git PROJECT YES GENERIC Makefile . -tempgba libretro-tempgba https://github.com/libretro/TempGBA-libretro.git PROJECT YES GENERIC Makefile . -mednafen_pce_fast libretro-mednafen_pce_fast https://github.com/aliaspider/beetle-pce-fast-libretro.git psp_hw_render YES GENERIC Makefile . +gambatte libretro-gambatte https://github.com/libretro/gambatte-libretro.git PROJECT NO GENERIC Makefile.libretro libgambatte +fceumm libretro-fceuumm https://github.com/libretro/libretro-fceumm.git PROJECT NO GENERIC Makefile.libretro . +nxengine libretro-nxengine https://github.com/libretro/nxengine-libretro.git PROJECT NO GENERIC Makefile . +fmsx libretro-fmsx https://github.com/libretro/fmsx-libretro.git PROJECT NO GENERIC Makefile . +prboom libretro-prboom https://github.com/libretro/libretro-prboom.git PROJECT NO GENERIC Makefile . +tempgba libretro-tempgba https://github.com/libretro/TempGBA-libretro.git PROJECT NO GENERIC Makefile . +mednafen_pce_fast libretro-mednafen_pce_fast https://github.com/aliaspider/beetle-pce-fast-libretro.git psp_hw_render NO GENERIC Makefile . From c7b6067e2ec31427f8c0c9d2e4da4ac4e6045749 Mon Sep 17 00:00:00 2001 From: radius Date: Tue, 10 Mar 2015 22:30:04 -0400 Subject: [PATCH 30/30] afix mame078 build --- recipes/recipes-ndk-standalone-armv7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/recipes-ndk-standalone-armv7 b/recipes/recipes-ndk-standalone-armv7 index 8a6f72ee..5795a486 100644 --- a/recipes/recipes-ndk-standalone-armv7 +++ b/recipes/recipes-ndk-standalone-armv7 @@ -1,3 +1,3 @@ -mame078 libretro-mame078 https://github.com/libretro/mame2003-libretro.git PROJECT YES GENERIC makefile . +mame078 libretro-mame078 https://github.com/libretro/mame2003-libretro.git PROJECT YES GENERIC Makefile . scummvm libretro-scummvm https://github.com/libretro/scummvm.git PROJECT YES GENERIC Makefile backends/platform/libretro/build