aboutsummaryrefslogtreecommitdiffstats
path: root/make/build.xml
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-06-26 10:39:23 +0200
committerSven Gothel <[email protected]>2012-06-26 10:39:23 +0200
commit9a71703904ebfec343fb2c7266343d37a2e4c3db (patch)
tree7ca65a063f218064059743ca5cda7744cfc75c20 /make/build.xml
parent2a10f604b65f12ae5e8987bfa73cffcc1d5f796e (diff)
Implement Bug #598 - JOGL ALL JAR File Change incl. it's Native Jar URL Derivation
+++ JNILibLoaderBase.addNativeJarLibs(..): Add API doc JNILibLoaderBase: "addNativeJarLibs(Class<?> classFromJavaJar, String allNativeJarBaseName, String[] atomicNativeJarBaseNames)" -> "addNativeJarLibs(Class<?>[] classesFromJavaJars, String singleJarMarker, String[] stripBasenameSuffixes)" Derive the 'all' (1st choice) native JAR URL solely on the given class's JAR URL. Examples: JOCL: // only: jocl.jar -> jocl-natives-'os.and.arch'.jar addNativeJarLibs(new Class<?>[] { JOCLJNILibLoader.class }, null, null ); JOGL: final ClassLoader cl = GLProfile.class.getClassLoader(); // either: [jogl-all.jar, jogl-all-noawt.jar, jogl-all-mobile.jar] -> jogl-all-natives-<os.and.arch>.jar // or: nativewindow-core.jar -> nativewindow-natives-<os.and.arch>.jar, // jogl-core.jar -> jogl-natives-<os.and.arch>.jar, // (newt-core.jar -> newt-natives-<os.and.arch>.jar)? (if available) final String newtFactoryClassName = "com.jogamp.newt.NewtFactory"; final Class<?>[] classesFromJavaJars = new Class<?>[] { NWJNILibLoader.class, GLProfile.class, null }; if( ReflectionUtil.isClassAvailable(newtFactoryClassName, cl) ) { classesFromJavaJars[2] = ReflectionUtil.getClass(newtFactoryClassName, false, cl); } JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all", new String[] { "-noawt", "-mobile", "-core" } ); Efficiency / Performance: - Reduced JAR URL lookup calls JarUtil.getJarURL(..) - JNILibLoaderBase, Platform, JarUtil - Attempt loading Jar files (native, class, ..) only once - TempJarCache Code Cleanup (IOUtil, JarUtil, : - IOException if not found - IllegalArgumentException if null argument +++ jogamp.android-launcher.jar -> jogamp-android-launcher.jar +++
Diffstat (limited to 'make/build.xml')
-rw-r--r--make/build.xml20
1 files changed, 10 insertions, 10 deletions
diff --git a/make/build.xml b/make/build.xml
index 9b4e316..671e3c3 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -141,7 +141,7 @@
<property name="archive" value="${build}/${archive.name}" />
<!-- the launcher is compiled and packaged explicit - if android -->
- <property name="jogamp.android-launcher.classes" value="jogamp/android/launcher/**"/>
+ <property name="jogamp-android-launcher.classes" value="jogamp/android/launcher/**"/>
<!-- optional android classes - if android -->
<property name="java.part.android" value="jogamp/common/os/android/**"/>
@@ -150,7 +150,7 @@
<property name="gluegen-rt.classes" value="com/jogamp/gluegen/runtime/**"/>
<property name="jogamp.common.classes" value="com/jogamp/common/** jogamp/common/**"/>
- <property name="gluegen.excludes.all" value="${gluegen.excludes.nsig} ${jogamp.android-launcher.classes}" />
+ <property name="gluegen.excludes.all" value="${gluegen.excludes.nsig} ${jogamp-android-launcher.classes}" />
</target>
@@ -709,7 +709,7 @@
<jar destfile="${build}/gluegen.jar" manifest="${build}/Manifest.temp">
<fileset dir="${classes}">
<include name="**/*.class" />
- <exclude name="${jogamp.android-launcher.classes}" />
+ <exclude name="${jogamp-android-launcher.classes}" />
<exclude name="${java.part.android}" />
</fileset>
<fileset dir="resources/assets">
@@ -734,7 +734,7 @@
<include name="com/jogamp/gluegen/runtime/*.class" />
<include name="com/jogamp/common/**" />
<include name="jogamp/common/**" />
- <exclude name="${jogamp.android-launcher.classes}" />
+ <exclude name="${jogamp-android-launcher.classes}" />
<exclude name="${java.part.android}" />
</fileset>
<fileset dir="resources/assets">
@@ -793,7 +793,7 @@
<include name="com/jogamp/gluegen/runtime/*.class" />
<include name="com/jogamp/common/**" />
<include name="jogamp/common/**" />
- <exclude name="${jogamp.android-launcher.classes}" />
+ <exclude name="${jogamp-android-launcher.classes}" />
</fileset>
<fileset dir="resources/assets">
<include name="**" />
@@ -812,14 +812,14 @@
<srcfiles dir= "." includes="*.xml"/>
<srcfiles dir= "resources/android" includes="**/*.xml"/>
<srcfiles dir= "${src.java}/jogamp/android/launcher" includes="**"/>
- <mapper type="merge" to="${build}/jogamp.android-launcher.jar"/>
+ <mapper type="merge" to="${build}/jogamp-android-launcher.jar"/>
</uptodate>
</target>
<target name="android-launcher.build" depends="gluegen.cpptasks.detect.os,gluegen.build.check.android-launcher" if="isAndroid" unless="gluegen.build.skip.android-launcher">
<javac destdir="${classes}"
includeAntRuntime="false"
- includes="${jogamp.android-launcher.classes}"
+ includes="${jogamp-android-launcher.classes}"
excludes="${jogamp.common.classes}"
memoryMaximumSize="${javac.memorymax}"
encoding="UTF-8"
@@ -842,16 +842,16 @@
</filterset>
</copy>
- <jar destfile="${build}/jogamp.android-launcher.jar" manifest="${build}/Manifest-android-launcher.temp">
+ <jar destfile="${build}/jogamp-android-launcher.jar" manifest="${build}/Manifest-android-launcher.temp">
<fileset dir="${classes}">
- <include name="${jogamp.android-launcher.classes}" />
+ <include name="${jogamp-android-launcher.classes}" />
</fileset>
</jar>
<aapt.signed
assetsdir="resources/assets-launcher"
jarbuilddir="${build}"
- jarbasename="jogamp.android-launcher"
+ jarbasename="jogamp-android-launcher"
nativebuilddir="${build}"
nativebasename="non-existing"
androidmanifest.path="resources/android/AndroidManifest-Launcher.xml"