Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Flatpak #1685

Open
JakobDev opened this issue Jan 25, 2024 · 17 comments
Open

Flatpak #1685

JakobDev opened this issue Jan 25, 2024 · 17 comments

Comments

@JakobDev
Copy link

I have created a Flatpak for Chunky. This makes it way easier for Linux User to install Chunky. If you publish it on Flathub, it's just a single click. The Flatpak ships with Java and OpenJFX, so there is nothing the User need to do. Just install it and start it from the Menu.

Here are the build files. Currently it skips the Launcher, as it needs extra arguments to find OpenJFX, so it needs a little bit of work before publishing it. Tell me, if you are interested.

@Peregrine05
Copy link
Member

Chunky itself relies on some dependencies, which are automatically downloaded and added to the classpath by the Launcher.

The Launcher only requires the --module-path and --add-modules arguments to point to JavaFX, just like Chunky itself does.

The Launcher can also be started with -Dchunky.home= to set the settings directory. The only subdirectories that users would ever typically need to access are the plugins directory and the scenes directory, both of which are accessible from within the Launcher and Chunky, respectively.

@JakobDev
Copy link
Author

You can use the Launcher in the Flatpak, if you want, but you currently need to configure the Java Arguments in the Launcher, otherwise Chunky doesn't find OpenJFX. The Launcher also asks you were you which directory should be used, even if -Dchunky.home= is set. You can look at the Manifest if you want.

@leMaik
Copy link
Member

leMaik commented Jan 26, 2024

We should fix the -Dchunky.home issue then.

@Peregrine05 created a new repository for the flat pack config. Feel free to PR against it, @JakobDev 🚀

@JakobDev
Copy link
Author

You should also hide some technical config option e.g. Java Arguments when running inside a Flatpak

@leMaik
Copy link
Member

leMaik commented Jan 29, 2024

Okay, so the launcher needs to be aware that it is running in flatpak mode.

@JakobDev
Copy link
Author

Okay, so the launcher needs to be aware that it is running in flatpak mode.

Just check if the file /.flatpak-info exists. You can use the build files I provided to test it. They are just shell commands, so it should be easy to understand and modify.

@matthew55
Copy link
Contributor

You can use the Launcher in the Flatpak, if you want, but you currently need to configure the Java Arguments in the Launcher, otherwise Chunky doesn't find OpenJFX. The Launcher also asks you were you which directory should be used, even if -Dchunky.home= is set. You can look at the Manifest if you want.

Without even realizing you guys were discussing this, I ran into the same issue (#1720) when trying to use the XDG Base Directory Specification for the AUR package of chunky-launcher and fixed it in this pr: #1721

@leMaik
Copy link
Member

leMaik commented Apr 18, 2024

The Launcher also asks you were you which directory should be used, even if -Dchunky.home= is set.

@JakobDev This just got fixed, what would be the next steps?

@JakobDev
Copy link
Author

If everything works, you can submit Chunky to Flathub

@matthew55
Copy link
Contributor

@JakobDev If the plan is to show the launcher then not everything works right now.

One possible plan is to update the Chunky Launcher URL build so the latest commit d6c2fad is applied and the #1720 bug is fixed. The Manifest would have to be updated to use this different download source and the --launcher flag.

@leMaik
Copy link
Member

leMaik commented Apr 23, 2024

@matthew55 The update site is mine, i can deploy a new version. I guess we should specify -Dchunky.home so that the setup window is not shown in the flat pack version?

Maybe we should hide the Java path option when running with flatpack, ie. if /.flatpak-info exists?

@matthew55
Copy link
Contributor

I guess we should specify -Dchunky.home so that the setup window is not shown in the flat pack version?

-Dchunky.home is current specified in the manifest but since the current jar being used (latest release 2.4.6) doesn't have the bug fix where the setup window is skipped I am suggesting we could just update the Chunky Launcher jar to avoid having to push a new release for this bug fix. The only work that needs done to the Manifest is adding a --launcher flag when running Chinky to use the launcher.

Maybe we should hide the Java path option when running with flatpack, ie. if /.flatpak-info exists?

I can create a pull request to hide options like Java path and Java arts so the users don't accidentally break their configurations if ./.flatpak-info exists. Would you like me to work on this?

@matthew55
Copy link
Contributor

Maybe we should hide the Java path option when running with flatpack, ie. if /.flatpak-info exists?

I can create a pull request to hide options like Java path and Java arts so the users don't accidentally break their configurations if ./.flatpak-info exists. Would you like me to work on this?

You know what? I actually have use for a feature like this on my AUR package for Chunky. Is this something that we could turn into a flag so that it can be used for more than if a ./.flatpak-info file exists or would that be a flag you are not willing to add?

@leMaik
Copy link
Member

leMaik commented Apr 24, 2024

@matthew55 PR welcome! Maybe chunky.hideJvmPath?

I'll postpone the launcher release until that's implemented.

@JakobDev
Copy link
Author

The only work that needs done to the Manifest is adding a --launcher flag when running Chinky to use the launcher.

Is the launcher needed for something like Flatpak, where most of the options are hidden anyways?

@leMaik
Copy link
Member

leMaik commented Apr 26, 2024

@JakobDev The launcher is the preferred way to get and launch Chunky. Best way to get updates, nightly builds and PR builds without downstream packages (eg. flatpack or AUR) having to be rebuilt frequently.

@JakobDev
Copy link
Author

Teh I will update the Manifest to use the Launcher, once a new JAR is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants