From 676abef9caf18a79bfb555d28525f73bf9ca61ad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 14 Oct 2026 14:04:53 +0000 Subject: [PATCH 1/2] Initial plan From 7564117e85c741c4116f7a75a58753dad7deaa88 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 14 Oct 2026 14:08:28 +0000 Subject: [PATCH 2/2] Remove pre-commit whitespace violations Co-authored-by: shroffk <2111304+shroffk@users.noreply.github.com> --- .vscode/settings.json | 5 ++++ README.md | 18 ++++++------- phoebus-product/README.md | 56 +++++++++++++++++++-------------------- 3 files changed, 42 insertions(+), 37 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..5c25d8ccd9 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "debug.hideSlowPreLaunchWarning": true, + "java.debug.settings.forceBuildBeforeLaunch": false, + "java.debug.settings.onBuildFailureProceed": false +} diff --git a/README.md b/README.md index 34a4349184..c267b692ec 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ mvn clean verify -f dependencies/pom.xml ## Building with maven -Define the JAVA_HOME environment variable to point to your Java installation directory. +Define the JAVA_HOME environment variable to point to your Java installation directory. Mac OS users should use something like: ``` export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-21.0.11+10/Contents/Home @@ -52,7 +52,7 @@ Set the environment variable `LANG` to `en_US.UTF-8` to execute tests in a specific locale, or build with `mvn -DskipTests ...` to skip tests. -### Running the phoebus application +### Running the phoebus application To run the product jar ``` @@ -253,20 +253,20 @@ Create a sonatype account and update the maven settings.xml file with your sonat ``` -**Prepare the release** -`mvn release:prepare` +**Prepare the release** +`mvn release:prepare` In this step will ensure there are no uncommitted changes, ensure the versions number are correct, tag the scm, etc. A full list of checks is documented [here](https://maven.apache.org/maven-release/maven-release-plugin/usage/prepare-release.html). -**Perform the release** -`mvn -Darguments="-Dskip-executable-jar" -Pdocs,releases release:perform` +**Perform the release** +`mvn -Darguments="-Dskip-executable-jar" -Pdocs,releases release:perform` Checkout the release tag, build, sign and push the build binaries to sonatype. The `docs` profile is needed in order to create required javadocs jars. -**Publish** +**Publish** Open the staging repository in [sonatype](https://s01.oss.sonatype.org/#stagingRepositories) and hit the *publish* button **Note:** -In order to keep the ant and maven builds in sync, before the prepare:release update the `version` in the -dependencies\ant_settings.xml to match the release version number. After the release is completed the `version` should +In order to keep the ant and maven builds in sync, before the prepare:release update the `version` in the +dependencies\ant_settings.xml to match the release version number. After the release is completed the `version` should updated to match the next development snapshotData version. diff --git a/phoebus-product/README.md b/phoebus-product/README.md index 96fb1a4d96..43dd3f2b32 100644 --- a/phoebus-product/README.md +++ b/phoebus-product/README.md @@ -18,66 +18,66 @@ For site-specific examples, see * https://github.com/shroffk/nsls2-phoebus (actually creates several products for 'beamline' vs. 'accelerator') * https://github.com/kasemir/phoebus-sns - + ## Building native installers with `jpackage` - - `jpackage` (https://docs.oracle.com/en/java/javase/14/docs/specs/man/jpackage.html) is a tool bundled with the - JDK from version 14. It can be used to build native installers for MacOS (pkg or dmg), - Windows (msi or exe) and Linux (deb or rpm). Such installers will include all dependencies, including the Java + + `jpackage` (https://docs.oracle.com/en/java/javase/14/docs/specs/man/jpackage.html) is a tool bundled with the + JDK from version 14. It can be used to build native installers for MacOS (pkg or dmg), + Windows (msi or exe) and Linux (deb or rpm). Such installers will include all dependencies, including the Java runtime. - + The following use cases have been verified: - + * MacOS versions 10,11,12,13, dmg and pkg. * Windows 10, msi only. - + #### Prerequisites * A working Phoebus build environment, i.e. JDK 11 and Maven. * `jpackage` must be run on the same OS as the target OS, i.e. cross builds are not supported. - * JDK 14 or newer. + * JDK 14 or newer. * On Windows you also need to install the "WiX" tools, available here: https://wixtoolset.org/. * Prepare application icons, to be placed in the top level folder of your product package: * `ico` for Windows * `icns` for MacOS * `png` for Linux - + #### Step-by-step - + 1. Build your product package (zip or gz), e.g. `mvn -Djavafx.platform=[linux|win|mac] clean verify`. 2. Copy the generated zip/gz file to some temporary folder and cd to it. 3. Extract the zip/gz. In the following the folder created is referred to as `unzipped`. 4. Identify the name of the product jar. In the following referred to as `product--.jar`. 5. Determine a version for your application, in the following referred to as `app_version`. 6. For Window installers determine a menu group in which the application will be placed. If the group does not - exist, it will be created. + exist, it will be created. 7. Identify the path to the Java 11 SDK. In the following referred to as ``. See below for additional information on the selecttion of target Java runtime. - + ##### `jpackage` build step 1 `jpackage --name --input unzipped --type app-image --main-jar product--.jar --icon unzipped/ [--java-options -Dprism.lcdtext=false] --java-options --java-options -Dcom.sun.webkit.useHTTP2Loader=false --runtime-image ` - + NOTE: the `--java-options -Dprism.lcdtext=false` portion is for MacOS only. - + Additional Java options are added using `--java-options `. ##### `jpackage` build step 2, MacOS `jpackage --name --app-version --app-image .app --type [pkg|dmg]` - + ##### `jpackage` build step 2, Windows `jpackage --name --app-version --app-image --type [msi|exe] --win-menu --win-shortcut --win-menu-group ` ##### `jpackage` build step 2, Linux `jpackage --name --app-version --app-image --type [deb|rpm]` - -#### Additional installer options -Additional customization of the installer is available for all platforms, + +#### Additional installer options +Additional customization of the installer is available for all platforms, see https://docs.oracle.com/en/java/javase/14/docs/specs/man/jpackage.html. ### Deployment considerations -The application policy of the target OS may prohibit installation or launch of a package or application downloaded over HTTP(S). On +The application policy of the target OS may prohibit installation or launch of a package or application downloaded over HTTP(S). On Windows 10 the user will be presented with a warning message that can be dismissed to complete the installation. On MacOS 10.15.7 the installation will complete, but the application may not be able to launch. @@ -92,17 +92,17 @@ and MacOS at the European Spallation Source. ### Selection of target Java runtime During build (step 1) a target Java runtime is specified. If this option (`--runtime-image`) is omitted, `jpackage` will bundle the Java runtime containing the `jpackage` tool, i.e. Java 14+. Tests on Windows shows that the -target runtime selection may impact the end result, i.e. the Phoebus application installed from the msi file. -For instance, while the Java runtime Adopt JDK 11.0.9 can be bundled into a working installation, +target runtime selection may impact the end result, i.e. the Phoebus application installed from the msi file. +For instance, while the Java runtime Adopt JDK 11.0.9 can be bundled into a working installation, Adopt JDK 11.0.12 will not work when Phoebus is launched. On MacOS Adopt JDK 11.0.12 works fine. ### Application signing Starting from MacOS 13.2 (possibly from 13.0), installer packages must be signed for a hassle-free installation process. To include signing in the `jpackage` build, add the following in step 1: -`--mac-sign ---mac-package-identifier org.phoebus.product.Launcher ---mac-package-name CSS-Phoebus ---mac-signing-keychain "/Library/Keychains/System.keychain" +`--mac-sign +--mac-package-identifier org.phoebus.product.Launcher +--mac-package-name CSS-Phoebus +--mac-signing-keychain "/Library/Keychains/System.keychain" --mac-signing-key-user-name 'Developer ID Application: European Spallation Source Eric (W2AG9MPZ43)'`. Here the `--mac-signing-key-user-name` value identifies a certificate installed on the Mac OS host. Note that the @@ -111,5 +111,5 @@ Developer Program may request/create such certificates. ` - - \ No newline at end of file + +