From 45f2134ab5cc5540845635b9374cf5141c16a644 Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 13 Feb 2012 23:35:41 -0800 Subject: [PATCH] fix variant generation -- seems to work now. JNI was broken. --- .../android/XWords4-dbg/AndroidManifest.xml | 2 +- xwords4/android/XWords4-dbg/assets/.gitignore | 3 ++ xwords4/android/XWords4-dbg/build.xml | 10 +++++-- xwords4/android/XWords4/build.xml | 5 +++- xwords4/android/scripts/Variant.mk | 7 ++++- xwords4/android/scripts/genvers.sh | 17 +++++++---- xwords4/android/scripts/getsigs.sh | 30 +++++++++++++------ 7 files changed, 54 insertions(+), 20 deletions(-) create mode 100644 xwords4/android/XWords4-dbg/assets/.gitignore diff --git a/xwords4/android/XWords4-dbg/AndroidManifest.xml b/xwords4/android/XWords4-dbg/AndroidManifest.xml index 9b92a470d..ffc8622a2 100644 --- a/xwords4/android/XWords4-dbg/AndroidManifest.xml +++ b/xwords4/android/XWords4-dbg/AndroidManifest.xml @@ -21,7 +21,7 @@ own application, the package name must be changed from "com.example.*" to come from a domain that you own or have control over. --> diff --git a/xwords4/android/XWords4-dbg/assets/.gitignore b/xwords4/android/XWords4-dbg/assets/.gitignore new file mode 100644 index 000000000..e9a786d8d --- /dev/null +++ b/xwords4/android/XWords4-dbg/assets/.gitignore @@ -0,0 +1,3 @@ +BasEnglish2to8.xwd +CollegeEng_2to8.xwd +Top5000.xwd diff --git a/xwords4/android/XWords4-dbg/build.xml b/xwords4/android/XWords4-dbg/build.xml index 3cfe402f1..648b99617 100644 --- a/xwords4/android/XWords4-dbg/build.xml +++ b/xwords4/android/XWords4-dbg/build.xml @@ -52,18 +52,24 @@ - + + + - + + + + + @@ -21,9 +26,9 @@ EOF # the way to mark a release SHORTVERS="$(git describe --always $GITVERSION 2>/dev/null || echo unknown)" -cat < android/XWords4/src/org/eehouse/android/xw4/GitVersion.java +cat < android/${DIR}/src/org/eehouse/android/${VARIANT}/GitVersion.java // auto-generated; do not edit -package org.eehouse.android.xw4; +package org.eehouse.android.${VARIANT}; class GitVersion { public static final String VERS = "$SHORTVERS"; } @@ -32,6 +37,6 @@ EOF # touch the files that depend on git_string.xml. (I'm not sure that # this list is complete or if ant and java always get dependencies # right. Clean builds are the safest.) -touch android/XWords4/res/xml/xwprefs.xml -touch android/XWords4/gen/org/eehouse/android/xw4/R.java -touch android/XWords4/src/org/eehouse/android/xw4/Utils.java +touch android/${DIR}/res/xml/xwprefs.xml +touch android/${DIR}/gen/org/eehouse/android/${VARIANT}/R.java +touch android/${DIR}/src/org/eehouse/android/${VARIANT}/Utils.java diff --git a/xwords4/android/scripts/getsigs.sh b/xwords4/android/scripts/getsigs.sh index e16843bc6..a06b31c17 100755 --- a/xwords4/android/scripts/getsigs.sh +++ b/xwords4/android/scripts/getsigs.sh @@ -1,14 +1,26 @@ #!/bin/sh -BASE=$(dirname $0) -cd $BASE/../XWords4/bin/classes +usage() { + [ $# -gt 0 ] && echo "Error: $1" + echo "usage: $0 " + echo " # e.g. XWords4 or XWords4-dbg and xw4 or xw4_dbg" + exit 1 +} -javah -o /tmp/javah$$.txt org.eehouse.android.xw4.jni.XwJNI -javap -s org.eehouse.android.xw4.jni.XwJNI -javap -s org.eehouse.android.xw4.jni.DrawCtx -javap -s org.eehouse.android.xw4.jni.UtilCtxt -javap -s org.eehouse.android.xw4.jni.CommsAddrRec -javap -s org.eehouse.android.xw4.jni.TransportProcs -javap -s org.eehouse.android.xw4.jni.JNIUtils +[ $# -gt 1 ] || usage "dir and node parameters required" + +DIR=$1 +NODE=$2 + +BASE=$(dirname $0) +cd $BASE/../${DIR}/bin/classes + +javah -o /tmp/javah$$.txt org.eehouse.android.${NODE}.jni.XwJNI +javap -s org.eehouse.android.${NODE}.jni.XwJNI +javap -s org.eehouse.android.${NODE}.jni.DrawCtx +javap -s org.eehouse.android.${NODE}.jni.UtilCtxt +javap -s org.eehouse.android.${NODE}.jni.CommsAddrRec +javap -s org.eehouse.android.${NODE}.jni.TransportProcs +javap -s org.eehouse.android.${NODE}.jni.JNIUtils cat /tmp/javah$$.txt rm /tmp/javah$$.txt