You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ The following projects illustrate how to use this plugin to create custom runtim
27
27
-[badass-runtime-example-javafx-cds](https://github.com/beryx-gist/badass-runtime-example-javafx-cds) - a 'Hello world' JavaFX application with Class Data Sharing.
28
28
-[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).
29
29
-[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.
31
31
-[bespoke-images](https://github.com/PaulWinstone/demoModule) - creates multiple executable images, each one customized for a different client.
[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>> +
85
86
By default, the plugin generates an image for the platform it runs on.
86
87
To create images for other platforms, you need to call the `targetPlatform` method (one call per target platform). +
87
88
[purple]##**name**##: an identifier of your choice that will be appended to the `imageDir` and `imageZip` properties to
@@ -292,7 +293,7 @@ runtime {
292
293
293
294
=== jpackage
294
295
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.
296
297
297
298
[#jpackageHome]
298
299
jpackageHome:: The path to the JDK providing the jpackage tool. +
@@ -365,6 +366,16 @@ targetPlatformName:: This property is required only when using the `targetPlatfo
365
366
_defaultValue_: null +
366
367
_usage example_: `targetPlatformName = "linux"`
367
368
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
+
368
379
mainJar:: the argument passed to the `--main-jar` option when running `jpackage` to create an application image. +
369
380
Usually, you don't need to set this property, unless you also explicitly set `distDir`. +
370
381
_defaultValue_: the name of the JAR file produced by the `installDist` or the `installShadowDist` task +
0 commit comments