mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
Merge branch 'android_branch' into android_bt
This commit is contained in:
commit
dde97562e4
7 changed files with 54 additions and 20 deletions
|
@ -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. -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.eehouse.android.xw4_dbg"
|
||||
package="org.eehouse.android.xw4dbg"
|
||||
android:versionCode="34"
|
||||
android:versionName="@string/app_version"
|
||||
>
|
||||
|
|
3
xwords4/android/XWords4-dbg/assets/.gitignore
vendored
Normal file
3
xwords4/android/XWords4-dbg/assets/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
BasEnglish2to8.xwd
|
||||
CollegeEng_2to8.xwd
|
||||
Top5000.xwd
|
|
@ -52,18 +52,24 @@
|
|||
<target name="-pre-build">
|
||||
<exec dir="." executable="../scripts/mkvariant.sh" output="/dev/null" >
|
||||
<arg value="--variant-name"/>
|
||||
<arg value="xw4_dbg"/>
|
||||
<arg value="xw4dbg"/>
|
||||
<arg value="--dest-dir"/>
|
||||
<arg value="./res"/>
|
||||
<arg value="--dest-dir"/>
|
||||
<arg value="./src"/>
|
||||
<arg value="--dest-dir"/>
|
||||
<arg value="./jni"/>
|
||||
<arg value="--dest-dir"/>
|
||||
<arg value="./assets"/>
|
||||
</exec>
|
||||
<exec dir="." executable="../scripts/ndkbuild.sh" >
|
||||
<arg value="-j3"/>
|
||||
</exec>
|
||||
<exec dir=".." executable="./scripts/genvers.sh" output="ant_out.txt" />
|
||||
<exec dir=".." executable="./scripts/genvers.sh" output="ant_out.txt">
|
||||
<arg value="XWords4-dbg"/>
|
||||
<arg value="xw4dbg"/>
|
||||
</exec>
|
||||
|
||||
</target>
|
||||
<!--
|
||||
<target name="-pre-compile">
|
||||
|
|
|
@ -53,7 +53,10 @@
|
|||
<exec dir="." executable="../scripts/ndkbuild.sh" >
|
||||
<arg value="-j3"/>
|
||||
</exec>
|
||||
<exec dir=".." executable="./scripts/genvers.sh" output="ant_out.txt" />
|
||||
<exec dir=".." executable="./scripts/genvers.sh" output="ant_out.txt">
|
||||
<arg value="XWords4"/>
|
||||
<arg value="xw4"/>
|
||||
</exec>
|
||||
</target>
|
||||
<!--
|
||||
<target name="-pre-compile">
|
||||
|
|
|
@ -15,9 +15,14 @@ $(DEST_PATH)/%.xml : $(SRC_PATH)/%.xml
|
|||
< $< > $@
|
||||
|
||||
$(DEST_PATH)/%.h : $(SRC_PATH)/%.h
|
||||
sed \
|
||||
@sed \
|
||||
-e "s,\(^.*org/eehouse/android/\)xw4\(.*$$\),\1$(VARIANT)\2," \
|
||||
< $< > $@
|
||||
|
||||
$(DEST_PATH)/%.c : $(SRC_PATH)/%.c
|
||||
@sed \
|
||||
-e "s,\(^.*Java_org_eehouse_android_\)xw4\(.*$$\),\1$(VARIANT)\2," \
|
||||
< $< > $@
|
||||
|
||||
$(DEST_PATH)/% : $(SRC_PATH)/%
|
||||
@cp $< $@
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e -u
|
||||
|
||||
DIR=$1
|
||||
VARIANT=$2
|
||||
|
||||
cd $(dirname $0)
|
||||
cd ../../
|
||||
|
||||
|
@ -8,7 +13,7 @@ GITVERSION=$(scripts/gitversion.sh)
|
|||
# TODO: deal with case where there's no hash available -- exported
|
||||
# code maybe? Better: gitversion.sh does that.
|
||||
|
||||
cat <<EOF > android/XWords4/res/values/git_string.xml
|
||||
cat <<EOF > android/${DIR}/res/values/git_string.xml
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- auto-generated; do not edit -->
|
||||
|
||||
|
@ -21,9 +26,9 @@ EOF
|
|||
# the way to mark a release
|
||||
SHORTVERS="$(git describe --always $GITVERSION 2>/dev/null || echo unknown)"
|
||||
|
||||
cat <<EOF > android/XWords4/src/org/eehouse/android/xw4/GitVersion.java
|
||||
cat <<EOF > 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
|
||||
|
|
|
@ -1,14 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
BASE=$(dirname $0)
|
||||
cd $BASE/../XWords4/bin/classes
|
||||
usage() {
|
||||
[ $# -gt 0 ] && echo "Error: $1"
|
||||
echo "usage: $0 <dir> <pkg-node> "
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue