chunky icon indicating copy to clipboard operation
chunky copied to clipboard

Add a simple JavaFX installer to the launcher.

Open ThatRedox opened this issue 3 years ago • 3 comments

When JavaFX is not detected, the following installer will open: image The fields will attempt to auto-populate, however the user can change the fields if they are incorrect. Clicking on the Download and Install button will download the JavaFX sdk and extract it to ~/.chunky/javafx/. The JavaFX finder has been modified to also look for this path.

This requires the update site to have a javafx.json file such as:

[
  {
    "name": "Windows",
    "regex": "Windows.*",
    "archs": [
      {
        "name": "x64",
        "regex": "amd64",
        "url": "https://download2.gluonhq.com/openjfx/17.0.2/openjfx-17.0.2_windows-x64_bin-sdk.zip"
      }
    ]
  }
]

ThatRedox avatar Jun 06 '22 02:06 ThatRedox

The installer looks good to me. Are we allowed to direct-link the downloads or should we just redirect the user to the download page? Does this work for Java 11 and Java 17?

leMaik avatar Jul 14 '22 06:07 leMaik

I believe we are allowed to direct-link the downloads (although I would make a copy in case Gluon decides to take down those links). Based on the GPL FAQ, we are allowed to distribute our own copies of GPLed software. The help link links to https://chunky.lemaik.de/java11 which we can add more licensing information to if necessary. I think redirecting the user to a download page is a bad idea since the way Gluon structures it is extremely confusing and is already the cause of many questions in the #help channel.

ThatRedox avatar Jul 15 '22 04:07 ThatRedox

Tested, works for both Adoptium Java 11 and Java 17 on Windows 10.

ThatRedox avatar Jul 24 '22 00:07 ThatRedox

To test this:

Within .chunky we have a chunky.json with just {} and a chunky-launcher.json with {"updateSite": "https://chunkyupdate.thatredox.dev/" } or {"updateSite": "https://thatredox.github.io/ChunkyUpdateSite/" }

To self host:

You need a directory with a javafx.json.

If you launch a http server using python, ie python -m http.server it will state the address the server is hosted on: Serving HTTP on :: port 8000 (http://[::]:8000/) ...

Within .chunky we have a chunky.json with just {} and a chunky-launcher.json with {"updateSite": "http://[::]:8000/" } <-- or whatever the address is provided from python.


This PR works as expected on Windows 11 with Eclipse Temurin 17.

jackjt8 avatar Oct 14 '22 23:10 jackjt8

Here is a build with the default update site set to my update site: [click]

This should just work with no extra configuration.

ThatRedox avatar Oct 15 '22 00:10 ThatRedox

Would be nice to also create a .desktop file in ~/.local/share/applications`, but that's bikesheddable

NotStirred avatar Nov 18 '22 04:11 NotStirred

Would be nice to also create a .desktop file in ~/.local/share/applications`, but that's bikesheddable

I think that should be part of the first time setup, not the JavaFX installer (so out of the scope of this PR).

ThatRedox avatar Nov 18 '22 05:11 ThatRedox

I agree. We could do it like IntelliJ does, ie. having a checkbox in the first time setup and a button in the menu bar.

leMaik avatar Nov 18 '22 07:11 leMaik

With the sha256 verification, every download also needs a sha256 with the hash, like this:

[
  {
    "name": "Windows",
    "regex": "Windows.*",
    "archs": [
      {
        "name": "x64",
        "regex": "amd64",
        "url": "https://download2.gluonhq.com/openjfx/17.0.2/openjfx-17.0.2_windows-x64_bin-sdk.zip",
        "sha256": "6a581e7220bd843005bb76cb18c681ee067c6e364d50f2b204281ec2507339b3"
      }
    ]
  }
]

leMaik avatar Jan 06 '23 23:01 leMaik