Hello Guest

I need a tool for distributing LWJGL3 applications

  • 1 Replies
  • 239 Views
I need a tool for distributing LWJGL3 applications
« 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:
  • lwjgl-glfw.jar
  • lwjgl-glfw-natives-windows.jar

But these JARs contains the same files:
  • glfw.dll.sha1
  • glfw32.dll.sha1

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

Second problem (Linux). JarSplice creates the .sh file with CRLF but Linux requires LF. You can run the build on Linux: 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

Third problem (macOS). JarSplice creates an executable file that does not work on macOS. Please, try to run: TheQuad_macOS.zip
« Last Edit: April 07, 2019, 10:05:57 by 8Observer8 »

Re: I need a tool for distributing LWJGL3 applications
« Reply #1 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 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.



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