summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-03-27 05:52:37 +0200
committerSven Gothel <[email protected]>2012-03-27 05:52:37 +0200
commit190e8ccc19ab0d6b8a93c2b58fc86e528e10d003 (patch)
tree5633da2706bf1cc019f47b58729698704f949044 /make
parent03fef79a232af65a586cbd5f837d6a602e31be66 (diff)
Generate and add *.apk files to the 7z archive [for deployment]
Diffstat (limited to 'make')
-rwxr-xr-xmake/build.xml47
-rw-r--r--make/resources/android/AndroidManifest-joal.xml16
-rw-r--r--make/resources/android/res-joal/drawable-hdpi/icon.pngbin0 -> 2516 bytes
-rw-r--r--make/resources/android/res-joal/drawable-ldpi/icon.pngbin0 -> 1172 bytes
-rw-r--r--make/resources/android/res-joal/drawable-mdpi/icon.pngbin0 -> 1570 bytes
-rw-r--r--make/resources/android/res-joal/layout/main.xml12
-rw-r--r--make/resources/android/res-joal/values/strings.xml8
7 files changed, 70 insertions, 13 deletions
diff --git a/make/build.xml b/make/build.xml
index 9cac7f5..eecce3d 100755
--- a/make/build.xml
+++ b/make/build.xml
@@ -31,13 +31,6 @@
-->
<project name="JOAL" basedir="." default="all">
- <!-- This is the version of JOAL you are building -->
- <property name="joal_base_version" value="2.0"/>
- <tstamp>
- <format property="version.timestamp" pattern="yyyyMMdd"/>
- </tstamp>
- <property name="joal.version" value="${joal_base_version}-${version.timestamp}" />
-
<property name="project.root" value=".." />
<condition property="rootrel.build" value="build">
@@ -50,6 +43,12 @@
<property name="gluegen.root" value="${project.root}/../gluegen" />
<property name="gluegen.build" value="${gluegen.root}/${rootrel.build}" />
+ <!-- This is the version of JOAL you are building -->
+ <property name="joal_base_version" value="2.0"/>
+ <property name="joal_int_version" value="2"/>
+ <tstamp>
+ <format property="version.timestamp" pattern="yyyyMMdd"/>
+ </tstamp>
<property name="joal.build.number" value="manual-build"/>
<property name="joal.build.id" value="${version.timestamp}"/>
<mkdir dir="${build}" />
@@ -67,10 +66,13 @@
<arg line="rev-parse HEAD"/>
</exec>
<property name="joal.build.commit" value="manual"/> <!-- fallback -->
+ <property name="joal.version" value="${joal_base_version}-${version.timestamp}" />
+ <property name="joal.version.plus" value="${joal_base_version}-${joal.build.branch}-b${joal.build.number}-${joal.build.commit}-${version.timestamp}" />
<!-- Pull in GlueGen cpptasks build file -->
<import file="${gluegen.root}/make/gluegen-cpptasks.xml" />
<import file="${gluegen.root}/make/jogamp-archivetasks.xml" />
+ <import file="${gluegen.root}/make/jogamp-androidtasks.xml" />
<import file="${gluegen.root}/make/jogamp-env.xml" />
<!-- ================================================================== -->
@@ -161,6 +163,7 @@
<!-- The resulting joal.jar. -->
<property name="joal.jar" value="${build}/joal.jar" />
+ <property name="joal.apk" value="${build}/joal.apk" />
<path id="joal_all.classpath">
<pathelement location="${gluegen-rt.jar}" />
@@ -397,7 +400,7 @@
<!--
- Build the joal.jar file.
-->
- <target name="jar" depends="java.compile">
+ <target name="jar">
<!-- Prepare the manifest -->
<copy file="joalversion"
tofile="tempversion"
@@ -417,6 +420,20 @@
<include name="jogamp/openal/**" />
</fileset>
</jar>
+
+ <aapt.signed
+ jarsrcdir="${src.java}"
+ jarbuilddir="${build}"
+ jarbasename="joal"
+ nativebuilddir="../${rootrel.build}/obj"
+ nativebasename=""
+ android.abi="${android.abi}"
+ androidmanifest.path="resources/android/AndroidManifest-joal.xml"
+ androidresources.path="resources/android/res-joal"
+ jarmanifest.path="tempversion"
+ version.code="${joal_int_version}"
+ version.name="${joal.version.plus}" />
+
<delete file="tempversion"/>
</target>
@@ -538,6 +555,7 @@
<mkdir dir="${archive}/jar" />
<copy todir="${archive}/jar">
<fileset dir="${build}" includes="joal*.jar"/>
+ <fileset dir="${build}" includes="joal*.apk"/>
</copy>
<mkdir dir="${archive}/lib" />
<copy todir="${archive}/lib">
@@ -578,14 +596,17 @@
<!--
- Build everything.
-->
- <target name="all" depends="joal.compile, test.compile, tag.build, developer-zip-archive"/>
+ <target name="all" depends="joal.build, test.compile, tag.build, developer-zip-archive"/>
- <target name="joal.compile" depends="init">
- <!-- Generate, compile, and build the jar for the Java sources. -->
- <antcall target="jar" inheritRefs="true" />
+ <target name="joal.build" depends="init">
+ <!-- Generate and compile the Java sources. -->
+ <antcall target="java.compile" inheritRefs="true" />
<!-- Compile the native C sources . -->
<antcall target="c.build.joal" inheritRefs="true" />
+
+ <!-- build the jar/apk -->
+ <antcall target="jar" inheritRefs="true" />
</target>
<target name="tag.build">
@@ -601,7 +622,7 @@
- unit tests
-->
- <target name="test.compile" depends="joal.compile">
+ <target name="test.compile" depends="joal.build">
<ant antfile="build-test.xml" target="test.compile" inheritRefs="true" inheritAll="true"/>
</target>
diff --git a/make/resources/android/AndroidManifest-joal.xml b/make/resources/android/AndroidManifest-joal.xml
new file mode 100644
index 0000000..a83eeec
--- /dev/null
+++ b/make/resources/android/AndroidManifest-joal.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ sharedUserId="com.jogamp.Community"
+ package="com.jogamp.openal">
+
+ <uses-sdk android:minSdkVersion="9" />
+ <uses-library android:name="com.jogamp.common" android:required="true" />
+
+ <application android:icon="@drawable/icon"
+ android:label="@string/app_name"
+ android:description="@string/app_descr"
+ android:persistent="false"
+ >
+ </application>
+
+</manifest>
diff --git a/make/resources/android/res-joal/drawable-hdpi/icon.png b/make/resources/android/res-joal/drawable-hdpi/icon.png
new file mode 100644
index 0000000..2148232
--- /dev/null
+++ b/make/resources/android/res-joal/drawable-hdpi/icon.png
Binary files differ
diff --git a/make/resources/android/res-joal/drawable-ldpi/icon.png b/make/resources/android/res-joal/drawable-ldpi/icon.png
new file mode 100644
index 0000000..c16211f
--- /dev/null
+++ b/make/resources/android/res-joal/drawable-ldpi/icon.png
Binary files differ
diff --git a/make/resources/android/res-joal/drawable-mdpi/icon.png b/make/resources/android/res-joal/drawable-mdpi/icon.png
new file mode 100644
index 0000000..1c26e3f
--- /dev/null
+++ b/make/resources/android/res-joal/drawable-mdpi/icon.png
Binary files differ
diff --git a/make/resources/android/res-joal/layout/main.xml b/make/resources/android/res-joal/layout/main.xml
new file mode 100644
index 0000000..3a5f117
--- /dev/null
+++ b/make/resources/android/res-joal/layout/main.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ >
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hello"
+ />
+</LinearLayout>
diff --git a/make/resources/android/res-joal/values/strings.xml b/make/resources/android/res-joal/values/strings.xml
new file mode 100644
index 0000000..8ff1a1d
--- /dev/null
+++ b/make/resources/android/res-joal/values/strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="hello">Joal Library</string>
+ <string name="app_name">JogAmp\'s Joal Library</string>
+ <string name="app_descr">Contains Dalvik and native code, supporting native bindings.</string>
+ <string name="activity_v_name">Joal</string>
+ <string name="activity_v_descr">The Joal Library.</string>
+</resources>