aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common/os
Commit message (Collapse)AuthorAgeFilesLines
* Add 'asset' URLConnection; IOUtil uses URLConnection / incr. effeciency; ↵Sven Gothel2012-03-172-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android ClassLoaderUtil cleanup; - Add 'asset' URLConnection - Please read API doc 'PiggybackURLConnection' and 'AssetURLConnection' - Solves generic resource handling where platform locations may differ, ie ClassLoader lookup on Android in the 'assets/' subfolder. - New Android 'AssetDexClassLoader' uses 'assets/' folder for findResource(..) - aapt.signed (our APK ant task) - uses 'assets/' folder - adds the 'assetsdir' attribute allowing to copy other assets into the APK - IOUtil uses URLConnection / incr. effeciency - using URLConnection on all getResource(..) since URL is connected anyways for validation and URLConnection can be used by caller right away - String getRelativeOf(URL, String) -> URL getRelativeOf(URL, String) - preserves scheme, authority, etc - simple parentOf handling, more efficient - reusing new 'asset' protocol impl. - Android ClassLoaderUtil cleanup; - Use createClassLoader(..) impl for build-in static jogamp and user APKs, which removes code redundancy Tests: New code path, especially 'assets' are covered by new unit tests, no regressions on Linux.
* DynamicLibraryBundle (enhancement)Sven Gothel2012-02-123-19/+22
| | | | | | | - Hold DEBUG, DEBUG_LOOKUP in DynamicLookupHelper - Tool complete only if named tool's GetProcAddressFunc is avail - Allow no tool/glue lib's - Use DEBUG_LOCKUP for lockup symbol trace
* MachineDescriptor Static: Add Mac-OsX 32bit gcc4 special case with ↵Sven Gothel2011-10-241-0/+2
| | | | sizeof(long double) == 8
* gluegen-rt lib loading: Moved to Platform static init incl. ↵Sven Gothel2011-09-221-4/+23
| | | | | | | | | | | | | | | | TempJarCache.bootstrapNativeLib(..) usage - Moving to Platform solves former interdependencies between GlueGenJNILibLoader/Platform - TempJarCache is being setup w/ bootstraping the gluegen-rt native lib jar file. Interesting here is that when using Oracle's JRE w/ Applets/JNLP the current dbg output is: gluegen-rt: url-root http://risa/deployment/test/jau02s/jar/ gluegen-rt: nativeJarURL jar:http://risa/deployment/test/jau02s/jar/gluegen-rt-natives-linux-amd64.jar!/ gluegen-rt: nativeJar /home/sven/.java/deployment/cache/6.0/49/3c6d1e31-2c90f42e IE the JRE implementation already deduces the online link to the Applet/JNLP cache. This makes the implementation much simpler, ie. same for application and Applets/JNLP. Have to verify w/ other Java impl. sure - and add same logic for the JOGL part.
* Unify JNI Library Loading into JNILibLoaderBase and use it for the ↵Sven Gothel2011-09-211-2/+2
| | | | | | | | gluegen-rt native lib as well - removed redundance - move proper JNLPAppletLauncher custom libloader code into JNILibLoaderBase - prepares for new JAR temp cache ..
* Remove redundant: NativeLibrary.ensureNativeLibLoaded()Sven Gothel2011-09-201-1/+2
|
* Fix Bug 510 w/ Wade Walker's proposal. However, the EGL global lookup ↵Sven Gothel2011-08-221-2/+6
| | | | setting will be changed in JOGL as well
* Android: Extract static context holderSven Gothel2011-08-063-11/+50
|
* Hide DynamicLinker impl.; Remove public AndroidPackageUtil ; ↵Sven Gothel2011-08-034-2/+212
| | | | | | | GluegenVersionActivity uses ApplicationContext Hide DynamicLinker impl.: - com.jogamp.common.os.*DynamicLinkerImpl -> jogamp.common.os
* Fix Android apk activity; Add apk VersionName; Add jar manifest to apkSven Gothel2011-07-284-1/+216
| | | | | | | | | | | | | | | | - build: - exclude android packages if !isAndroid - aapt: - Use individual AndroidManifest xml files - optional: incl. our JAR manifest file to support detailed version info - use def. GluegenVersionActivity - APK VersionName: Retrieve and show - package/extension names: - gluegen.jar/apk: com.jogamp.gluegen - gluegen-rt.jar/apk: com.jogamp.common
* Android: Remove native (fake) detectionSven Gothel2011-07-241-11/+0
|
* Android integration / cross-test ; Enhance PlatformSven Gothel2011-07-241-0/+12
| | | | | | | | | | | - android minor build fix - started dex'ing (gluegen-rt.apk, more to come for full junit tests) - android remote dalvikvm launch works (crosstest-java-android-armv7-rel.sh) - android detection, incl version (reflection) - Platform: - Add JAVA_VM_NAME and JAVA_VM_RUNIME - OSType maybe ANDROID, where the OS name (String) is Linux ! (ok ?)
* GlueGen proper size / alignment of primitive and compound types usage [2/2] ↵Sven Gothel2011-07-211-31/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | - Fin MachineDesction == MD MD.StaticConfig: - enum for all supported static configs (ID -> MD) - verified at runtime: test runtime queried-MD versus static-MD, hard fail if not compatible (size/alignment) SizeThunk primitive sizes: - Add notion of fixed native size (eg. int64_t) and otherwise (eg. long) java struct 'wrappers' code generation: - single class using size/offset arrays of all MachineDescription configurations - at runtime the array idx is queried in static block - type aligment for not fixed-native-size types (SizeThunk, undef long/int) via StructAccessor junit test: - add float test - fix native code - add java (create, write) -> native (verify) test works (tested) on: linux 32/64 and windows 32/64
* Cleanup: Platform CPU enum, MachineDescription,Sven Gothel2011-07-203-138/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Platform: - enum CPUFamily is part of CPUType - DALVIK -> ANDROID - ARM: ARM + ARMv[567] MachineDescription - self contained - static size/alignment Config (enum) for unix32, unix64, win32, win64 and armeabi - add 'long double' - Removed MachineDescription32Bit, MachineDescription64Bit - createStatic(..) uses OS/CPU to fetch best match if not at runtime FIXES: JavaEmitter's struct-emit: Proper 32/64 struct sizes TODO: StructAccessor's mapping to <Type>Buffer w/ index os sizeof(<Type>) doesn't work, since offset may not be multiple of sizeof(<Type>)! i.e. typedef struct { int8_t bits1; // +1 - 0 // +3 (p32) int32_t id; // +4 - 4 int8_t bits2; // +1 - 8 // +3 (p32) - int64_t long0; // +8 - 12 so "longBuffer.get(<type-sized index>)" is invalid, but "byteBuffer.getLong(<byte index>)" must be done. The actual impl. doesn't matter, hence dropping the other nio type mappings is good.
* GlueGen: Alignment Cleanup ..Sven Gothel2011-07-173-16/+12
| | | | | | | | | | - SizeThunk - rename: compute -> computeSize - add: computeAlignment - merge types: char -> int8, short -> int16 - 'int' and 'long' may differ -
* GlueGen proper size / alignment of primitive and compound types usage [1/2] ↵Sven Gothel2011-07-171-0/+120
| | | | | | | - Preparation. Fix commit f733203dfbd034a6b1aa3eb2cd616437c982c435, adding missing file src/java/jogamp/common/os/MachineDescriptionRuntime.java
* GlueGen proper size / alignment of primitive and compound types usage [1/2] ↵Sven Gothel2011-07-172-0/+122
- Preparation. Currently GlueGen fails for type long (size) and some alignments (see package.html). - The size and alignment values shall be queried at runtime. - Compound alignment needs to follow the described natural alignment (also @runtime). - - Build - add Linux Arm7 (EABI) - junit test - added compound/struct tests, pointing out the shortcomings of current impl. - package.html - Added alignment documentation - remove intptr.cfg - add GluGen types int8_t, int16_t, uint8_t, uint16_t - move MachineDescription* into runtime - Platform - has runtime MachineDescription - moved size, .. to MachineDescription - use enums for OSType, CPUArch and CPUType defined by os.name/os.arch, triggering exception if os/arch is not supported. This avoids Java String comparison and conscious os/arch detection. - MachineDescription: - compile time instances MachineDescription32Bits, MachineDescription64Bits - runtime queried instance MachineDescriptionRuntime - correct size, alignment, page size, ..