Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Investigate Packr for future releases #258

Open
JamesTKhan opened this issue Oct 7, 2023 · 5 comments
Open

Investigate Packr for future releases #258

JamesTKhan opened this issue Oct 7, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@JamesTKhan
Copy link
Owner

JamesTKhan commented Oct 7, 2023

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.

@JamesTKhan JamesTKhan added the enhancement New feature or request label Oct 7, 2023
@Dgzt
Copy link
Collaborator

Dgzt commented Oct 8, 2023

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.

@antzGames
Copy link
Collaborator

antzGames commented Oct 30, 2023

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

image

@JamesTKhan
Copy link
Owner Author

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.

@antzGames
Copy link
Collaborator

antzGames commented Nov 3, 2023

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.

@ghost
Copy link

ghost commented Nov 7, 2023

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants