Hello Guest

Self-Contained (native) LWJGL Application example

  • 1 Replies
  • 3481 Views
Self-Contained (native) LWJGL Application example
« on: July 06, 2017, 04:39:10 »
I finally got around to figuring out how to get this working, so thought I'd share and save people some trouble: https://gitlab.com/charles-mulic/lwjgl-self-contained-app

What is it? It is a way to build native distributions for various platforms (though I believe you need to run this on the platform you want to build for, I've only tested .exe and .exe installer for Windows).

This means your end users will not need Java installed on their machines, as your distribution comes with its own private runtime. There are both benefits and drawbacks to this--for example, you have complete control over the Java version that your game will run on, but your distributions become large even for the simplest game since it will include a JRE.

I tried to make the bare minimum project to show that it works. You could easily adapt the contents of the batch scripts for other platforms.

Re: Self-Contained (native) LWJGL Application example
« Reply #1 on: July 06, 2017, 08:27:53 »
I followed this up with a Gradle version: https://gitlab.com/charles-mulic/lwjgl-self-contained-app-gradle

Once you clone that, you can type: "gradle buildDist" at the console, and it will produce the same results as the first project. It is a bit cleaner.
« Last Edit: July 06, 2017, 12:37:58 by cilution »