diff --git a/README.md b/README.md index 5f125ec3cf..ed2e00678d 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/tutorials/Native_distributions_and_local_execution/README.md b/tutorials/Native_distributions_and_local_execution/README.md index 0b71644ce2..b7c8cd2253 100755 --- a/tutorials/Native_distributions_and_local_execution/README.md +++ b/tutorials/Native_distributions_and_local_execution/README.md @@ -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. @@ -118,8 +125,7 @@ to run such applications will be faced with an error like this: -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 diff --git a/tutorials/Native_distributions_and_local_execution/packaging-tools-comparison.md b/tutorials/Native_distributions_and_local_execution/packaging-tools-comparison.md new file mode 100644 index 0000000000..8bda5ef5f4 --- /dev/null +++ b/tutorials/Native_distributions_and_local_execution/packaging-tools-comparison.md @@ -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).