gluonhq / scenebuilder

Scene Builder is a visual, drag 'n' drop, layout tool for designing JavaFX application user interfaces.
https://gluonhq.com/products/scene-builder/
Other
708 stars 218 forks source link

Flatpak build #559

Open batashi opened 1 year ago

batashi commented 1 year ago

Currently, there is an ongoing flatpak version build in the final stages. It was generated from this project released binary. Flatpak is important because it's Linux distro agnostic packaging, and able to run on any distro without need to have another special build.

I suggest maintaining it under this project to be more linked to upstream and give credibility to the end-user.

ghazyami commented 1 year ago

Scene Builder is now available on Flathub. @batashi did the original work, I followed up afterwards.

If any of the Scene Builder maintainers would like to be part of maintains the flatpak, please reach out!

Flathub manifest: https://github.com/flathub/com.gluonhq.SceneBuilder Flathub link: https://flathub.org/apps/details/com.gluonhq.SceneBuilder Flathub badge: <a href='https://flathub.org/apps/details/com.gluonhq.SceneBuilder'><img width='240' alt='Download on Flathub' src='https://flathub.org/assets/badges/flathub-badge-en.png'/></a> Flathub badge sample: Download on Flathub

AlmasB commented 1 year ago

Many thanks!

@jperedadnr @abhinayagarwal should we add one of these links to README and close the issue?

Oliver-Loeffler commented 1 year ago

@ghazyami What has to be done to publish Scene Builder to flatpak? Is is something we possibly could add to the GitHub actions pipeline?

Hi @aalmiray, does JReleaser support flatpak? We could possibly integrate with Flatpak utilizing Git support of JReleaser, or?

ghazyami commented 1 year ago

As far as I know, there's no way to pre-build the flatpak and then publish it to Flathub

Oliver-Loeffler commented 1 year ago

Thanks for explanation. Would it be possible that we may publish the manifest with each new SB release?

ghazyami commented 1 year ago

The manifest is available on this repo Currently, one of Flathub maintainers and me are contributors on this repo. There's a possibility to request access for SceneBuilder maintainers like yourself to the repo as well.

General idea how the flatpak is built,

  1. The latest SceneBuilder-XYZ.deb is downloaded and
  2. schenebuilder-XYZ-all.jar is extracted out of 1.
  3. scenebuilder-SceneBuilder.desktop is extracted out of 1.
  4. Arch specific JavaFX SDK is downloaded (currently using version 19).
  5. OpenJDK 17 is installed as an extension of the Flatpak runtime.
  6. Some icons

So the final result in the Flatpak is (It was done this way, instead of taking the already bundled runtime inside the .deb package to support both x64 and AArch):

An update once a new version is out, the manifest can just be updated to take the latest version (and update SDK / JDK versions if necessary).

Notes:

ghazyami commented 1 year ago

@Oliver-Loeffler, @AlmasB Flathub in introducing verification markers - currently in beta - If you are interested in being added as maintainers for the Flatpak version and / or marking SceneBuilder as verified, please let me know.

Oliver-Loeffler commented 1 year ago

Hi @ghazyami, thanks for reaching out. Technically I think this would be good if someone from the Scene Builder team could care about this. Lets wait, what @AlmasB thinks about it.

ghazyami commented 1 year ago

Hi, Congrats for yet another release (20.0.0) I have some notes, for the flatpak to support both x64 and Aarch only schenebuilder-XYZ-all.jar is needed (which is taken from the .deb package provided by the release). JavaFX SDK will be downloaded separately (arch specific) and Java is provided as runtime extension (arch specific) as described here.

For 20.0.0 I guess Java 20 was used to build the release artifacts which meant the jar will only work on Java 20, however the runtime extension for Java currently had only 17 (but a PR is already there to bring 20). Otherwise, the JAR needs to be built from source using 17, which can be done, but I noticed that the tag 20.0.0 had the version set to 20.0.0-SNAPSHOT on the pom file, will this be the case always in the future?

Also, the .desktop file was also taken from the .deb is this file available somewhere else? I only see a template here

Thanks,