| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
using markdown -> manual/index.md and add conversion recipes + make/scripts/md2html_update.sh
Noyte: Additionally edited 'doc/misc/macos_nativelib_dependencies.md`
to include `Use explicit OpenJDK/Temurin JDK `java` executable path`
as a workaround to pass `DYLD_LIBRARY_PATH` to `/usr/bin/java`.
|
| |
|
|
|
|
| |
TestJCPP and new TestCParser
|
| |
|
| |
|
|
|
|
| |
path in unit test script for library-path
|
|
|
|
| |
intermediate 'Test' for supporting, non-test classes
|
|
|
|
| |
test2 not test1
|
| |
|
|
|
|
|
|
| |
927bbc7160a812bb29c0e7120d4a3009bfb13bbf
Almost done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
added code generation incl. native to Java dispatch and resource management
Tested via Test4JavaCallback.java (using test2.[hc]).
Please read the GlueGen_Mapping.md as well as Test4JavaCallback.java .
+++
Some implementation details:
JavaConfiguration maps JavaCallbackDef to JavaCallback set-function and maintains a list.
JavaCallbackDef itself holds all configured details.
JavaConfiguration also maps JavaCallbackInfo to JavaCallback set-function.
JavaCallbackInfo itself holds all compile time information, as produced by JavaEmitter.beginFunctions(..).
This extends JavaCallbackDef and avoid repetetive computation for the callback-function-type and its MethodBinding,
parameter indices for the callback interface and userParam, etc.
CMethodBindingEmitter: Native callback to Java dispatch
- The JavaCallback setter function creates a native 'UserParam' struct instance,
which holds the callback-interface-jobject, its callback-jmethodID and
the userParam-jobject for invocation of the actual JavaCallback interface method.
- To produce the C-Type -> JNI-Type conversion, An internal CMethodBindingEmitter instance
for the native-callback function binding is created inside the CMethodBindingEmitter of the callback setter method.
It is being used to map the types to JNI within the generated native callback function,
passed to the actual JavaCallback method.
JavaMethodBindingEmitter: Native callback to Java dispatch
- The JavaCallbacl setter passes the callback-interface-object, the userParam-object and the
callback-method-signature (to have the native method retrieve the jmethodID).
- It receives the native pointer of the native `UserParam` struct instance,
which gets mapped to the userParam-object. (*TODO: Refine ownership + release*).
|
|
|
|
| |
See documentation and unit test test2.h, Test2FuncPtr.java and Test3PtrStorage.java
|
| |
|
|
|
|
| |
documentation
|
|
|
|
| |
buffer cache once @ 'releaseVal(..)' code creation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GlueGen Revised Struct Mapping (esp pointer to array or single element), Struct String Charset, .. and Documentation
- Documentation:
- Added README.md
Let's have a proper face for the git repo
- Added doc/GlueGen_Mapping.md (and its html conversion doc/GlueGen_Mapping.html)
Created a new document covering application and implementation details suitable for users/devs.
- Added doc/JogAmpMacOSVersions.md conversion to doc/JogAmpMacOSVersions.html
- Updated www/index.html
- Use *CodeUnit instead of PrintWriter, representing a Java or C code unit covering a set of functions and structs.
The CCodeUnit also handles common code shared by its unit across functions etc.
- Dropping 'static initializer', as its no more required
due to simplified `JVMUtil_NewDirectByteBufferCopy()` variant.
- Revised Struct Mapping:
- Pure Java implementation to map primitive and struct fields within a struct
by utilizing ElementBuffer.
Only 'Function Pointer' fields within a struct require native code.
Exposes `static boolean usesNativeCode()` to query whether native code is used/required.
- Transparent native memory address API
Expose `long getDirectBufferAddress()` and `static TK_Struct derefPointer(long addr)`,
allowing to
- pass the native struct-pointer with native code
- reconstruct the struct from a native struct-pointer
- have a fully functional `TK_Struct.derefPointer(struct.getDirectBufferAddress())` cycle.
- Add 'boolean is<Val>Null() to query whether a pointer (array) is NULL
- *Changed* array get/set method for more flexibility alike `System.arraycopy(src, srcPos, dest, destPos, len)`,
where 'src' is being dropped for the getter and 'dest' is being dropped for the setter
as both objects are reflected by the struct instance.
- *Changed* `get<Val>ArrayLength()` -> `get<Val>ElemCount()` for clarity
- Considering all ConstElemCount values with config 'ReturnedArrayLength <int>'
to be owned by native code -> NativeOwnership -> Not changing the underlying memory region!
JavaOwnership is considered for all pointer-arrays not of NativeOwnership.
Hence any setter on a NativeOwnership pointer-array will fail with non-matching elem-count.
- Add 'release<Val>()' for JavaOwnership pointer-arrays,
allowing to release the Java owned native memory incl. null-ing pointer and set<Val>ElemCount(0).
- Support setter for 'const <type>*' w/ JavaOwnership, i.e. pointer to const value of a primitive or struct,
setter and getter using pointer to array or single element in general.
- Added Config `ImmutableAccess symbol` to disable all setter for whole struct or a field
- Added Config `MaxOneElement symbol` to restrict a pointer to maximum one element and unset
initial value (zero elements)
- Added Config `ReturnsStringOnly symbol` to restrict mapping only to a Java String,
dropping the ByteBuffer variant for 'char'
- String mapping default is UTF-8 and can be read and set via [get|set]Charset(..) per class.
- Dynamic string length retrieval in case no `ReturnedArrayLength` has been configured
has changed from `strlen()` to `strnlen(aptr, max_len)` to be on the safe site.
The maximum length default is 8192 bytes and can be read and set via [get|set]MaxStrnlen(..) per class.
FIXME: strnlen(..) using EOS byte non-functional for non 8-bit codecs like UTF-8, US-ASCII.
This is due to e.g. UTF-16 doesn't use an EOS byte, but interprets it as part of a code point.
- TODO: Perhaps a few more unit tests
- TODO: Allow plain 'int' to be mapped in structs IFF their size is same for all MachineDescriptions used.
Currently this is the case -> 4 bytes like int32_t.
|
| |
|
|\
| |
| | |
Add support for riscv64 architecture
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
This is restricted to the 7z archive only for now,
not yet producing artifacts in a jar folder as joal, jogl and jocl.
This is due to sub-projects referencing gluegen jar files.
A compromise.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
versions
Note that starting with Xcode 14.3, the upcoming 'Minimum Deployment Target' is 10.13 (High Sierra).
However, we are still using Xcode 14.2 and hence 10.7 is still supported.
Note that I upped the 'Minimum Deployment Target' (again) from 10.5 to 10.7
to align with JOAL/openal-soft, i.e. a guaranteed common denominator.
You may still try to use 10.5.
Note lowest tested MacOS version (from myself) is 10.13.6 w/ x86_64) (High Sierra).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MacOSX compiler configuration.
2023-05-04 Actively supported architectures are 'x86_64' and 'arm64'.
XCode 14.2 on a MacOS 12.6.5 x86_64 (mac-mini) machine
is capable to produce fat-lipo code
for MacOS >= 10.5 for 'x86_64' and 'arm64'.
The MacOS SDK 11.3 has been re-added from a previous XCode installation.
However, alternative source is <https://github.com/phracker/MacOSX-SDKs>.
Only for using C++ and hence the C++ STL,
the minimum version is 10.7 due to clang++ libc++.
This is currently the case for JOAL's bundled openal-soft,
as well as for JOGL's optional oculusvr-sdk (disabled).
|
| |
| |
| |
| | |
threads', allowing C++ std::mutex etc to be used (openal-soft)
|
| | |
|
| | |
|
| |
| |
| |
| | |
required by System.load*()
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
native windows dll-names)
Add support for Windows dynamic library target, i.e. NAME.dll instead of libNAME.dll.
This is now required when linking a GLUENAME1.dll to TOOLNAME1.dll,
where GLUENAME1.dll is loaded via System.loadLibrary() and TOOLNAME1.dll required to be found.
Might be a change in the current ming64 toolchain.
Before this change, the library name 'libTOOLNAME1.so' was written into `libGLUENAME1.so`
and hence could not be found (manually renamed to a dll name).
Now we can also drop the manual rename of libNAME1.so -> NAME1.dll, finally :)
|
| |
| |
| |
| | |
keyalg 'RSA', keysize '2048', validity '365', digestalg 'SHA256'
|
| |
| |
| |
| | |
android.api.level' (default: level 24 or 'N')
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
attributes and reuse it.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
PlatformPropsImpl: Remove static OSXVersion and Version* vars, add JAVA_17 and JAVA_21 flag.
PlatformPropsImpl's static OSXVersion is JOGL specific and will be moved into its GLContextImpl.
PlatformPropsImpl's static Version are not required and eats up memory where it can be used transitionary.
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
inclusion/exclusion based on build.dynamiclibs
Exclude *.symbols files implicitly when building 'build.dynamiclibs'
and include *.symbols files implicitly when not building 'build.dynamiclibs' (static libs)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Otherwise the build won't produce dummy junit test results for jenkins etc.
|
| |
|
| |
|
| |
|