This brings VTK 9.1 and JOGL 2.4 for Windows, Linux, macOS+Intel and macOS+M1. The nice thing is that the platform is detected automatically and there is no boring path definition to provide.
Unpacking and loading native libraries requires this line at the beginning of a program
There is still room for improvement as partially discussed in the issue list. The project allowing to build such jars is here. Helpers on how to build for Java can be found here, with links to existing builds.
@Martin3d I cannot tell how THRILLED I am to see something like this.
Question: we have some patches on top of VTK that we have to expose some addition API to the wrappers - is it possible for me to run this process myself of building the Java jars so I can patch those files first? (I am just seeing this at the end of the day and haven’t had a chance to read through all your links). Regardless GREAT JOB - do you have plans to do the same for 9.2?
The readme explain well how to proceed step by step. To summarize you should simply extract all your native libs in src/main/resources folder of each target platform and then run the usual mvn install to get them all.
I should warn you that I noticed a platform selection issue with macOS M1 builds (you will find a ticket about it on the GitHub repo). Feel free to mention other issue on GitHub.
Following Sebastien’s comment, I think this should be integrated into Kitware CI to consistently build all upcoming version : the 9.1 build come from compilations I did separately on several OS and I would not like to this twice
@Martin3d yes I see that now - so still a manual build process (which we are doing anyway because of the patch) but your project jars everything up into the maven deliverable (Java+natives) which is a piece we have been missing! Very much looking forward to playing with this tomorrow!
I built it myself. It is just a patch of the previous release where I appended the OpenGL java binding for macOS M1. The procedure I followed should be provided on the links I sent if you prefer to do it by yourself.
@Martin3d hey Martin one more question (I hope) - when loading the native libs when I run (under Eclipse if that matters), it is attempting to look for dependent libraries relative to @rpath, and not finding the necessary files. Have you run into this, and if so, is there a way to get around it? I fear I may have to rebuild VTK with a flag flipped or something.
Sorry I missed this.
The platform handler defines the list of libraries that are loaded in order so maybe you provided libraries that depend on a library that is not this list?
Once you identified it, you should mention it in all platform handlers
Marcel added Python scripts that may be useful to get the dependencies in order. I did not use them so I am interested by your feedback on it if you are packaging other VTK versions than 9.1.