summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-09-28 17:10:40 +0200
committerSven Gothel <[email protected]>2011-09-28 17:10:40 +0200
commit659476e002a9bfe6b35b00ea1c46fc67c62ba703 (patch)
tree06ff2b28c42f7f850bfda75964ffc791bc594072 /make
parentc9575115e214c94501b923599cc5d64778099829 (diff)
Android Activity Launching (jogl.test)
Launching activity is in: jogl.android-launcher.apk and directly derives from NewtLauncherActivity. It daisy chains apk's via ClassLoaderUtil: - gluegen-rt.apk - jogl.all-android.apk - jogl.test.apk (*) (*) This has to made configurable so the generic NewtLauncherActivity can be reused by any user application. After preparing the ClassLoader (see above), NewtLauncherActivity instanciates the configurable user Activity and passes all it's activity calls down to it.
Diffstat (limited to 'make')
-rw-r--r--make/build.xml43
-rw-r--r--make/resources/android/AndroidManifest-launcher.xml25
-rw-r--r--make/resources/android/res-launcher/values/strings.xml10
-rwxr-xr-xmake/scripts/tests.sh12
4 files changed, 62 insertions, 28 deletions
diff --git a/make/build.xml b/make/build.xml
index a18406631..791e69aed 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -16,10 +16,12 @@
<target name="all.ide" description="Debug IDE build nativewindow, jogl and newt projects, including all junit tests, but don't tag the build or create archives" depends="init.debug,build.nativewindow,build.jogl,build.newt,one.dir,test.compile" />
- <target name="test.compile">
+ <target name="test.compile.1">
<ant antfile="build-test.xml" target="test.compile" inheritRefs="true" inheritAll="true"/>
</target>
+ <target name="test.compile" depends="test.compile.1,android.test.package"/>
+
<target name="test.auto.run" description="Run automated tests (junit and others) in nativewindow, jogl and newt projects">
<ant antfile="build-test.xml" target="test.auto.run" inheritRefs="true" inheritAll="true"/>
</target>
@@ -146,15 +148,16 @@
</jar>
</target>
- <target name="android.package.skip.check" depends="init,gluegen.cpptasks.detect.os">
- <uptodate property="android.package.skip" targetfile="${jar}/jogl.all-android.apk">
+ <target name="android.package.jogl.skip.check" depends="init,gluegen.cpptasks.detect.os">
+ <uptodate property="android.package.jogl.skip" targetfile="${jar}/jogl.all-android.apk">
<srcfiles dir="${jar}" includes="jogl.all-android.jar" />
<srcfiles dir="resources/android" includes="**" />
</uptodate>
</target>
- <target name="android.package" depends="init,gluegen.cpptasks.detect.os,android.package.skip.check" if="isAndroid" unless="android.package.skip">
+ <target name="android.jogl.package" depends="init,gluegen.cpptasks.detect.os,android.package.jogl.skip.check" if="isAndroid" unless="android.package.jogl.skip">
<aapt.signed
+ jarsrcdir="${src}/jogl/classes"
jarbuilddir="${jar}"
jarbasename="jogl.all-android"
nativebuilddir="${lib}"
@@ -166,9 +169,29 @@
version.name="${jogl.version.plus}" />
</target>
- <target name="android.launcher" depends="init,gluegen.cpptasks.detect.os" if="isAndroid">
+ <target name="android.package.test.skip.check" depends="init,gluegen.cpptasks.detect.os">
+ <uptodate property="android.package.test.skip" targetfile="${jar}/jogl.test.apk">
+ <srcfiles dir="${jar}" includes="jogl.test.jar" />
+ <srcfiles dir="resources/android" includes="**" />
+ </uptodate>
+ </target>
+
+ <target name="android.test.package" depends="init,gluegen.cpptasks.detect.os,android.package.test.skip.check" if="isAndroid" unless="android.package.test.skip">
+ <aapt.signed
+ jarsrcdir="${src}/test"
+ jarbuilddir="${jar}"
+ jarbasename="jogl.test"
+ nativebuilddir="${lib}"
+ nativebasename="non-existing"
+ androidmanifest.path="resources/android/AndroidManifest-test.xml"
+ androidresources.path="resources/android/res-jogl"
+ jarmanifest.path="${build.jogl}/manifest.mf"
+ version.code="${jogl_int_version}"
+ version.name="${jogl.version.plus}" />
+ </target>
+
+ <target name="android.launcher.package" depends="init,gluegen.cpptasks.detect.os" if="isAndroid">
<mkdir dir="${build}/android/classes" />
- <mkdir dir="${build}/android/jar" />
<mkdir dir="${build}/android/lib" />
<javac destdir="${build}/android/classes"
includes="com/jogamp/android/launcher/**"
@@ -180,13 +203,13 @@
<src path="${project.root}/src/android" />
<classpath location="${android.jar}"/>
</javac>
- <jar destfile="${build}/android/jar/jogllauncher.jar" filesonly="true">
+ <jar destfile="${jar}/jogl.android-launcher.jar" filesonly="true">
<fileset dir="${build}/android/classes"
includes="com/jogamp/android/launcher/**"/>
</jar>
<aapt.signed
- jarbuilddir="${build}/android/jar"
- jarbasename="jogllauncher"
+ jarbuilddir="${jar}"
+ jarbasename="jogl.android-launcher"
nativebuilddir="${build}/android/lib"
nativebasename="non-existing"
androidmanifest.path="resources/android/AndroidManifest-launcher.xml"
@@ -218,7 +241,7 @@
</condition>
</target>
- <target name="one.dir" depends="one.dir.skip.check, one.jar.dir, android.package, android.launcher"/>
+ <target name="one.dir" depends="one.dir.skip.check, one.jar.dir, android.jogl.package, android.launcher.package"/>
<target name="repack-jars" depends="one.jar.dir">
<!-- Re-pack jars we have the intent to compress later, after signing -->
diff --git a/make/resources/android/AndroidManifest-launcher.xml b/make/resources/android/AndroidManifest-launcher.xml
index 1dfec1cb7..a69e6f865 100644
--- a/make/resources/android/AndroidManifest-launcher.xml
+++ b/make/resources/android/AndroidManifest-launcher.xml
@@ -6,30 +6,43 @@
<uses-sdk android:minSdkVersion="9" />
<uses-library android:name="com.jogamp.common" android:required="true" />
<uses-library android:name="javax.media.opengl" android:required="true" />
+ <uses-library android:name="com.jogamp.opengl.test" android:required="true" />
<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:description="@string/app_descr"
android:persistent="false"
>
- <activity android:name="com.jogamp.android.launcher.NEWTLauncherVersionActivity"
+ <activity android:name="com.jogamp.android.launcher.NEWTLauncherGearsES1Activity"
android:finishOnTaskLaunch="true"
android:launchMode="singleTop"
android:configChanges="keyboardHidden|orientation"
- android:label="@string/activity_v_name"
- android:description="@string/activity_v_descr"
+ android:label="@string/activity_gearses1_name"
+ android:description="@string/activity_gearses1_descr"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
- <activity android:name="com.jogamp.android.launcher.NEWTLauncherGearsActivity"
+ <activity android:name="com.jogamp.android.launcher.NEWTLauncherGearsES2Activity"
android:finishOnTaskLaunch="true"
android:launchMode="singleTop"
android:configChanges="keyboardHidden|orientation"
- android:label="@string/activity_gears1_name"
- android:description="@string/activity_gears1_descr"
+ android:label="@string/activity_gearses2_name"
+ android:description="@string/activity_gearses2_descr"
+ >
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ <activity android:name="com.jogamp.android.launcher.NEWTLauncherGraphUIActivity"
+ android:finishOnTaskLaunch="true"
+ android:launchMode="singleTop"
+ android:configChanges="keyboardHidden|orientation"
+ android:label="@string/activity_graphui_name"
+ android:description="@string/activity_graphui_descr"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git a/make/resources/android/res-launcher/values/strings.xml b/make/resources/android/res-launcher/values/strings.xml
index 23b0248bd..e9bb75b65 100644
--- a/make/resources/android/res-launcher/values/strings.xml
+++ b/make/resources/android/res-launcher/values/strings.xml
@@ -3,8 +3,10 @@
<string name="hello">Jogl Launcher</string>
<string name="app_name">JogAmp\'s Jogl Launcher</string>
<string name="app_descr">Launches Jogl Applications.</string>
- <string name="activity_v_name">Jogl\'s Version</string>
- <string name="activity_v_descr">Shows the version of the Jogl Library.</string>
- <string name="activity_gears1_name">Gears ES1</string>
- <string name="activity_gears1_descr">Gears ES1</string>
+ <string name="activity_gearses1_name">GearsES1</string>
+ <string name="activity_gearses1_descr">GearsES1</string>
+ <string name="activity_gearses2_name">GearsES2</string>
+ <string name="activity_gearses2_descr">GearsES2</string>
+ <string name="activity_graphui_name">GraphUI</string>
+ <string name="activity_graphui_descr">GraphUI</string>
</resources>
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index ee15e8562..a3e8c92f3 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -57,10 +57,6 @@ function jrun() {
#D_ARGS="-Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.X11Util.TraceDisplayLifecycle=true -Dnativewindow.debug.X11Util"
#D_ARGS="-Dnativewindow.debug.X11Util -Djogl.debug.GLContext -Djogl.debug.GLDrawable -Dnewt.debug=all"
#D_ARGS="-Dnativewindow.debug.X11Util"
- #D_ARGS="-Dnativewindow.x11.mt-bug=true"
- #D_ARGS="-Dnativewindow.x11.mt-bug=true -Djogl.debug.DebugGL"
- #D_ARGS="-Dnativewindow.x11.mt-bug=true -Djogl.debug=all"
- #D_ARGS="-Dnativewindow.x11.mt-bug=true -Dnativewindow.debug.NativeWindow -Dnativewindow.debug.X11Util -Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.X11Util.TraceDisplayLifecycle=true"
#D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock"
#D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=1000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock"
#D_ARGS="-Dnewt.debug.EDT -Djogamp.common.utils.locks.Lock.timeout=600000 -Djogl.debug.Animator -Dnewt.debug.Display -Dnewt.debug.Screen"
@@ -73,10 +69,10 @@ function jrun() {
#D_ARGS="-Djogl.debug.GLContext -Djogl.debug.GraphicsConfiguration"
#D_ARGS="-Dnewt.debug.EDT"
#D_ARGS="-Djogl.debug=all -Dnativewindow.debug=all -Dnewt.debug=all"
- #D_ARGS="-Djogl.debug=all -Dnewt.debug=all"
+ D_ARGS="-Djogl.debug=all -Dnewt.debug=all"
#D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT -Djogl.debug.GLContext"
#D_ARGS="-Dnewt.debug.Window -Djogl.debug.Animator -Dnewt.debug.Screen"
- D_ARGS="-Dnewt.debug.Window"
+ #D_ARGS="-Dnewt.debug.Window"
#D_ARGS="-Xprof"
#D_ARGS="-Djogl.debug.Animator"
#D_ARGS="-Dnativewindow.debug=all"
@@ -224,7 +220,7 @@ function testawtmt() {
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting02AWT $*
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03AWT $*
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03AWT $*
-testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03bAWT $*
+#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03bAWT $*
#testawt com.jogamp.opengl.test.junit.newt.TestCloseNewtAWT
#testawt com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleNEWT $*
@@ -250,7 +246,7 @@ testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03bAWT $*
#testnoawt com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo02 $*
#testnoawt com.jogamp.opengl.test.junit.graph.demos.GPURegionNewtDemo01 $*
#testnoawt com.jogamp.opengl.test.junit.graph.demos.GPURegionNewtDemo02 $*
-#testnoawt com.jogamp.opengl.test.junit.graph.demos.GPUUISceneNewtDemo01 $*
+testnoawt com.jogamp.opengl.test.junit.graph.demos.GPUUISceneNewtDemo01 $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGPUMemSec01NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestMapBuffer01NEWT $*