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:
Quoteduplicate 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)
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#:
- Cube_Win32.zip (https://dl.dropboxusercontent.com/s/363enb6y8oy9buh/Cube_Win32.zip)
- Cube_Linux3264.zip (https://dl.dropboxusercontent.com/s/5lk1adypefq3no9/Cube_Linux3264.zip)
- Cube_MacOSX.zip (https://dl.dropboxusercontent.com/s/frbgrvwaqk26v2h/Cube_MacOSX.zip)
- Cube_Android32.zip (https://dl.dropboxusercontent.com/s/o8evb7jq6n8x16g/Cube_Android32.zip)
- Run in browser by one click: Cube_WebGL (http://8observer8.freevar.com/unity/cube)
(https://dl.dropboxusercontent.com/s/r9oqpjse9gwv2pv/Cube_Unity.gif)