Merge branch 'android_branch' into android_bt

This commit is contained in:
Eric House 2012-03-05 20:08:43 -08:00
commit fdfbd792f7
7 changed files with 45 additions and 20 deletions

View file

@ -49,6 +49,12 @@
<!-- extension targets. Uncomment the ones where you want to do custom work
in between standard targets -->
<target name="-pre-clean">
<exec dir="." executable="../scripts/ndkbuild.sh" output="/dev/null" >
<arg value="clean"/>
</exec>
</target>
<target name="-pre-build">
<exec dir="." executable="../scripts/mkvariant.sh" output="/dev/null" >
<arg value="--variant-name"/>

View file

@ -49,6 +49,12 @@
<!-- extension targets. Uncomment the ones where you want to do custom work
in between standard targets -->
<target name="-pre-clean">
<exec dir="." executable="../scripts/ndkbuild.sh" output="/dev/null">
<arg value="clean"/>
</exec>
</target>
<target name="-pre-build">
<exec dir="." executable="../scripts/ndkbuild.sh" >
<arg value="-j3"/>

View file

@ -139,9 +139,9 @@ andMakeBitmap( AndDictionaryCtxt* ctxt, XP_U8 const** ptrp,
}
JNIEnv* env = ctxt->env;
bitmap = and_util_makeJBitmap( ctxt->jniutil, nCols, nRows, colors );
(*env)->DeleteLocalRef( env, bitmap );
bitmap = (*env)->NewGlobalRef( env, bitmap );
jobject tmp = and_util_makeJBitmap( ctxt->jniutil, nCols, nRows, colors );
bitmap = (*env)->NewGlobalRef( env, tmp );
(*env)->DeleteLocalRef( env, tmp );
XP_FREE( ctxt->super.mpool, colors );
#endif
}

View file

@ -56,9 +56,9 @@ makeJRect( AndDraw* draw, int indx, const XP_Rect* rect )
(*env)->DeleteLocalRef( env, rclass );
draw->jCache[indx] = (*env)->NewGlobalRef( env, robj );
(*env)->DeleteLocalRef( env, robj );
robj = (*env)->NewGlobalRef( env, robj );
draw->jCache[indx] = robj;
robj = draw->jCache[indx];
} else {
setInt( env, robj, "left", rect->left );
setInt( env, robj, "top", rect->top );
@ -81,9 +81,9 @@ makeDSI( AndDraw* draw, int indx, const DrawScoreInfo* dsi )
dsiobj = (*env)->NewObject( env, rclass, initId );
(*env)->DeleteLocalRef( env, rclass );
draw->jCache[indx] = (*env)->NewGlobalRef( env, dsiobj );
(*env)->DeleteLocalRef( env, dsiobj );
dsiobj = (*env)->NewGlobalRef( env, dsiobj );
draw->jCache[indx] = dsiobj;
dsiobj = draw->jCache[indx];
}
setInt( env, dsiobj, "playerNum", dsi->playerNum );

View file

@ -4,30 +4,34 @@ set -u -e
TAGNAME=""
FILES=""
VARIANT="XWords4"
XW_WWW_PATH=${XW_WWW_PATH:-""}
usage() {
echo "Error: $*"
echo "usage: $0 [--tag <name>] [<package-unsigned.apk>]" >&2
echo "usage: $0 [--tag <name>] [--variant variant] [<package-unsigned.apk>]" >&2
exit 1
}
do_build() {
WD=$(pwd)
cd $(dirname $0)/../XWords4/
touch jni/Android.mk
../scripts/ndkbuild.sh -j3
cd $(dirname $0)/../${VARIANT}/
rm -rf bin/ gen/
ant release
ant clean release
cd $WD
}
while [ "$#" -gt 0 ]; do
case $1 in
--tag) TAGNAME=$2
--tag)
TAGNAME=$2
git describe $TAGNAME || usage "$TAGNAME not a valid git tag"
shift
;;
--variant)
VARIANT=$2
shift
;;
*)
FILES="$1"
;;

View file

@ -3,13 +3,14 @@
set -e -u
usage () {
echo "usage: $(basename $0) [--tag tagname | --branch branchname]"
echo "usage: $(basename $0) [--tag tagname | --branch branchname] [--variant variant]"
echo " # (uses current branch as default)"
exit 0
}
TAG=""
BRANCH=""
VARIANT="XWords4"
while [ 0 -lt $# ] ; do
case $1 in
@ -21,6 +22,10 @@ while [ 0 -lt $# ] ; do
BRANCH=$2
shift
;;
--variant)
VARIANT=$2
shift
;;
*)
usage
;;
@ -28,6 +33,8 @@ while [ 0 -lt $# ] ; do
shift
done
echo "VARIANT=$VARIANT"
if [ -n "$TAG" ]; then
if ! git tag | grep -w "$TAG"; then
echo "tag $TAG not found"
@ -37,7 +44,7 @@ elif [ -z $BRANCH ]; then
BRANCH=$(git branch | grep '^*' | sed 's,^.* ,,')
fi
echo "building with ${TAG}${BRANCH}"
echo "building $VARIANT with ${TAG}${BRANCH}"
BUILDIR=/tmp/$(basename $0)_build_$$
SRCDIR=$(pwd)/$(dirname $0)/../../../
@ -49,9 +56,11 @@ cd $BUILDIR
git clone $SRCDIR BUILD
cd BUILD
git checkout ${TAG}${BRANCH}
./xwords4/android/scripts/setup_local_props.sh
./xwords4/android/scripts/arelease.sh
cp *.apk /tmp
cd ./xwords4/android/${VARIANT}
../scripts/setup_local_props.sh
../scripts/arelease.sh --variant ${VARIANT}
mkdir -p /tmp/releases_${VARIANT}
cp *.apk /tmp/releases_${VARIANT}
cd $CURDIR
rm -rf $BUILDIR

View file

@ -7,7 +7,7 @@
<?php
include "pwd.php";
$limit = 10;
$limit = 50;
class Column {
public $colname;
@ -87,7 +87,7 @@ function strip_quotes($str) {
function print_date( $str ) {
$str = strip_quotes( $str );
$time = strtotime( $str );
return strftime( "%x@%R", $time );
return strftime( "%y%m%d %R", $time );
}
$cols = array( new Column("dead", "D", "capitalize", false ),