First, I'm not really sure where I should be posting this so I just chose General discussions. If this is the wrong place for it, please move it.
I'm trying to perfect my distribution process. I've spent tons of hours working on getting everything just how I want it and I think I'm close to my final goal.
My final goal is to be able to only require a single exe to run my games. However, I'm not sure this will be possible but that's why I've come here.
Currently, I'm using maven in conjunction with the launch4j, shade, and assembly plugin. Currently it works like this: shade plugin builds the executable jar with all dependencies inside it, launch4j plugin takes that executable jar and wraps it in to an exe, then the assembly plugin places the exe and my natives folder in to a single zip folder. I'm fairly happy with this design currently but I'd really like it more if I only had to distribute a single exe and didn't have to worry about users moving the exe and not the natives folder (though I don't think most would do that, but I'd like to take the possibility away entirely).
I'm wondering if it's possible to use launch4j to somehow include the natives folder in such a way that the jar has access to them, but the folder is still inside the exe. This would get around the fact that you cannot load native libraries from within a jar.
Another method I have considered is storing the natives folder in the jar and then when the jar is ran, have it extract the natives to folder to some place like ~/.myapp/natives. This feels like a hacky workaround to me though but if it's a common practice, I'd be open to suggestions on ways to make this method be more robust (should I only do it once? everytime its ran? etc).
If you are interested in seeing how I have my current distribution process setup, you can look at my pom file here: http://pastebin.com/fQtCWdwG
and the dist.xml the assembly plugin uses here: http://pastebin.com/kh10MrFE