Open JamesTKhan opened 1 year ago
Packr can be integrate as a gradle task:
apply plugin: 'de.undercouch.download'
...
task downloadPackr(type: Download) {
src 'https://github.com/libgdx/packr/releases/download/4.0.0/packr-all-4.0.0.jar'
dest rootDir
onlyIfModified true
}
task packageForLinux(type: Exec) {
commandLine 'java', '-jar', '../packr-all-4.0.0.jar', '../package/linux64.json'
}
task packageForWindows(type: Exec) {
commandLine 'java', '-jar', '../packr-all-4.0.0.jar', '../package/windows64.json'
}
...
packageForLinux.dependsOn dist
packageForLinux.dependsOn downloadPackr
packageForWindows.dependsOn dist
packageForWindows.dependsOn downloadPackr
And if the packr's config files contain url of jre then the `gradlew packageForWindows" will download the packr jar and jre and will create the executable file.
If you need another option.
I just verified this. TommyEttinger's liftoff comes with jpackage
gradle tasks that do not hard code any absolute paths or icons on the file system.
Only drawback for jpackage is that you need to run jpackage on each native OS to produce native installers.
Keep in mind jpackage is guaranteed to work. Packr has a lot of open issues... 2-3 year old project: https://github.com/libgdx/packr/issues
So jpackage uses an installer? Packr no installer was needed. Can take a look at both options when this is ready to be worked on.
My gut feel is that packr is no longer being supported. I see a lot of talk about GraalVM, Rust, and lastly TE's Liftoff has jpackage support built in.
jpackage has the ability for an installer or not, its up to you. Only drawback is that you need JDK 14+ (JDK 17+ recommended) AND you need to build each type (exe/pkg/dmg) on a windows/linux/mac computer at BUILD time.
That being said, choose whatever tool you like, as getting a packaged editor out soon is a high priority.
Hello, I recently started trying out Mundus and for my own convenience I packaged the application using Packr. I bundled your prebuild jar with JRE version 8 and I am quite happy with the result. I use the Packr cli and have not tried the gradle plugin/task. You can check out the resulting packages yourselves if you want to:
https://incompetent-gamedev.itch.io/mundus-editor/download/rtSyRFJpJYIvrxR_7yMS3TwBGmTd89p6nuLmmOVw
Maybe this does not interest anyone but I still felt like sharing my experience regarding this topic.
Is your feature request related to a problem? Please describe. Getting Mundus to run has deterred several people from using it. I've made changes to improve this by getting rid of kryo. Mundus repo has a Packr file to Linux so the original authors probably planned to do this.
Describe the solution you'd like I think by also using Packr to provide executables of Mundus that ship WITH a JRE, it should make running Mundus easier for newcomers and put a stop to JDK versioning issues on their machines
Additional context I used Packr for the first time on the last game jam to make a windows build.