LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: 8Observer8 on April 07, 2019, 08:39:57

Title: I need a tool for distributing LWJGL3 applications
Post by: 8Observer8 on April 07, 2019, 08:39:57
Hello,

I need a tool that will create executable files (.exe for Windows, .app for macOS, and executable file for Linux, for example: ".sh"). I want to make builds from Window for three OS.

I tried JarSplice. But this tool has problems with LWJGL3.

First problem. For example, if you want to create .exe you need to add these two JARs:

But these JARs contains the same files:

JarSplice shows the error message:
Quote
duplicate entry: glfw.dll.sha1

I solved this problem. I deleted duplicate files (for example, glfw.dll.sha1) from lwjgl-glfw.jar and another JARs. Windows build works correctly. Please, try on your computer with Windows: TheQuad_Windows.zip (https://dl.dropboxusercontent.com/s/6n2gv1klm1pi3st/TheQuad_Windows.zip)

Second problem (Linux). JarSplice creates the .sh file with CRLF but Linux requires LF. You can run the build on Linux: TheQuad_Linux.zip (https://dl.dropboxusercontent.com/s/j1ahmcdqielq64f/TheQuad_Linux.zip) But you need manually to delete CR on Linux at the beginning of the .sh file. I tried to replace CRLF with LF, please, try it on your computer with Linux: TheQuad_Linux.zip (https://dl.dropboxusercontent.com/s/iig1tjk3xttd37i/TheQuad_Linux.zip)

Third problem (macOS). JarSplice creates an executable file that does not work on macOS. Please, try to run: TheQuad_macOS.zip (https://dl.dropboxusercontent.com/s/ykqu16n3kse9prr/TheQuad_macOS.zip)
Title: Re: I need a tool for distributing LWJGL3 applications
Post by: 8Observer8 on April 09, 2019, 14:06:39
I did not find a crass-platforms soliton for Lwjgl3 for creating standalone executables from Windows for Linux and macOS. I decided to use WebGL/TypeScript because it allow to study OpenGL and create cross-platform solutions very simple. I write code only once and it works everywhere. But browser has some restrictions. Another solution is Unity. Unity allows to create native builds for a lot of platforms from Windows.

I rewrote my example to TypeScript and WebGL. You can run it in your browser by one click: TheQuad_WebGL (https://plnkr.co/edit/jYdUUvwoqc7l17Vbo3D8?p=preview) It must work on Window, Linux, macOS and mobile devices. You need only one click to run it from any OS like it was in deprecated Java Applets. I think WebGL is very good cross-platform tool.

(https://dl.dropboxusercontent.com/s/x5ud2thza2amrmk/Quad_WebGLTypeScript.png)

Another cross-platform native solution is using Unity and C#:


(https://dl.dropboxusercontent.com/s/r9oqpjse9gwv2pv/Cube_Unity.gif)