aboutsummaryrefslogtreecommitdiffstats
path: root/make/build.xml
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-07-28 04:24:54 +0200
committerSven Gothel <[email protected]>2011-07-28 04:24:54 +0200
commit2d672b1c5f237ccb911b9106308c0dc1977530b0 (patch)
tree3e7f66d032c7aab0dfadb663a2fb60381bb6eece /make/build.xml
parent445521018f49305cb3c09a4f2dcf0e9be8bc5a46 (diff)
Fix android build/unit-test ; Generalize aapt packaging (macro) ; Use jogamp icons
make/scripts/make.gluegen.all.android-armv7-cross.sh - make Rami and me happy :) - 3 default locations plus recognize user provided android toolkit path - fixes using ant targets as arguments make/jogamp-androidtasks.xml - macro aapt.signed: create signed apk file from jar - incl. adding native libraries - see macro doc. adding generic jogamp icons/images
Diffstat (limited to 'make/build.xml')
-rw-r--r--make/build.xml119
1 files changed, 22 insertions, 97 deletions
diff --git a/make/build.xml b/make/build.xml
index be52aba..2b1454b 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -21,6 +21,7 @@
<import file="gluegen-cpptasks.xml" />
<import file="jogamp-archivetasks.xml" />
+ <import file="jogamp-androidtasks.xml" />
<import file="jogamp-env.xml" />
<condition property="rootrel.build" value="build">
@@ -81,8 +82,10 @@
<property name="gluegen.build.commit" value="manual"/> <!-- fallback -->
<!-- This is the version of GlueGen you are building -->
+ <property name="gluegen_int_version" value="2"/>
<property name="gluegen_base_version" value="2.0"/>
<property name="gluegen.version" value="${gluegen_base_version}-b${gluegen.build.number}-${version.timestamp}" />
+ <property name="gluegen.version.plus" value="${gluegen_base_version}-${gluegen.branch}-b${gluegen.build.number}-${gluegen.build.commit}-${version.timestamp}" />
<property name="stub.includes.dir" value="stub_includes" /> <!-- NOTE: this MUST be relative for FileSet -->
@@ -687,103 +690,25 @@
</target>
<target name="android.package" depends="gluegen.cpptasks.detect.os,gluegen.build.check.java" if="isAndroid">
- <property name="dex.file.name" value="classes.dex" />
- <property name="intermediate.dex.file" location="${build}/apk-temp/${dex.file.name}" />
- <property name="resource.package.file.name" value="${build}/gluegen-rt.ap_" />
- <property name="signed.file.name" value="${build}/gluegen-rt-sign.ap_" />
- <property name="release.file.name" value="${build}/gluegen-rt.apk" />
- <mkdir dir="${build}/apk-temp/bin/lib/armeabi" />
- <mkdir dir="${build}/apk-temp/bin/lib/src" />
- <mkdir dir="${build}/apk-temp/bin/lib/assets" />
- <copy todir="${build}/apk-temp/bin/lib/armeabi">
- <fileset dir="${build}/obj">
- <include name="*gluegen-rt.${native.library.suffix}" />
- </fileset>
- </copy>
- <delete file="${intermediate.dex.file}" includeEmptyDirs="true" quiet="true" failonerror="false" />
- <delete file="${release.file.name}" includeEmptyDirs="true" quiet="true" failonerror="false" />
-
- <exec dir="." executable="dx" logError="true" failonerror="true" failifexecutionfails="true">
- <arg line="--dex"/>
- <arg line="--output=${intermediate.dex.file}"/>
- <arg line="${build}/gluegen-rt.jar"/>
- <arg line="${build}/apk-temp/"/> <!-- need to be installed .. etc -->
- </exec>
-
- <property name="version.code" value="" />
- <property name="build.packaging.debug" value="false" />
- <property name="build.signing.debug" value="false" />
- <property name="resource.dir" value="lib/android/res" />
- <property name="resource.absolute.dir" location="${resource.dir}" />
- <property name="filter.abi" value="" />
-
- <path id="android.antlibs">
- <pathelement path="${env.ANDROID_SDK_HOME}/tools/lib/anttasks.jar" />
- <pathelement path="${env.ANDROID_SDK_HOME}/tools/lib/sdklib.jar" />
- <pathelement path="${env.ANDROID_SDK_HOME}/tools/lib/androidprefs.jar" />
- <pathelement path="${env.ANDROID_SDK_HOME}/tools/lib/apkbuilder.jar" />
- <pathelement path="${env.ANDROID_SDK_HOME}/tools/lib/jarutils.jar" />
- </path>
-
- <echo>Packaging resources</echo>
- <exec dir="." executable="aapt" logError="true" failonerror="true" failifexecutionfails="true">
- <arg line="package"/>
- <arg line="-v"/>
- <arg line="--debug-mode"/>
- <arg line="-f"/>
- <arg line="-j"/>
- <arg line="${build}/gluegen-rt.jar"/>
- <arg line="-M"/>
- <arg line="lib/android/AndroidManifest.xml"/>
- <arg line="-S"/>
- <arg line="lib/android/res"/>
- <arg line="-A"/>
- <arg line="${build}/apk-temp/bin/lib/assets"/>
- <arg line="-I"/>
- <arg line="${env.ANDROID_SDK_HOME}/platforms/android-${env.ANDROID_SDK_VERSION}/android.jar"/>
- <arg line="-F"/>
- <arg line="${resource.package.file.name}"/>
- <arg line="${build}/apk-temp/"/>
- </exec>
-
- <!-- TODO: Remove temp key and use jogamp signer -->
- <echo>Generating temp debug key...</echo>
- <exec dir="." executable="keytool" failonerror="true">
- <arg value="-genkey "/>
- <arg value="-alias" />
- <arg value="debug" />
- <arg value="-keystore" />
- <arg value="${build}/apk-temp/debug.keystore" />
- <arg value="-keypass" />
- <arg value="jogamp" />
- <arg value="-dname" />
- <arg value="CN=GLUEGEN Debug,O=JOGAMP,C=US" />
- <arg value="-storepass" />
- <arg value="jogamp" />
- </exec>
-
- <echo>Signing apk...</echo> <!-- needed for install on device -->
- <signjar
- jar="${resource.package.file.name}"
- signedjar="${signed.file.name}"
- keystore="${build}/apk-temp/debug.keystore"
- storepass="jogamp"
- alias="debug"
- keypass="jogamp"
- verbose="true" />
-
- <echo>Running zip align on final apk...</echo>
- <exec dir="." executable="${env.ANDROID_SDK_HOME}/tools/zipalign" failonerror="true">
- <arg line="-v" />
- <arg value="-f" />
- <arg value="4" />
- <arg path="${signed.file.name}" />
- <arg path="${release.file.name}" />
- </exec>
-
- <delete dir="${build}/apk-temp" includeEmptyDirs="true" quiet="true" failonerror="false" />
- <delete file="${resource.package.file.name}" includeEmptyDirs="true" quiet="true" failonerror="false" />
- <delete file="${signed.file.name}" includeEmptyDirs="true" quiet="true" failonerror="false" />
+
+ <aapt.signed
+ jarbuilddir="${build}"
+ jarbasename="gluegen-rt"
+ nativebuilddir="${gluegen.lib.dir}"
+ nativebasename="gluegen-rt"
+ androidmanifest.path="lib/android/AndroidManifest.xml"
+ version.code="${gluegen_int_version}"
+ version.name="${gluegen.version.plus}" />
+
+ <aapt.signed
+ jarbuilddir="${build}"
+ jarbasename="gluegen"
+ nativebuilddir="${gluegen.lib.dir}"
+ nativebasename="gluegen-rt"
+ androidmanifest.path="lib/android/AndroidManifest.xml"
+ version.code="${gluegen_int_version}"
+ version.name="${gluegen.version.plus}" />
+
</target>
<target name="base.compile" depends="init, gluegen.build.java, gluegen.build.c, tag.build" />