[Android] Add new compile-simple.sh with minimal buildsystem

Jean-Baptiste Kempf git at videolan.org
Thu Feb 5 18:19:08 CET 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Feb  5 18:18:09 2015 +0100| [ac8805c20d56efdf335f6272b861b91e44783403] | committer: Jean-Baptiste Kempf

Add new compile-simple.sh with minimal buildsystem

It just:
 - clones VLC
 - compile libvlc and jni libraries through compile-libvlc.sh

And will bootstrap and compile with gradle

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=ac8805c20d56efdf335f6272b861b91e44783403
---

 compile-libvlc.sh |    8 ++++++--
 compile-simple.sh |   43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index b1d230c..81d5364 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -15,7 +15,6 @@ checkfail()
 #############
 # ARGUMENTS #
 #############
-
 if [ -z "$ANDROID_NDK" ]; then
     echo "Please set the ANDROID_NDK environment variable with its path."
     exit 1
@@ -114,6 +113,11 @@ esac
 
 SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-$PLATFORM_SHORT_ARCH
 SRC_DIR=$PWD
+# Add the NDK toolchain to the PATH, needed both for contribs and for building
+# stub libraries
+NDK_TOOLCHAIN_PATH=`echo ${ANDROID_NDK}/toolchains/${PATH_HOST}-${GCCVER}/prebuilt/\`uname|tr A-Z a-z\`-*/bin`
+export PATH=${NDK_TOOLCHAIN_PATH}:${PATH}
+
 
 ###############
 # DISPLAY ABI #
@@ -128,7 +132,7 @@ fi
 if [ ! -z "$ARMV5" ]; then
 echo "ARMv5:       YES"
 fi
-
+echo "PATH:       $PATH"
 
 # Make in //
 if [ -z "$MAKEFLAGS" ]; then
diff --git a/compile-simple.sh b/compile-simple.sh
new file mode 100755
index 0000000..beba85e
--- /dev/null
+++ b/compile-simple.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+set -e
+
+# Read the Android Wiki http://wiki.videolan.org/AndroidCompile
+# Setup all that stuff correctly.
+# Get the latest Android SDK Platform or modify numbers in configure.sh and libvlc/default.properties.
+
+if [ -z "$ANDROID_NDK" -o -z "$ANDROID_SDK" ]; then
+   echo "You must define ANDROID_NDK, ANDROID_SDK before starting."
+   echo "They must point to your NDK and SDK directories.\n"
+   exit 1
+fi
+
+if [ -z "$ANDROID_ABI" ]; then
+   echo "*** No ANDROID_ABI defined architecture: using ARMv7"
+   ANDROID_ABI="armeabi-v7a"
+fi
+
+# Fetch VLC source
+# 1/ libvlc, libvlccore and its plugins
+TESTED_HASH=18e445a
+if [ ! -d "vlc" ]; then
+    echo "VLC source not found, cloning"
+    git clone git://git.videolan.org/vlc.git vlc
+else
+    echo "VLC source found"
+    cd vlc
+    if ! git cat-file -e ${TESTED_HASH}; then
+        cat << EOF
+***
+*** Error: Your vlc checkout does not contain the latest tested commit: ${TESTED_HASH}
+***
+EOF
+        exit 1
+    fi
+    cd ..
+fi
+
+############
+# Make VLC #
+############
+echo "Configuring"
+./compile-libvlc.sh $*



More information about the Android mailing list