Skip to content

Commit 1c0ea1e

Browse files
committed
update documentation
1 parent 260071b commit 1c0ea1e

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The following projects illustrate how to use this plugin to create custom runtim
2727
- [badass-runtime-example-javafx-cds](https://github.com/beryx-gist/badass-runtime-example-javafx-cds) - a 'Hello world' JavaFX application with Class Data Sharing.
2828
- [badass-runtime-example-kotlin-tornadofx](https://github.com/beryx-gist/badass-runtime-example-kotlin-tornadofx) - a 'Hello world' application written in Kotlin using [tornadofx](https://github.com/edvin/tornadofx).
2929
- [badass-runtime-spring-petclinic](https://github.com/beryx-gist/badass-runtime-spring-petclinic) - creates a custom runtime image of the [Spring PetClinic](https://github.com/spring-projects/spring-petclinic) application.
30-
- [badass-runtime-pacman](https://github.com/beryx-gist/badass-runtime-pacman) - creates a custom runtime image and an application installer for the Pacman gama available in the [FXGLGames](https://github.com/AlmasB/FXGLGames) repository.
30+
- [badass-runtime-pacman](https://github.com/beryx-gist/badass-runtime-pacman) - creates a custom runtime image and an application installer for the Pacman game available in the [FXGLGames](https://github.com/AlmasB/FXGLGames) repository.
3131
- [bespoke-images](https://github.com/PaulWinstone/demoModule) - creates multiple executable images, each one customized for a different client.
3232

3333

doc/user_guide.adoc

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ The list of modules suggested by this task is a good value to start with, but it
2424
required modules or include unnecessary ones, so you may need to adjust it. +
2525
_depends on_: `jar`
2626

27-
jpackageImage:: Uses the https://jdk.java.net/jpackage/[jpackage] tool to create a platform-specific application image. +
27+
jpackageImage:: Uses the https://openjdk.java.net/jeps/392/[jpackage] tool to create a platform-specific application image. +
2828
_depends on_: `runtime` +
2929

30-
jpackage:: Uses the https://jdk.java.net/jpackage/[jpackage] tool to create a platform-specific application installer. +
30+
jpackage:: Uses the https://openjdk.java.net/jeps/392/[jpackage] tool to create a platform-specific application installer. +
3131
_depends on_: `jpackageImage` +
3232

3333

@@ -81,7 +81,8 @@ It is an alternative way of setting the `options` property.
8181
You can call this method multiple times. +
8282
_usage example_: `addOptions '--no-header-files', '--no-man-pages'`
8383

84-
[maroon]##targetPlatform##(String [purple]##name##, String [purple]##jdkHome##, List<String> [purple]##options## = []):: Instructs the plugin to generate an application image for a specific platform. +
84+
[maroon]##targetPlatform##(String [purple]##name##, String [purple]##jdkHome##, List<String> [purple]##options## = []):: Instructs the plugin to use _jlink_ to generate an application image for a specific platform. +
85+
[red]##**This method is not for configuring the installable packages produced by jpackage.**## <<jpackageWarning, See details>> +
8586
By default, the plugin generates an image for the platform it runs on.
8687
To create images for other platforms, you need to call the `targetPlatform` method (one call per target platform). +
8788
[purple]##**name**##: an identifier of your choice that will be appended to the `imageDir` and `imageZip` properties to
@@ -292,7 +293,7 @@ runtime {
292293

293294
=== jpackage
294295

295-
This script block allows you to customize the https://jdk.java.net/jpackage/[jpackage]-based generation of platform-specific application images and installers.
296+
This script block allows you to customize the https://openjdk.java.net/jeps/392/[jpackage]-based generation of platform-specific installable packages.
296297

297298
[#jpackageHome]
298299
jpackageHome:: The path to the JDK providing the jpackage tool. +
@@ -365,6 +366,16 @@ targetPlatformName:: This property is required only when using the `targetPlatfo
365366
_defaultValue_: null +
366367
_usage example_: `targetPlatformName = "linux"`
367368

369+
[#jpackageWarning]
370+
WARNING: [red]##**In contrast to jlink, _jpackage_ is not able to produce installers for other platforms.**##
371+
For example, to create an installer for Linux, you must run jpackage on a Linux machine.
372+
You cannot do it on a Windows or Mac platform.
373+
374+
TIP: If you need to create installers for more than one platform, it's probably better not to use _targetPlatform_.
375+
Instead, you run the same build on different machines.
376+
If your project is on GitHub, you can automate this by using GitHub Actions, as seen in https://github.com/beryx-gist/badass-runtime-example-javafx[this example].
377+
378+
368379
mainJar:: the argument passed to the `--main-jar` option when running `jpackage` to create an application image. +
369380
Usually, you don't need to set this property, unless you also explicitly set `distDir`. +
370381
_defaultValue_: the name of the JAR file produced by the `installDist` or the `installShadowDist` task +

0 commit comments

Comments
 (0)