LibGdx - exe

Started by therevills, September 30, 2023, 03:47:39

Previous topic - Next topic

therevills

So I'm trying to create/test an exe output for LibGdx, since it's Java and there are so many JDKs/JREs these days, it's "best practice" to ship the "JRE" and an exe to distribute the game.

From the LibGdx wiki (https://libgdx.com/wiki/deployment/bundling-a-jre), there are two main ways using:
* Packr
* JPackager

I'm trying Packr, as it was made by the LibGdx team, I've created a little bat file:

cd E:\Dropbox\AndroidDev\tools
E:
java -jar packr-all-4.0.0.jar pong.config-mac.json
pause

the json file pong.config-win.json:

{
    "platform": "windows64",
    "jdk": "java-1.8.0-openjdk-1.8.0.232-1.b09.ojdkbuild.windows.x86_64.zip",
    "executable": "pong",
    "classpath": [
        "pong.jar"
    ],
    "removelibs": [
        "pong.jar"
    ],
    "mainclass": "com.mygdx.game.DesktopLauncher",
    "vmargs": [
       "Xmx1G"
    ],
    "minimizejre": "soft",
    "output": "out-win64"
}


I've tested it on Windows 10 and it works on a few devices, Baggey and Dabz also confirmed it works... but Col has confirmed it fails on Windows 11  :( Has anyone had any success with Win11?

Also I've tried a mac build and it fails to run at all on my Mac Mini :/

{
    "platform": "mac",
    "jdk": "OpenJDK11U-jre_x64_mac_hotspot_11.0.11_9.tar.gz",
    "executable": "pong",
    "classpath": [
        "pong.jar"
    ],
    "removelibs": [
        "pong.jar"
    ],
    "mainclass": "com.mygdx.game.DesktopLauncher",
    "vmargs": [
       "Xmx1G",
       "XstartOnFirstThread"
    ],
    "minimizejre": "soft",
    "output": "out-mac1"
}

Anyone played with this stuff?

dawlane

#1
Quote from: therevills on September 30, 2023, 03:47:39Has anyone had any success with Win11?
I works on my Windows 11 Ryzen 7 laptop.

If it fails on a macOS, I would suspect it will be to do with new security features of macOS.