Skip to content

Commit

Permalink
Documentation for how to package apps using Conveyor. (#2303)
Browse files Browse the repository at this point in the history
* Add a mention in the packaging tutorial about Conveyor, with a feature comparison on a separate page.

Remove the link from the main page to the signing/notarization tutorial as it's already linked to from the main packaging tutorial in any case.

* Address review comments.

- Don't talk about jpackage.
- Put the features of the built in tasks first on the comparisons page.
- Remove discussion of JNI.

Additionally:

- Reformat the feature list so the summary comes first in bold.
- Point out that the feature list isn't complete.
  • Loading branch information
mikehearn authored Sep 28, 2022
1 parent 486a53f commit 91daaae
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ Preview functionality (check your application UI without building/running it) fo
* [Swing interoperability](tutorials/Swing_Integration)
* [Navigation](tutorials/Navigation)
* [Accessibility](https://github.com/JetBrains/compose-jb/tree/master/tutorials/Accessibility)
* [Building native distribution](tutorials/Native_distributions_and_local_execution)
* [Signing and notarization](tutorials/Signing_and_notarization_on_macOS)
* [Building a native distribution](tutorials/Native_distributions_and_local_execution)

Also, see [Foundation](https://developer.android.com/jetpack/compose/documentation#core) and [Design](https://developer.android.com/jetpack/compose/documentation#design) docs from Google. They were originally written for Android, but most of information applies to Compose for Desktop as well.

Expand Down
16 changes: 11 additions & 5 deletions tutorials/Native_distributions_and_local_execution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@
In this tutorial, we'll show you how to create native distributions (installers/packages) for all the supported systems.
We will also demonstrate how to run an application locally with the same settings as for distributions.

## Gradle plugin
## Available tools

There are two tools available for packaging Compose applications:

1. The Compose Multiplatform Gradle plugin which provides tasks for basic packaging, obfuscation and (macOS only) signing.
2. [Conveyor](https://www.hydraulic.software), which is a separate tool not made by JetBrains.

`org.jetbrains.compose` Gradle plugin simplifies the packaging of applications into native distributions and running an application locally.
This tutorial covers how to use the built-in tasks. Conveyor has [its own tutorial](https://conveyor.hydraulic.dev/latest/tutorial/1-get-started/). The choice of which to use boils down to features/ease of use vs price. Conveyor provides support for online updates, cross-building and [various other features](packaging-tools-comparison.md) but requires [a license](https://hydraulic.software/pricing.html) for non-open source projects. The packaging tasks come with the Compose Desktop Gradle plugin, but the resulting packages don't support online updates and will require a multi-platform CI setup to create packages for each OS.

## Gradle plugin

Currently, the plugin uses [jpackage](https://openjdk.java.net/jeps/343) for packaging distributable applications.
`org.jetbrains.compose` Gradle plugin simplifies the packaging of applications into native distributions using `jpackage` and running an application locally.
Distributable applications are self-contained, installable binaries which include all the Java runtime components they need,
without requiring an installed JDK on the target system.

Expand Down Expand Up @@ -118,8 +125,7 @@ to run such applications will be faced with an error like this:

<img alt="" src="attrs-error.png" height="462" />

See [our tutorial](/tutorials/Signing_and_notarization_on_macOS/README.md)
on how to sign and notarize your application.
See [our tutorial](/tutorials/Signing_and_notarization_on_macOS/README.md) on how to sign and notarize your application.

## Specifying package version

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Packaging tools comparison

The built-in Gradle tasks cover basic packaging needs:

* Creation of MSI files or NSIS installer EXEs for Windows, signed app bundles for macOS and DEB/RPM packages for Linux.
* Bundling of the JVM using `jlink`.
* Customization of packaging options on each OS.

Conveyor ([docs](https://conveyor.hydraulic.dev/)) is a tool available for download from [Hydraulic](https://www.hydraulic.software). It integrates with the Compose Gradle plugin and is useful if you want any of the following things:

* **Online updates.** The Compose plugin creates packages that users must update manually by reinstalling. Conveyor generates packages that can silently update themselves in the background on Windows/macOS, or which use apt/etc on Linux.
* **Cross-building.** Creation, signing and notarization of packages for all supported targets from any OS (e.g. your developer laptop, a CI machine). The built-in tasks must be run from each OS you target.
* **Self-signed packages.** These don't require you to purchase signing certificates, but require the user to copy/paste terminal commands.
* **Download pages.** Generated static HTML that detects the user's OS and CPU architecture ([example](https://conveyor.hydraulic.dev/latest/#compose-multiplatform)).
* **Icon conversion.** The built in tasks require you to convert icons to platform specific formats manually.
* **Size optimization.** `jdeps` is used to shrink the download by stripping unused JDK modules.
* **Accessibility.** Automatic support for screen readers is added using the Java Accessibility Bridge.
* **Happy IT departments.** Conveyor uses MSIX, Microsoft's current-gen Windows 10/11 packaging system, which is deeply integrated with Windows network admin tools.
* **CLI support.** Supplementary command line tools included with your package.
* **Commercial support.**

This isn't a complete list of features, we suggest checking their docs to see what's available. It's free for open source projects, but after the introductory period ends it will require a license for commercial projects (see their [pricing page](https://www.hydraulic.software/pricing.html) for details).

0 comments on commit 91daaae

Please sign in to comment.