Skip to content

Commit

Permalink
Merge pull request libretro#1070 from libretro/revert-1066-master
Browse files Browse the repository at this point in the history
Revert "Android updates"
  • Loading branch information
inactive123 authored Jun 27, 2019
2 parents 504cb01 + da5244a commit c360ec2
Show file tree
Hide file tree
Showing 26 changed files with 185 additions and 144 deletions.
124 changes: 38 additions & 86 deletions libretro-buildbot-recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,19 +373,22 @@ build_libretro_generic_makefile() {

echo '--------------------------------------------------' | tee -a "$LOGFILE"
if [ "${COMMAND}" = "CMAKE" ]; then
case "${platform}" in
msvc2017_desktop_x86 ) EXTRAARGS="-G\"Visual Studio 15 2017\"" ;;
msvc2017_desktop_x64 ) EXTRAARGS="-G\"Visual Studio 15 2017 Win64\"" ;;
msvc2010_x86 ) EXTRAARGS="-G\"Visual Studio 10 2010\"" ;;
msvc2010_x64 ) EXTRAARGS="-G\"Visual Studio 10 2010 Win64\"" ;;
msvc2005_x86 ) EXTRAARGS="-G\"Visual Studio 8 2005\"" ;;
msvc2005_x64 ) EXTRAARGS="-G\"Visual Studio 8 2005 Win64\"" ;;
msvc2003_x86 ) EXTRAARGS="-G\"Visual Studio 7\"" ;;
android ) EXTRAARGS="-DANDROID_PLATFORM=android-${API_LEVEL} \
-DANDROID_ABI=${ABI_OVERRIDE} \
-DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake" ;;
* ) EXTRAARGS="" ;;
esac
if [ "${PLATFORM}" = "android" ]; then
EXTRAARGS="-DANDROID_PLATFORM=android-${API_LEVEL} \
-DANDROID_ABI=${ABI_OVERRIDE} \
-DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake"
else
case "${platform}" in
msvc2017_desktop_x86 ) EXTRAARGS="-G\"Visual Studio 15 2017\"" ;;
msvc2017_desktop_x64 ) EXTRAARGS="-G\"Visual Studio 15 2017 Win64\"" ;;
msvc2010_x86 ) EXTRAARGS="-G\"Visual Studio 10 2010\"" ;;
msvc2010_x64 ) EXTRAARGS="-G\"Visual Studio 10 2010 Win64\"" ;;
msvc2005_x86 ) EXTRAARGS="-G\"Visual Studio 8 2005\"" ;;
msvc2005_x64 ) EXTRAARGS="-G\"Visual Studio 8 2005 Win64\"" ;;
msvc2003_x86 ) EXTRAARGS="-G\"Visual Studio 7\"" ;;
* ) EXTRAARGS="" ;;
esac
fi

JOBS_FLAG=-j
if [ "${MAKEFILE}" = "sln" ]; then
Expand Down Expand Up @@ -440,71 +443,6 @@ build_libretro_generic_makefile() {
ENTRY_ID=""
}

build_libretro_android_cmake() {
NAME="$1"
DIR="$2"
SUBDIR="$3"
MAKEFILE="$4"
PLATFORM="$5"
ARGS="$6"

JOBS_FLAG=-j
EXTRAARGS="-DANDROID_PLATFORM=android-${API_LEVEL} -DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_STL=c++_static"

if [ -n "NDK_CCACHE" ]; then
EXTRAARGS="$EXTRAARGS -DCMAKE_C_COMPILER_LAUNCHER=${NDK_CCACHE} -DCMAKE_CXX_COMPILER_LAUNCHER=${NDK_CCACHE}"
fi

ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="$NAME" http://buildbot.fiveforty.net/build_entry/`
fi

cd ${DIR}
mkdir -p ${SUBDIR}
cd ${SUBDIR}

CORENAM="${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}"

LOGFILE="$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log"
echo '--------------------------------------------------' | tee "$LOGFILE"
cat $TMPDIR/vars | tee -a "$LOGFILE"

echo '--------------------------------------------------' | tee -a "$LOGFILE"
RET=0
for ABI in ${TARGET_ABIS}; do
rm -rf ${ABI}
mkdir ${ABI}
pushd ${ABI}

eval "set -- ${EXTRAARGS} \${ARGS} -DCMAKE_VERBOSE_MAKEFILE=OFF -DANDROID_ABI=${ABI}"
echo "BUILD CMD: ${CMAKE} $*" 2>&1 | tee -a "$LOGFILE"
echo "$@" ../.. | xargs ${CMAKE} 2>&1 | tee -a "$LOGFILE"

echo "BUILD CMD: ${CMAKE} --build . --target ${NAME}_libretro --config Release -- ${JOBS_FLAG}${JOBS}" 2>&1 | tee -a "$LOGFILE"
${CMAKE} --build . --target ${NAME}_libretro --config Release -- ${JOBS_FLAG}${JOBS} 2>&1 | tee -a "$LOGFILE"

COREPATH=$(find . -type f -name ${CORENAM})
if [ -n "${COREPATH}" ]; then
echo "COPY CMD: cp ${COREPATH} $RARCH_DIST_DIR/${ABI}/${CORENAM}" 2>&1 | tee -a "$LOGFILE"
cp ${COREPATH} $RARCH_DIST_DIR/${ABI}/${CORENAM} 2>&1 | tee -a "$LOGFILE"

if [ ! -z "${STRIPPATH+x}" ]; then
${NDK_ROOT}/${STRIPPATH} -s $RARCH_DIST_DIR/${ABI}/${CORENAM}
fi
else
echo "${CORENAM} for ${ABI} not found" 2>&1 | tee -a "$LOGFILE"
RET=1
fi

popd
done

buildbot_handle_message "$RET" "$ENTRY_ID" "$NAME" "$jobid" "$LOGFILE"

ENTRY_ID=""
}

