Closed Berstanio closed 2 years ago
This would be probably a very breaking change since everyone that relies on jnigen for ios would need to change their robovm.xml file. (except they rely on the generated robovm.xml file)
Is this just for users compiling projects via jnigen, or for users consuming them? Is there any change required for the average libgdx user who just used gdx-setup to depend on libgdx and some plugins such as gdx-freetype?
Could this solution vary between depended on projects? If libgdx switches to this, can the user continue to depend on another library which uses the legacy method?
Is this just for users compiling projects via jnigen, or for users consuming them? Is there any change required for the average libgdx user who just used gdx-setup to depend on libgdx and some plugins such as gdx-freetype?
No, the change is only relevant for compiling. After that the right robovm.xml is packed inside the jar. The only change the average libgdx user would need to do is updating to the newest MobiVM version 2.3.15.
Could this solution vary between depended on projects? If libgdx switches to this, can the user continue to depend on another library which uses the legacy method?
Yes, that should be possible! It's only a change in compiling and generating the packed robovm.xml.
I created a libGDX branch that shows what changes would need to be implemented on libGDX side to support this. https://github.com/Berstanio/libgdx/tree/m1-simulator But as it looks like Apple has broken OpenGL ES for the arm64 simulators for iOS 14+, so in this form it can't be really tested. For testing I made another branch based on my metalange branch. https://github.com/Berstanio/libgdx/tree/metalangle-m1
Updated it and it now works with the new robovm xml generation!
Merged!
Great! Should I open the related pr in libgdx for adjusting to the new changes? Or should this be done when the jnigen version is increased? @PokeMMO
I'd suggest to open the PR as a draft, using the snapshot to test.
Hey, this pr should add support for arm64 simulators. It relies on a patch in mobivm which is currently not in a release version (https://github.com/MobiVM/robovm/commit/a751e3fd344dafdb2c296fb12e7bb6a4a49c304e) An example of how the static xcframeworks can be integrated with the robovm.xml can be found in the "JnigenIOSJarTask.java" class. This would be probably a very breaking change since everyone that relies on jnigen for ios would need to change their robovm.xml file. (except they rely on the generated robovm.xml file)
Any comments or ideas about what could be done better are welcome! I would understand if these changes are to breaking, but I wouldn't really know a less breaking solution.