chunky
chunky copied to clipboard
Add a simple JavaFX installer to the launcher.
When JavaFX is not detected, the following installer will open:
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"
}
]
}
]
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?
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.
Tested, works for both Adoptium Java 11 and Java 17 on Windows 10.
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.
Here is a build with the default update site set to my update site: [click]
This should just work with no extra configuration.
Would be nice to also create a .desktop file in ~/.local/share/applications`, but that's bikesheddable
Would be nice to also create a
.desktopfile 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).
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.
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"
}
]
}
]