| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
null in case no sub-directory is desired
|
|
|
|
| |
'totalNumBytes' argument, since we have no user-feedback callback passed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current build system for JogAmp iOS Build is:
- Build Machine: OSX Mojave 10.14
- Using own (still proprietary) OpenJDK 9 iOS Build
- OpenJDK 1.8 (This will be replaced by OpenJDK 11 soon)
- Xcode 10.2
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Uri to handle relative path
Fix IOUtil.cleanPathString(..) special case:
Special case '/a/./../b' -> '/b'
requires to resolve './' before '../'.
Allow IOUtil and Uri to handle relative path:
- IOUtil.getParentOf(..)
- IOUtil.cleanPathString(..)
Handle cases:
'a/./../b' -> 'b'
'.././b' -> '../b'
- Uri: Handle null scheme
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Uri:
- Add error correction (fix) of path at ctor
in case a a contained Uri is requested from an opaque one.
The latter might come from URI/URL and is not properly encoded!
See Uri.PARSE_HINT_FIX_PATH
- Simplify conversion methods:
- valueOf(URI/URL): Re-encode only if not opaque
- getNativeFilePath() -> toFile()
- Move IOUtil Uri related constants to class Uri
- Add DEBUG and DEBUG_SHOWFIX
- Complete adoption of URI -> Uri changes
- IOUtil, JarUtil and TempJarCache still holds some
left over deprecated methods, which will be removed
after officially starting 2.3.0 (JOGL dependencies)
- Otherwise not URI utilization left
- Tests
- Cleaned ip TestUri01 and TestUri03Resolving
- TestUri03Resolving also tests URL -> Uri,
and hence mentioned Uri.PARSE_HINT_FIX_PATH
|
|
|
|
|
|
|
|
|
|
|
|
| |
differentiating encoded/decoded variants by type [Part 1]
- Add immutable com.jogamp.common.net.Uri class impl. RFC 2396 w/ encoding of RFC 3986
- Class Uri.Encoded is used to represent encoded parts
- IOUtil: Remove unused methods (residing in Uri) and mark others deprecated (will move to Uri)
- Adopt usage of Uri: This must be completet in follow-up commits!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
used properly (Added unit test)
Bug 908 was caused by confusing URI encoded parts (e.g. scheme-specific-part) and it's decoded variant.
This especially happened due to:
- the fact, that the encoded and unencoded variant uses the same String type,
- the URI/URL decoding differs, is not complete (e.g. %20 .. SPACE remains in decoded part),
- and does not comply w/ RFC 2396 and RFC 3986 (encoding), e.g. not all RESERVED chars are encoded.
In branch 'v2.3.0_branch', we will introduce our own Uri and Uri.Encoded class
to solve above issue by replacing all URI usage w/ Uri.
- Backporting results of own Uri class introduction in branch 'v2.3.0_branch'
- Ensure the encoded URI parts are used where required, i.e. IOUtil.compose(..) etc
- TestNetIOURIReservedCharsBug908: Automated test, launching GlueGen jar file from an <i>odd pathname</i>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IOUtil.decodeURIToFilePath(..) for native usage.
Refine comments, API doc.
toURL(..): Apply space conversion, decodeFromURI(..), on file-scheme path,
ensuring decoded space.
++
Add decodeURIToFilePath(String uriPath) and decodeURIToFilePath(URI uri)
Both methods shall simplify decoding a file-URI for native platform usage.
Tested in TestIOUtilURIHandling
+++
|
|
|
|
| |
JarUtil.getJarEntry(..)
|
| |
|
| |
|
|
|
|
| |
and resource name (Remove Ubuntu fonts from jogl-all.jar, provide it separately to reduce footprint for the masses.)
|
|
|
|
|
|
|
|
|
| |
on 'PluginProcess.app'
- IOUtil.getTempDir(..): Don't test executable caps on OSX for java_io_tmpdir
- JarUtil.extract(..): Issue native fixNativeLibAttribs(..) on OSX for native library files,
i.e. remove xattr 'com.apple.quarantine'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Netbeans's JarURLStreamHandler
- 'URL IOUtil.toURL(URI)'
- Needs to encode the file-path portion on Windows(*) if exists.
The file-path here shall only be encoded as follows:
- backslash -> slash
- ensure starting with slash
(*) We perform above action for all OS,
if 'false == File.separator.equals("/")'
- Added high verbosity in DEBUG mode to easy debugging
for future cases ..
- Cleanup URI/URL unit tests, i.e. split URLCompositionTest into:
- TestIOUtilURICompose
- TestIOUtilURIHandling (Now covers Bug 857 as well)
- TestUrisWithAssetHandler
- TestURIQueryProps
Tested all unit tests manually on GNU/Linux and Windows w/ JRE 7u45
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
when compiling new URI.
Add IOUtil:
- String encodeToURI(String)
- String decodeFromURI(String)
Both only handle escaping of SPACE only. Determine whether other chars need to be treated.
|
|
|
|
| |
IOUtil.toURL(..) handle exception at 'new File(uri)'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'os.and.arch' libraries]
JNILibLoaderBase.addNativeJarLibsImpl(..):
If the modules's jar file contains the folder 'natives/<os.and.arch>/'
we assume a big-fat jar and attempt to load all native libraries from the same.
The test for above folder is performed via the class ClassLoader's getResource(..)
and is considered inexpensive.
If the folder exists and native libraries could be loaded, the method returns successfull.
Otherwise, the 'slim' jar file is attempted to be loaded, even if such folder exist.
|
|
|
|
| |
native URI root and jar file.
|
|
|
|
|
|
|
|
|
| |
TempJarCache.bootstrapNativeLib(), allowing versatile use of 1st native jar file (big-java-jar w/ big-native-jar)
The remaining Platform dependency existed in IOUtil.copyStream2Stream(..), used by JarUtil.extract(..),
i.e. the MachineDescription's PAGE_SIZE.
Solved by using a const buffer size of 4096 bytes.
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compatible w/ file scheme.
Regression of (Bug 683, Commit b98825eb7cfb61aead4a7dff57471cd2d2c26823).
The URI encoded path cannot be read by File I/O (if file scheme), since the latter
requests an UTF8/16 name, not an URI encoded name (i.e. %20 for space).
The encoded URL is produced if calling 'uri.toURL()' and hence
the new 'IOUtil.toURL(URI)' provides a custom conversion recovering the UTF name via 'new File(uri).getPath()'.
Tested w/
- synthetic URI/URL coposition (unit test)
- manual w/ moving 'build' to 'build öä lala' for gluegen, joal and jogl.
+++
Misc.:
- 'URI JarUtil.getURIDirname(URI)' -> 'URI IOUtil.getDirname(URI)'
++
|
|
|
|
| |
to remove DNS Lookups etc ..
|
|
|
|
| |
duplicate processing of strings etc.
|
| |
|
|
|
|
|
|
|
|
| |
Added the ability for users to set a "resolver" in JarUtil
that lets it find resources that are loaded by a custom classloader.
This is needed in OSGi apps (like Eclipse RCP apps), since OSGi
resources do not have simple jar: URLs (they use a custom
protocol called bundleresource:).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
+++
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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'
|
|
|
|
| |
Platform.loadGlueGenRTImpl(), Reuse JarUtil (same methodology) to determine whether we run from JarURL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(eg. Eclipse 'rsrc:' case)
- Use ':' as 'path' delimiter in case no path via '/' is given.
+++
Manual tested w/ Eclipse:
Preparations:
===============
1) Set up a vanilla eclipse (3.7.0) workspace
2) Add the JOGL User Library:
- Window.Preference
- Java.Build_Path.User_Libraries:
+ JOGL
+ gluegen-rt.jar
+ jogl.all.jar
+ gluegen-rt-natives-linux-amd64.jar
+ jogl-all-natives-linux-amd64.jar
You may add all other native JARs here.
Note that these are not required in the CLASSPATH by JOGL,
however, they are required by Eclipse to export your project as a Runnable JAR File.
3) New test project
- Right-click your project in the Package Explorer and click "Properties".
- Select "Java Build Path" and click the "Libraries" tab.
+ JOGL
- Add some simple code ..
- Run as Java Application ..
Test-1:
=========
Export
- Right-click your project in the Package Explorer and click "Export"
- Select Java.Runnable_JAR_file
+ Launch configuration
+ some destination path
+ Library handling:
Copy required libraries into a sub-folder next to the generated JAR
Result: Works!
./lala01.jar
./lala01_lib/jogl.all.jar
./lala01_lib/jogl-all-natives-linux-amd64.jar
./lala01_lib/... etc ..
Test-2:
=========
Export
- Right-click your project in the Package Explorer and click "Export"
- Select Java.Runnable_JAR_file
+ Launch configuration
+ some destination path
+ Library handling:
Package required libraries into generated JAR
Result: Works!
./lala02.jar:
Manifest-Version: 1.0
Rsrc-Class-Path: ./ gluegen-rt-natives-linux-amd64.jar gluegen-rt.jar
jogl-all-natives-linux-amd64.jar jogl.all.jar
Class-Path: .
Rsrc-Main-Class: Test01
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
|
|
|
|
|
|
|
|
| |
Add unit test.
Misc.:
- IOUtil: Add toURL* methods
- TempJarCache: Add 'URL getResource(String)'
|
|
|
|
| |
of parent if !exist
|
| |
|
|
|
|
| |
Certificates if caller has any. Add Convenient JNILibLoaderBase.addNativeJarLibs(..) method.
|
|
|
|
|
|
| |
- JNILibLoaderBase: If TempJarCache is active, try find native library in cached JARs
- TempJarCache: Add bootstrabNativeLib(..) allowing bootstraping gluegen-rt from JAR w/o needing it
- JARUtil: minor edits (final)
|
|
JarUtil:
Utility to handle Jar files and it's content, incl. extracting it's entries
TempFileCache:
Utility to have a save temporary file cache per JVM and per instance,
eg. per ClassLoader.
The temp cache is cleaned up with the next usage of TempFileCache,
which solves the troubles of JVM bugs and situations where the JVM
is not able to close and delete open temp files.
TempJarCache:
Utility to cache Jar files temporary (using TempFileCache)
and access it's content.
This class is suitable to implement a URLClassLoader
or similar resource loading facilities.
All tested w/ TestTempJarCache
|