Login  Register

Re: Packaging JOGL projects to be cross-platform?

Posted by KevinWorkman on Jan 22, 2014; 11:19pm
URL: https://forum.jogamp.org/Packaging-JOGL-projects-to-be-cross-platform-tp4031261p4031292.html

Compared to using JarSplice (and the jar I just put together that contains the JOGL natives and other Processing-centric libraries), I would say that ant is much more complicated, especially for beginners who are accustomed to just pressing a play button and seeing their code work.

Processing is great because it lets novices and non-programmers see their code in action very easily, but how much they hide makes it much harder to deal with deployment. Most users don't even know they're using JOGL (I had to look it up) or native libraries, which is made doubly worse by the fact that Processing only exports the natives for the current system (so compiling on Windows means Mac users can't use your program). I think I finally have it all figured out and I've come up with a workaround (packaging all of the JOGL natives into a single jar and telling the kids to add that to JarSplice), thanks to you guys.

The nice thing about JarSplice is that it automatically extracts the natives from the fat jar to a temp directory before running the actual program, then deletes them when the program exits. I gather that JOGL does something very similar, but JarSplice is a nice one-size-fits-all solution for people who are using natives other than the JOGL ones. It makes it easier for me to tell everyone to use JarSplice than it would be to write specific instructions for each library kids might be using.

That being said, I am flirting with the idea of creating my own GUI that takes as input a set of Jars, external files, natives, etc. and exports a runnable jar and packaged executables, maybe by using JWrapper, and maybe using ant internally. That's a bit down the road though, as right now I'm just trying to come up with general workarounds now that Java update 51 has made applets and webstarts less of an option.

I'm still figuring all of this out as I go, so I'm very open to suggestions!