update build scripts to use newer NDK.

This commit is contained in:
Eric House 2012-01-02 18:11:36 -08:00
parent aeb073d4b8
commit d0999d1944
4 changed files with 12 additions and 26 deletions

View file

@ -1,4 +1,4 @@
# -*- mode: Makefile; compile-command: "../../scripts/ndkbuild.sh"; -*- # -*- mode: Makefile; compile-command: "cd ../; ${NDK_ROOT}/ndk-build -j3"; -*-
LOCAL_PATH := $(call my-dir) LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS) include $(CLEAR_VARS)

View file

@ -10,4 +10,4 @@
# Indicates whether an apk should be generated for each density. # Indicates whether an apk should be generated for each density.
split.density=false split.density=false
# Project target. # Project target.
target=android-5 target=android-7

View file

@ -1,5 +1,10 @@
#!/bin/bash #!/bin/bash
set -u -e
TAGNAME=""
FILES=""
usage() { usage() {
echo "Error: $*" echo "Error: $*"
echo "usage: $0 [--tag <name>] [<package-unsigned.apk>]" >&2 echo "usage: $0 [--tag <name>] [<package-unsigned.apk>]" >&2
@ -9,7 +14,6 @@ usage() {
do_build() { do_build() {
WD=$(pwd) WD=$(pwd)
cd $(dirname $0)/../XWords4/ cd $(dirname $0)/../XWords4/
pwd
touch jni/Android.mk touch jni/Android.mk
../scripts/ndkbuild.sh ../scripts/ndkbuild.sh
rm -rf bin/ gen/ rm -rf bin/ gen/
@ -17,7 +21,7 @@ do_build() {
cd $WD cd $WD
} }
while [ -n "$1" ]; do while [ "$#" -gt 0 ]; do
case $1 in case $1 in
--tag) TAGNAME=$2 --tag) TAGNAME=$2
git describe $TAGNAME || usage "$TAGNAME not a valid git tag" git describe $TAGNAME || usage "$TAGNAME not a valid git tag"
@ -52,7 +56,6 @@ if [ -z "$FILES" ]; then
fi fi
for PACK_UNSIGNED in $FILES; do for PACK_UNSIGNED in $FILES; do
echo $FILE
PACK_SIGNED=$(basename $PACK_UNSIGNED) PACK_SIGNED=$(basename $PACK_UNSIGNED)
echo "base: $PACK_SIGNED" echo "base: $PACK_SIGNED"

View file

@ -1,33 +1,16 @@
#!/bin/sh #!/bin/sh
APP=xwords4
OLDDIR=$(pwd) OLDDIR=$(pwd)
if [ -z "$NDK_ROOT" ]; then if [ -z "$NDK_ROOT" ]; then
echo -n "NDK_ROOT not set... " echo -n "NDK_ROOT not set... "
NDK_ROOT="$HOME/android-ndk-1.6_r1" echo "NDK not found; install and set NDK_ROOT to point to it"
if [ -d $NDK_ROOT ]; then exit 1
echo "using $NDK_ROOT"
else
echo "NDK not found; install and set NDK_ROOT to point to it"
exit 1
fi
fi fi
cd $(dirname $0) cd $(dirname $0)/../XWords4
cd ../
if [ -h $NDK_ROOT/apps/$APP -a $(readlink $NDK_ROOT/apps/$APP) != $(pwd) ]; then ${NDK_ROOT}/ndk-build $*
rm $NDK_ROOT/apps/$APP
fi
if [ ! -h $NDK_ROOT/apps/$APP ]; then
echo "adding symlink to apps"
ln -sf $(pwd) $NDK_ROOT/apps/$APP
fi
cd $NDK_ROOT
make -j3 APP=$APP $*
cd $OLDDIR cd $OLDDIR
echo "$0 done" echo "$0 done"