|
2 | 2 | // Windows: set JAVA_HOME=C:\Program Files\Java\jdk-21 |
3 | 3 | // Windows: set JAVA_HOME=C:\Program Files\Java\jdk-25 |
4 | 4 | // Linux: export JAVA_HOME=/usr/lib/jvm/jdk-11.0.5+10 |
5 | | -// MacOS: export JAVA_HOME=`/usr/libexec/java_home -v 11` |
| 5 | +// MacOS: export JAVA_HOME=`/usr/libexec/java_home -v 21` |
6 | 6 |
|
7 | 7 | plugins { |
8 | 8 | id 'application' |
9 | 9 | id 'org.openjfx.javafxplugin' version '0.1.0' |
10 | | - id 'org.beryx.runtime' version '2.0.0-rc' |
| 10 | + id 'org.beryx.runtime' version '2.0.0' |
11 | 11 | // id 'org.unbroken-dome.xjc' version '2.0.0' |
12 | 12 | id 'com.github.bjornvester.xjc' version "1.8.2" // https://github.com/bjornvester/xjc-gradle-plugin |
13 | 13 | } |
@@ -94,7 +94,7 @@ def company = 'My Company' |
94 | 94 |
|
95 | 95 | application { |
96 | 96 | applicationName = 'hello-fx' |
97 | | - mainClass.set("com.example.hellofx.Launcher") |
| 97 | + mainClass.set("com.my_company.hellofx.Launcher") |
98 | 98 | applicationDefaultJvmArgs = [ |
99 | 99 | // necessary for JavaFX24+ (see https://gluonhq.com/products/javafx/openjfx-24-release-notes/) |
100 | 100 | // "--enable-native-access=ALL-UNNAMED", |
@@ -137,12 +137,19 @@ runtime { |
137 | 137 | '--copyright', company, |
138 | 138 | ] |
139 | 139 | if(os.macOsX) { |
140 | | - imageOptions = ['--mac-sign', '--icon', 'src/main/deploy/package/macosx/hello.icns'] |
| 140 | + imageOptions = ['--mac-sign', '--icon', 'src/main/deploy/package/macosx/hello.icns', '--mac-package-identifier', 'com.my-company.hellofx'] |
141 | 141 | installerOptions += [ |
142 | | - // '--mac-sign', |
| 142 | + // Note: --mac-package-identifier needs to be part of imageOptions |
| 143 | + // '--mac-package-identifier', 'com.my-company.hellofx', |
| 144 | + '--mac-sign', |
143 | 145 | // '--mac-signing-key-user-name', System.getenv('SIGNING_KEY_USER_NAME'), |
144 | 146 | // '--mac-signing-keychain', System.getenv('SIGNING_KEYCHAIN_PATH') |
145 | 147 | ] |
| 148 | + // 3 jpackage steps |
| 149 | + // * /Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home/bin/jpackage --type app-image --input /Users/daniel/Documents/GitHub/Java11Test/build/install/hello-fx/lib --main-jar Java11Test-25.11.04.jar --main-class com.my_company.hellofx.Launcher --dest /Users/daniel/Documents/GitHub/Java11Test/build/jpackage --name hello-fx --app-version 25.11.04 --runtime-image /Users/daniel/Documents/GitHub/Java11Test/build/jre --java-options --add-opens=javafx.base/com.sun.javafx.event=ALL-UNNAMED --java-options --add-opens=javafx.base/com.sun.javafx.collections=ALL-UNNAMED --java-options --add-opens=javafx.base/com.sun.javafx.runtime=ALL-UNNAMED --java-options --add-opens=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED --java-options --add-opens=javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED --java-options --add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED --java-options --add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED --java-options --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED --mac-sign --icon src/main/deploy/package/macosx/hello.icns --mac-package-identifier com.my-company.hellofx |
| 150 | + // * /Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home/bin/jpackage --type pkg --dest /Users/daniel/Documents/GitHub/Java11Test/build/jpackage --name hello-fx --app-version 25.11.04 --app-image /Users/daniel/Documents/GitHub/Java11Test/build/jpackage/hello-fx.app --app-version 25.11.04 --vendor "My Company" --copyright "My Company" --mac-sign |
| 151 | + // * /Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home/bin/jpackage --type dmg --dest /Users/daniel/Documents/GitHub/Java11Test/build/jpackage --name hello-fx --app-version 25.11.04 --app-image /Users/daniel/Documents/GitHub/Java11Test/build/jpackage/hello-fx.app --app-version 25.11.04 --vendor "My Company" --copyright "My Company" --mac-sign |
| 152 | + |
146 | 153 | } else if(os.windows) { |
147 | 154 | imageOptions = ['--icon', 'src/main/deploy/package/windows/coffee.ico'] |
148 | 155 | installerType = 'msi' |
|
0 commit comments