aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/os
Commit message (Collapse)AuthorAgeFilesLines
* Add support for armhf/gnueabihf resulting in new 'os.and.arch' := [ ↵Sven Gothel2012-03-281-35/+84
| | | | | | | | | | | | | | | | 'android-armv7hf' and 'linux-armv7hf' ] - Platform gets new ABIType [ GENERIC, ARMEL, ARMHF ] - Platform impl. needs to guess ABIType in case of ARM, since no Java system property ('os.arch' ..) reflects the new EABI. I consider this a bug, since this will also hinder JNLP to work. The latter also uses 'os.arch' sys property to determine the nativelib resource! (See Platform.guessABITypeImpl(..) for details how we guess the type.) - Adding symbolic links to ubuntu's gnueabihf cross tool chain - Adding armhf crossbuild script
* To help analyzing Bug 566, we allow overwriting the 'workaround' with sys ↵Sven Gothel2012-03-271-1/+5
| | | | prop -Djogamp.debug.NativeLibrary.UseCurrentThreadLibLoader
* Platform: Add AWT_AVAILABLE 'knowledge'; RunnableExecutor: Add AWTEDT impl. ↵Sven Gothel2012-03-263-0/+40
| | | | / API doc cleanup; DynamicLibraryBundle: Add getDefaultRunnableExecutor()
* DynamicLibraryBundle*: Allow DynamicLibraryBundleInfo impl. to designate a ↵Sven Gothel2012-03-262-2/+8
| | | | | | | | | | | | thread to load native libraries. (Fix Bug 566) Due to requirements of native libraries using tls_model("global-dynamic") a thread can be designated to load the 'tool' native libraries. In case the tool lib uses tls_model("global-dynamic"), an implementation shall try to let the early most thread load it. For example, AWT-EDT shall load Mesa8 (Ubuntu-TLS) libGL.so.1
* Minor edits: Fix API doc / Remove Thread.dumpStack()Sven Gothel2012-03-221-1/+0
|
* Add 'asset' URLConnection; IOUtil uses URLConnection / incr. effeciency; ↵Sven Gothel2012-03-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* SecurityUtil: Generalize cert validation and AccessControlContext query; ↵Sven Gothel2012-03-131-2/+2
| | | | | | | | | | | | | | | | | | PropertyAccess: Fix security code, grant access to common 'trusted' properties - SecurityUtil - Generalize cert validation for JAR and property access - Grant access to common AccessControlContext for 'same' cert - PropertyAccess: - Fix security code: Passing the current AccessControlContext from the caller didn't include priviledges. - Grant access to common 'trusted' properties, which removes the need of passing the AccessControlContext for general properties like 'jnlp.', 'jogamp.' .. - Enable registering 'trusted' properties, when caller's cert is 'same'
* Intro.: PropertyAccess ; Added safe PropertyAccess for JNILibLoaderBase, ↵Sven Gothel2012-03-131-6/+2
| | | | | | | | | | | | | | | | | Platform, IOUtil, .. - Intro.: PropertyAccess - Base class of all Debug impl, reduces redundancies. - jnlpAlias'ed trusted property is queried within local AccessControlContext to avoid 'JRE' implementation differences (should not be required). - throw NPE and IllegalArgumentException for invalid property key - Added safe PropertyAccess - JNILibLoaderBase: sun.jnlp.applet.launcher - Platform: jogamp.gluegen.UseTempJarCache - IOUtil: java.io.tmpdir
* Fix ARM gluegen-rt-natives-linux-"amdv7, amdv5".jar name lookup typo.Xerxes Rånby2012-02-181-4/+4
| | | | Signed-off-by: Xerxes Rånby <[email protected]>
* Platform: Add Java VersionNumberSven Gothel2012-02-131-2/+11
|
* DynamicLibraryBundle (enhancement)Sven Gothel2012-02-124-30/+31
| | | | | | | - 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
* Further fix for bug 537 - Catch IllegalArgumentException in ↵Sven Gothel2012-01-051-17/+13
| | | | Platform.loadGlueGenRTImpl(), Reuse JarUtil (same methodology) to determine whether we run from JarURL
* Fix JAR cache to allow running from class filesWade Walker2011-12-291-1/+17
| | | | | | | If the Platform class is coming from a .class file (instead of from a JAR), disables use of the temp JAR cache. This allows apps to run against JOGL class files as well as JAR files, which is useful when running from within an IDE like Eclipse.
* Fix regression of commit b669435d277a10e6163034aba286ecccce013f69, which ↵Sven Gothel2011-12-181-7/+14
| | | | removed the lib-base-name search for OSX
* NativeLibrary DEBUG: stack trace @ close()Sven Gothel2011-12-011-0/+1
|
* TempJarCache/JNILibLoaderBase: Identify the Jar files by their URL within ↵Sven Gothel2011-12-011-2/+1
| | | | our lifecycle. JarFile's hash almost always differs.
* Minor edits / Put gluegen-rt 'libBaseName' static.Sven Gothel2011-12-011-10/+10
|
* DynamicLibraryBundle/NativeLibrary: Add destroy() to bundle, causing ↵Sven Gothel2011-12-012-11/+42
| | | | unloading of native library.
* JarUtil: Improve Robustness (Bug 522) and API doc, prepare for Jar-In-Jar. ↵Sven Gothel2011-11-291-3/+3
| | | | | | | | Add unit test. Misc.: - IOUtil: Add toURL* methods - TempJarCache: Add 'URL getResource(String)'
* Platform: Add 'getCurrentSleepJitter()'Sven Gothel2011-11-081-1/+26
|
* Platform: Add OS_VERSION_NUMBER / getOSVersionNumber()Sven Gothel2011-10-261-1/+10
|
* MachineDescriptor Static: Add Mac-OsX 32bit gcc4 special case with ↵Sven Gothel2011-10-241-1/+7
| | | | sizeof(long double) == 8
* Don't default to USE_TEMP_JAR_CACHE:=true on AndroidSven Gothel2011-09-281-2/+3
|
* NativeLib: Fix OSX lib name detection; JarUtil extract: at copy entry, mkdir ↵Sven Gothel2011-09-241-2/+2
| | | | of parent if !exist
* Add boolean system property 'jogamp.gluegen.UseTempJarCache', defaults to ↵Sven Gothel2011-09-231-4/+18
| | | | 'true' - allowing to disable usage of TempJarCache.
* Moved JVMUtil to private package; Invoke JVMUtil.initSingleton() from ↵Sven Gothel2011-09-231-0/+2
| | | | Platform static init after loading native library.
* TempJarCache/JNILibLoaderBase: Validate the to be loader JarFile's ↵Sven Gothel2011-09-231-14/+11
| | | | Certificates if caller has any. Add Convenient JNILibLoaderBase.addNativeJarLibs(..) method.
* gluegen-rt lib loading: Moved to Platform static init incl. ↵Sven Gothel2011-09-222-22/+40
| | | | | | | | | | | | | | | | 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-212-4/+4
| | | | | | | | 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-14/+3
|
* Enhancement/GenericStyle:Sven Gothel2011-09-192-28/+162
| | | | | | | | | | | | | | | | | | - NativeLibrary: - add isValidNativeLibraryName(..) - generic style - Platform - add getOSAndArch(), getOSAndArch(..) - IOUtil - add getClassFileName(..) - add getBasename(..) - add getDirname(..) - added doc - ReflectionUtil - generic style
* DynamicLibraryBundle*: Use generics for better spec / Drop Iterator in favor ↵Sven Gothel2011-08-312-34/+26
| | | | for int/size() for less temp objects
* DynamicLibraryBundleInfo: Allow impl. to select tool/system lookupSven Gothel2011-08-092-8/+34
|
* aapt build check fix ; DynamicLibraryBundle.isGlueLibComplete() == true if ↵Sven Gothel2011-08-051-3/+16
| | | | | | | | | | | | | last entry is loaded aapt build check fix - exe aapt if source are newer than apk DynamicLibraryBundle.isGlueLibComplete() == true if last entry is loaded - fix long standing bug, where GlueLib was not complete if preload dependencies were missing. this even lead to JOGL specific handling of this case .. duh. - added debug info
* Hide DynamicLinker impl.; Remove public AndroidPackageUtil ; ↵Sven Gothel2011-08-035-205/+5
| | | | | | | GluegenVersionActivity uses ApplicationContext Hide DynamicLinker impl.: - com.jogamp.common.os.*DynamicLinkerImpl -> jogamp.common.os
* Platform getArch() -> getArchName() (analogue to getOSName())Sven Gothel2011-07-281-1/+1
|
* Fix Android apk activity; Add apk VersionName; Add jar manifest to apkSven Gothel2011-07-281-2/+0
| | | | | | | | | | | | | | | | - 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
* Cross JUnit Tests - All Passed: Android+Linux armv7Sven Gothel2011-07-251-1/+1
| | | | | | | | | | | - junit.cross targets: - use scripting to save time, ie write all target commands to script, xfer, exec - junit: delete result folder just before junit.run - Test BuildEnvironment.java: Simplify path config via properties (for android) - AndroidVersion: No annoying exception dump if Build$VERSION* is not found (not android) - launch scripts: use absolute TARGET_ROOT path for dynamic linker env.
* Android integration / cross-test ; Enhance PlatformSven Gothel2011-07-242-6/+128
| | | | | | | | | | | - 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 ?)
* Fix regression (commit f733203dfbd034a6b1aa3eb2cd616437c982c435): Init of ↵Sven Gothel2011-07-221-2/+3
| | | | DEBUG and DEBUG_LOOKUP was removed, re-added.
* GlueGen proper size / alignment of primitive and compound types usage [2/2] ↵Sven Gothel2011-07-212-151/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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-202-43/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-24/+6
| | | | | | | | | | - 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-173-140/+403
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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, ..
* Merged Locator -> IOUtil; int Platform.getPageSize(); Added unit test for ↵Sven Gothel2011-06-081-3/+15
| | | | IOUtil and Platform's page size
* Platform: Add getPageSize()Sven Gothel2011-06-071-0/+7
|
* DoubleCheckLocking: Added 'ok' comment - volatile varSven Gothel2011-02-261-1/+1
|
* RecursiveLock: static field -> final; NativeLibrary: cleanupSven Gothel2011-02-261-6/+5
|
* debug: mention thread nameSven Gothel2010-12-171-1/+2
|
* Fix refactor bug: os -> os_lc in strings, reverted.Sven Gothel2010-12-151-7/+7
|