December Updates

Christmas is approaching and we have a pile of new features for you to unwrap! Our December update makes it easy to keep your client in sync with a changing server protocol using aggressive updates, Electron support has been improved and you can now easily associate your app with URL handlers, set HTTP headers on URL inputs, upload your site via SFTP and more.

Please note that this release is the last major feature release of the introductory period. Starting in the new year Conveyor will transition to being a normal billed product in line with our announced plans from the start.

Aggressive updates

Desktop apps can choose their own update user experience. Often they check for updates in the background and then show an alert after startup asking the user’s permission to update. Other times they will update silently in the background on a schedule.

Both approaches work but they aren’t always ideal. Clients often need to ensure an update is applied because the server protocol is changing in backwards incompatible ways, so clients would break if they fell behind. Asking the user what to do is just annoying and opens the possibility of the ‘wrong’ answer, and updating in the background on a schedule makes it possible that users may be quite out of date when they start the app (e.g. if their computer hasn’t been switched on for a few months).

Web apps implement a form of ‘aggressive updates’, in which the browser checks the server for a new version every single time the app loads. This makes it convenient to evolve the client and server together in a tight fashion. In Conveyor 5 the same update UX is now available for Mac and Windows clients by setting a single key in your config:

app.updates = aggressive

That’s all it takes! Your app will now quickly fetch the metadata.properties file from your configured download site on every launch. If the version found there is different to the installed version of the app then the update process is triggered, without any user interaction being required. On platforms with fast delta updates like Windows the update process can be as fast as for a web app, especially if the update site is near to the user.

You can learn more in the update modes section of the documentation.

URL handlers

Registering for a custom URL scheme could already be done using custom integrations, but is now much easier:

app.url-schemes = [ my-app ]

Your app will now be started if the user clicks a my-app: link. A good choice of URL scheme is your app’s reverse DNS name:

app {
    rdns-name = com.example.my-app
    url-schemes = [ ${app.rdns-name} ]
}

Your app will now respond to com.example.my-app:foo%20bar URLs. What does ‘respond’ mean? That varies by OS: on Windows and Linux your program will be started again with the URL passed on the command line. On macOS you’ll receive a notification via your Cocoa app delegate. App frameworks like Electron often abstract you from this.

Custom URL schemes are especially useful for implementing OAuth login support.

Improved Electron support

We keep improving support for Electron users in every release and this one is no different. Conveyor offers improved convenience and speed of development vs the standard Electron toolchain, without any need for custom update servers and with unique features like aggressive updates.

In the December updates we’ve improved the Electron Info.plist configuration used on macOS and been developing a package for GitHub Desktop - more about that to come soon.

Better site uploads

If your download site is accessible via SFTP you can now automatically upload the results of a build using the new copied-site task. Just add:

app.site.copy-to = "sftp://server/path"

and run conveyor make copied-site. The site will be built and the files then uploaded.

If you’re doing an open source project that’s using GitHub Releases then you no longer have to specify the app.site.base-url yourself. It can now be derived from the repository you specified in app.vcs-url.

Mac bundle controls

When packaging native apps your Mac inputs are laid out inside the Contents directory of your bundle, but when packaging JVM and Electron apps you’re operating at a higher level. You can now use the app.mac.bundle-extras.amd64 and app.mac.bundle-extras.aarch64 keys to add files to arbitrary locations in your bundle, e.g. if you want to add a special OS X framework or helper app.

More features for input downloads

Conveyor can download files and lay them out as part of the build process. In previous versions download URLs that required special authentication headers weren’t usable. Now you can now specify any arbitrary HTTP header as part of the download request, e.g. for passing CI auth tokens. In addition you can now extract nested archives, which is useful for fetching downloads from GitHub Actions.

Improvements for JVM apps

JVM modules sometimes ship native code as part of the JAR files and use Java code to extract the native libraries at startup into caches in the user’s home directory. Conveyor strips native libraries from JARs and places them in the right locations inside the app package to be loadable using System.loadLibrary, which enables proper code signing and faster startup, but some libraries don’t use this and require a system property to be set to the path of the library if you want to avoid littering the home directory. To make it easier to use such libraries Conveyor now supports a magic <libpath> token for system properties, which will be rewritten at startup to point to where native libraries can be found.

System property support has been improved in other ways. You can now use a more friendly syntax that doesn’t require quoting the keys. Here’s both new features together:

app {
    jvm {
        system-properties {
            foo.natives.dir = <libpath>
        }
    }
}

Some bugs have been fixed that affect apps using the FlatLAF Swing theme and the client enhancements config points it at its native library by default, as long as you use the latest release.

Happy holidays!

Finally, we’d like to send best wishes and season’s greetings to all our users building great apps outside the browser. Your feedback and suggestions have been invaluable as we’ve matured the product throughout the introductory period, and we’re looking forward to a great 2023. 🎄

.