Jump to content
  • Advertisement
8Observer8

Please, run my GLFW example on three OS: Linux, macOS and Windows

Recommended Posts

I created very simple example using Java+GLFW+LWJGL3 and deprecated OpenGL 1.1. I want to use this example for testing that executable file works on your machines. I want to be sure that JarSplice works correctly. Please, run it and say that this example works on Linux and Mac. I created this builds from Windows 10. If you have Windows, please, try to run it on Windows.

TheQuad.png.b9668a1c6fc918db4ba1df89e9850bf0.png

Share this post


Link to post
Share on other sites
Advertisement

My friend valen10 tried to run my example using Debian 10 and he received this error message:

$ ./TheQuad_Linux.sh
Failed to execute process './TheQuad_Linux.sh'. Reason:
', which is not an executable command.d the interpreter '/bin/sh

He opened .sh using hex-editor, replaced \r\n on \n and it works fine. How can I solve this problem on my side in JarSplice?

Share this post


Link to post
Share on other sites
Posted (edited)

Same output Windows 7 - Intel i7 - gforce 9300M

There was something about forward slashes and back slashes that might be worth looking into between the os flavors. The other thing I'm thinking is separate the command in a pre process condition maybe or re #define the carriage return at compile time as the appropriate sequence.

Edited by GoliathForge

Share this post


Link to post
Share on other sites
1 hour ago, 8Observer8 said:

which is not an executable command.d the interpreter '/bin/sh

I think I solved this problem on Linux. Please, try to run this build: TheQuad_Linux.zip If it will work I will explain you how I solved the problem.

Share this post


Link to post
Share on other sites
2 hours ago, 8Observer8 said:

I think I solved this problem on Linux. Please, try to run this build: TheQuad_Linux.zip If it will work I will explain you how I solved the problem.

No, my idea does not work. I thought it will work if I would delete "lwjgl-natives-macos.jar" and "lwjgl-natives-windows.jar" from JarSplice JAR-list. Linux build works only if you will deleted 0x0D code at the beginning of the bash ".sh" file. But I do not understand where and how. I think it is impossible to deleted 0x0D on Windows.

Share this post


Link to post
Share on other sites

Quits without error on OSX 10.13, Java 1.7.0_71.
I'm not Java-savvy enough to pinpoint a particular problem, unfortunately.

Share this post


Link to post
Share on other sites

Error: Invalid or corrupt jarfile /home/congard/Downloads/TheQuad_Linux/TheQuad_Linux/TheQuad_Linux.sh

Share this post


Link to post
Share on other sites
Posted (edited)

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.

Quad_WebGLTypeScript.png.fa3af61a6f58149562e229076d4e9d7d.png

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

Cube_Unity.gif.3e4fb118109222170a5b2a0affeb33d2.gif

Edited by 8Observer8

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!