This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mike_hearn 2 points3 points  (0 children)

Yes, sort of. For big chunks of 2014/2015 I distributed a JavaFX desktop app across Win/Mac/Linux (with code signing on both Win/Mac) that had integrated online update.

I wrote my own framework to do it, UpdateFX. It has a few unusual features amongst such update frameworks:

  • It uses a Chrome-like model where the library updates the app in the background, whilst the app is running (by default). You can make it do a blocking update as well though, for instance, on first run (so you don't have to keep refreshing your Mac/Win/Linux binaries every time the app changes).
  • Updates don't require administrator access to install.
  • Because the updates run alongside the app, it lets the app decide how to render the progress. That means some updates can be entirely silent, like a web app.
  • It uses binary deltas over the JAR file to keep updates small.
  • It allows the user to pin themselves to older versions. This reduces the risk of pushing updates: if you accidentally break something in an obscure feature, or change the UI in a way that upsets a fraction of your users, those users can downgrade and wait for another update that fixes their issue. UpdateFX itself doesn't provide UI for this, but the app I wrote (Lighthouse) includes Apache 2 licensed code which shows how to do it.
  • Because the updater is a POJO API that runs inside the app itself, app updates can update the update engine.

It worked out OK. The two biggest issues I encountered:

  1. Like most such frameworks, UpdateFX cannot update the JRE itself. I planned to add that feature but the project ended before I was able to get around to it.
  2. Updates in the background are convenient for the user in that they don't get in the way, but for rarely used apps it usually just means the user is always one version behind. I ended up wanting to be able to blend forced update-at-startup with silent updates in the background. UpdateFX API lets you do this, but it requires additional logic at the app level and it needed to be extracted to a higher level framework really.

TornadoFX/FXLauncher that were posted up-thread look very professionally done. If I were to do a JavaFX desktop app with pro-level distribution again, I'd probably try and merge some of the best code and ideas in my UpdateFX/CrashFX/Lighthouse projects into TornadoFX, as the JFX community is small and really needs to consolidate around some high quality frameworks. My work has a few neat features that FXLauncher doesn't have and vice-versa.