build_libretro_generic_jni() {
NAME="$1"
DIR="$2"
Expand Down Expand Up @@ -729,7 +667,6 @@ while read line; do
CORES_BUILT=YES
echo "buildbot job: building $NAME"
case "${COMMAND}" in
ANDROID_CMAKE ) build_libretro_android_cmake $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" ;;
CMAKE|GENERIC|GENERIC_GL )
build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" "${CORES}" ;;
GENERIC_JNI ) build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" "${CORES}" ;;
Expand Down Expand Up @@ -1055,18 +992,33 @@ if [ "${PLATFORM}" = "android" ] && [ "${RA}" = "YES" ]; then
echo "buildbot job: $jobid Building"
echo
cd pkg/android/phoenix$PKG_EXTRA
rm bin/*.apk

cat << EOF > local.properties
sdk.dir=/home/buildbot/tools/android/android-sdk-linux
key.store=/home/buildbot/.android/release.keystore
key.alias=buildbot
key.store.password=buildbot
key.alias.password=buildbot
EOF

git reset --hard
if [ "${RELEASE}" == "NO" ]; then
python ./version_increment.py
fi
./gradlew clean assembleRelease
cp -r build/outputs/apk/normal/release/phoenix-normal-release.apk $RARCH_DIR/retroarch-release.apk | tee -a "$LOGFILE"
cp -r build/outputs/apk/normal/release/phoenix-normal-release.apk $RARCH_DIR/retroarch-release.apk
cp -r build/outputs/apk/aarch64/release/phoenix-aarch64-release.apk $RARCH_DIR/retroarch-aarch64-release.apk | tee -a "$LOGFILE"
cp -r build/outputs/apk/aarch64/release/phoenix-aarch64-release.apk $RARCH_DIR/retroarch-aarch64-release.apk
cp -r build/outputs/apk/ra32/release/phoenix-ra32-release.apk $RARCH_DIR/retroarch-ra32-release.apk | tee -a "$LOGFILE"
cp -r build/outputs/apk/ra32/release/phoenix-ra32-release.apk $RARCH_DIR/retroarch-ra32-release.apk
ant clean | tee -a "$LOGFILE"
android update project --path . --target android-26 | tee -a "$LOGFILE"
android update project --path libs/googleplay --target android-26 | tee -a "$LOGFILE"
android update project --path libs/appcompat --target android-26 | tee -a "$LOGFILE"
TARGET_ABIS=${TARGET_ABIS/arm64-v8a /} ant release | tee -a "$LOGFILE"
if [ -z "$BRANCH" ]; then
cp -r bin/retroarch-release.apk $RARCH_DIR/retroarch-release.apk | tee -a "$LOGFILE"
cp -r bin/retroarch-release.apk $RARCH_DIR/retroarch-release.apk
else
cp -r bin/retroarch-release.apk $RARCH_DIR/retroarch-$BRANCH-release.apk | tee -a "$LOGFILE"
cp -r bin/retroarch-release.apk $RARCH_DIR/retroarch-$BRANCH-release.apk
fi

RET=$?
buildbot_handle_message "$RET" "$ENTRY_ID" "retroarch" "$jobid" "$LOGFILE"
Expand Down
2 changes: 1 addition & 1 deletion libretro-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export BUILD_LIBRETRO_GL=1
#ANDROID DEFINES
#================

export TARGET_ABIS="armeabi-v7a arm64-v8a x86 x86_64"
export TARGET_ABIS="armeabi armeabi-v7a arm64-v8a x86 x86_64"

#uncomment to define NDK standalone toolchain for ARM
#export NDK_ROOT_DIR_ARM =
Expand Down
2 changes: 0 additions & 2 deletions recipes/android/cores-android-aarch64

This file was deleted.

16 changes: 0 additions & 16 deletions recipes/android/cores-android-aarch64.conf

This file was deleted.

1 change: 1 addition & 0 deletions recipes/android/cores-android-armv7-ndk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mame2010 libretro-mame2010 https://github.com/libretro/mame2010-libretro.git master YES GENERIC Makefile . VRENDER=soft PTR64=0 CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ LD=arm-linux-androideabi-g++ platform=android emulator
2 changes: 2 additions & 0 deletions recipes/android/cores-android-armv7-ndk-old-mame
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mame2015 libretro-mame2015o https://github.com/libretro/mame2015-libretro.git master YES GENERIC Makefile . | mame2015:TARGET=mame mess2015:TARGET=mess ume2015:TARGET=ume
mame2016 libretro-mame2016o https://github.com/libretro/mame2016-libretro master YES GENERIC makefile . OSD=retro RETRO=1 NOWERROR=1 NOASM=1 gcc=android-arm gcc_version=4.9 TARGETOS=android-arm CONFIG=libretro NO_USE_MIDI=1 OS=linux VERBOSE=1 verbose=1 OVERRIDE_CC=/home/buildbot/tools/android/android-ndk-r10e/toolchains/llvm-3.5/prebuilt/linux-x86_64/bin/clang OVERRIDE_CXX=/home/buildbot/tools/android/android-ndk-r10e/toolchains/llvm-3.5/prebuilt/linux-x86_64/bin/clang++ TARGET=mame
10 changes: 10 additions & 0 deletions recipes/android/cores-android-armv7-ndk-old-mame.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PATH home/buildbot/tools/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/
ANDROID_NDK_ARM /home/buildbot/tools/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/
ANDROID_NDK_ROOT /home/buildbot/tools/android/android-ndk-r10e/
ANDROID_NDK_LLVM /home/buildbot/tools/android/android-ndk-r10e/toolchains/llvm-3.5/prebuilt/linux-x86_64/
PLATFORM android
platform android
LIBSUFFIX _android
MAKE make
DIST armeabi-v7a
CORE_JOB YES
6 changes: 6 additions & 0 deletions recipes/android/cores-android-armv7-ndk.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PATH /home/buildbot/tools/android/standalone-r13b-api18-arm/bin/
PLATFORM android-armv7
platform android-armv7
LIBSUFFIX _android
MAKE make
CORE_JOB YES
4 changes: 4 additions & 0 deletions recipes/android/cores-android-cmake-aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dolphin libretro-dolphin-aarch64 https://github.com/libretro/dolphin.git master YES CMAKE Makefile build -DLIBRETRO=ON -DANDROID_STL=c++_static -DCMAKE_BUILD_TYPE=Release
ishiiruka libretro-ishiiruka-aarch64 https://github.com/libretro/Ishiiruka.git master YES CMAKE Makefile build -DLIBRETRO=ON -DANDROID_STL=c++_static -DCMAKE_BUILD_TYPE=Release
ppsspp libretro-ppsspp-aarch64 https://github.com/hrydgard/ppsspp.git master YES CMAKE Makefile build -DLIBRETRO=ON -DANDROID_STL=c++_static -DCMAKE_BUILD_TYPE=Release
thepowdertoy libretro-thepowdertoy-aarch64 https://github.com/libretro/ThePowderToy.git master YES CMAKE Makefile build -DANDROID_STL=c++_static -DCMAKE_BUILD_TYPE=Release
16 changes: 16 additions & 0 deletions recipes/android/cores-android-cmake-aarch64.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ANDROID_HOME /home/buildbot/tools/android/android-sdk-linux
NDK_ROOT /home/buildbot/tools/android/android-ndk-r16b/
ANDROID_NDK /home/buildbot/tools/android/android-ndk-r16b/
PATH /home/buildbot/tools/android/android-ndk-r16b:/home/buildbot/tools/android/android-sdk-linux/tools
PLATFORM android
platform android
MAKE make
NDK ndk-build
RA NO
DIST arm64-v8a
LIBSUFFIX _android
CORE_JOB YES
ABI_OVERRIDE arm64-v8a
API_LEVEL 21
CMAKE cmake
STRIPPATH toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip
2 changes: 2 additions & 0 deletions recipes/android/cores-android-cmake-armv7
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ppsspp libretro-ppsspp-armv7 https://github.com/hrydgard/ppsspp.git master YES CMAKE Makefile build -DLIBRETRO=ON -DANDROID_STL=c++_static -DANDROID_ARM_NEON=ON -DANDROID_ARM_MODE=arm -DCMAKE_BUILD_TYPE=Release
thepowdertoy libretro-thepowdertoy-armv7 https://github.com/libretro/ThePowderToy.git master YES CMAKE Makefile build -DANDROID_STL=c++_static -DANDROID_ARM_NEON=ON -DCMAKE_BUILD_TYPE=Release
16 changes: 16 additions & 0 deletions recipes/android/cores-android-cmake-armv7.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ANDROID_HOME /home/buildbot/tools/android/android-sdk-linux
NDK_ROOT /home/buildbot/tools/android/android-ndk-r16b/
ANDROID_NDK /home/buildbot/tools/android/android-ndk-r16b/
PATH /home/buildbot/tools/android/android-ndk-r16b:/home/buildbot/tools/android/android-sdk-linux/tools
PLATFORM android
platform android
MAKE make
NDK ndk-build
RA NO
DIST armeabi-v7a
LIBSUFFIX _android
CORE_JOB YES
ABI_OVERRIDE armeabi-v7a
API_LEVEL 9
CMAKE cmake
STRIPPATH toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip
2 changes: 2 additions & 0 deletions recipes/android/cores-android-cmake-x86
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ppsspp libretro-ppsspp-x86 https://github.com/hrydgard/ppsspp.git master YES CMAKE Makefile build -DLIBRETRO=ON -DANDROID_STL=c++_static -DCMAKE_BUILD_TYPE=Release
thepowdertoy libretro-thepowdertoy-x86 https://github.com/libretro/ThePowderToy.git master YES CMAKE Makefile build -DANDROID_STL=c++_static -DCMAKE_BUILD_TYPE=Release
16 changes: 16 additions & 0 deletions recipes/android/cores-android-cmake-x86.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ANDROID_HOME /home/buildbot/tools/android/android-sdk-linux
NDK_ROOT /home/buildbot/tools/android/android-ndk-r16b/
ANDROID_NDK /home/buildbot/tools/android/android-ndk-r16b/
PATH /home/buildbot/tools/android/android-ndk-r16b:/home/buildbot/tools/android/android-sdk-linux/tools
PLATFORM android
platform android
MAKE make
NDK ndk-build
RA NO
LIBSUFFIX _android
DIST x86
CORE_JOB YES
ABI_OVERRIDE x86
API_LEVEL 9
CMAKE cmake
STRIPPATH toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-strip
5 changes: 5 additions & 0 deletions recipes/android/cores-android-cross
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
81 libretro64-81 https://github.com/libretro/81-libretro.git master YES LEIRADEL Makefile build | 81:armeabi 81:armeabi-v7a 81:arm64-v8a 81:x86
emux libretro64-emux https://github.com/libretro/emux master YES LEIRADEL Makefile libretro | "emux_chip8:armeabi MACHINE=chip8" "emux_chip8:armeabi-v7a MACHINE=chip8" "emux_chip8:arm64-v8a MACHINE=chip8" "emux_chip8:x86 MACHINE=chip8" "emux_gb:armeabi MACHINE=gb" "emux_gb:armeabi-v7a MACHINE=gb" "emux_gb:arm64-v8a MACHINE=gb" "emux_gb:x86 MACHINE=gb" "emux_nes:armeabi MACHINE=nes" "emux_nes:armeabi-v7a MACHINE=nes" "emux_nes:arm64-v8a MACHINE=nes" "emux_nes:x86 MACHINE=nes" "emux_sms:armeabi MACHINE=sms" "emux_sms:armeabi-v7a MACHINE=sms" "emux_sms:arm64-v8a MACHINE=sms" "emux_sms:x86 MACHINE=sms"
fuse libretro64-fuse https://github.com/libretro/fuse-libretro.git master YES LEIRADEL Makefile build | fuse:armeabi fuse:armeabi-v7a fuse:arm64-v8a fuse:x86
gw libretro64-gw https://github.com/libretro/gw-libretro.git master YES LEIRADEL Makefile build | gw:armeabi gw:armeabi-v7a gw:arm64-v8a gw:x86
mgba libretro64-mgba https://github.com/libretro/mgba.git master YES LEIRADEL Makefile libretro-build | mgba:armeabi mgba:armeabi-v7a mgba:arm64-v8a mgba:x86
11 changes: 11 additions & 0 deletions recipes/android/cores-android-cross.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ANDROID_HOME /home/buildbot/tools/android/android-sdk-linux
NDK_ROOT /home/buildbot/tools/android/android-ndk-r13b/
NDK_ROOT_DIR /home/buildbot/tools/android/android-ndk-r13b/
ANDROID_NDK /home/buildbot/tools/android/android-ndk-r13b/
PATH /home/buildbot/tools/android/android-ndk-r13b:/home/buildbot/tools/android/android-sdk/tools
PLATFORM android
platform android
MAKE make
NDK_TOOLCHAIN_VERSION 4.9
LIBSUFFIX _android
CORE_JOB YES
Loading

0 comments on commit c360ec2

Please sign in to comment.