Closed daniel-lerch closed 3 years ago
Gradle should have a way to build different versions of the same project. Maybe we can use that to build a Windows, macOS and Linux version. However, then there's still the problem of the Ultralight binaries.
Also, every cross-platform game (such as Among Us 3D) would then need a similar setup to not create huge jar files.
The recommended version from LWJGL themselves would be:
import org.gradle.internal.os.OperatingSystem
project.ext.lwjglVersion = "3.2.3"
switch (OperatingSystem.current()) {
case OperatingSystem.LINUX:
project.ext.lwjglNatives = "natives-linux"
break
case OperatingSystem.MAC_OS:
project.ext.lwjglNatives = "natives-macos"
break
case OperatingSystem.WINDOWS:
project.ext.lwjglNatives = "natives-windows"
break
}
However, with that approach you'd need a Linux OS to build the linux binaries, a Windows to build windows and so on. Additionally, the neko engine is built by the GitHub CI which to my knowledge runs on linux, so it'd always build linux bins
Another solution could maybe be Gradle's build variants
If binaries can't be made, then i can make a tutorial for using wine to run it on macOS and Linux.
In order to run games like Among Us 3D on other platforms than Windows, the Neko Engine needs to reference native libraries of macOS and Linux. I don't know much about Gradle but NuGet supports platform specific libraries in such a way that every variation is downloaded for development but only the necessary libraries are copied on build. Maybe we can achieve something like that with Maven too in order to limit the resulting games' download size.