On Tue, 25 Nov 2025 17:24:26 GMT, Alexey Semenyuk <[email protected]> wrote:
>> Added following tests:
>> - Verify mac app store PKG doesn't have scripts (added to
>> `PkgScriptsTest.java`).
>> - `--launcher-as-service` ignored for mac app store PKG (added to
>> `ServiceTest.java`).
>> - `--launcher-as-service` for additional launcher ignored for mac app store
>> PKG (added to `ServiceTest.java`).
>
> test/jdk/tools/jpackage/share/ServiceTest.java line 229:
>
>> 227:
>> appImageCmd.cmd().orElseThrow().addArgument("--mac-app-store");
>> 228: }
>> 229:
>
> Why do we need this option for an app image?
Without it jpackage will add launchers as a service even if `--mac-app-store`
is specified for PKG. I do not think it is a bug. jpackage takes
`--mac-app-store` value from predefined app image. Specifying it when
generating PKG at line 265 is not needed and was added to make
`cmd.hasArgument("--mac-app-store")` work. Maybe we need another approach and
add isMacAppStore() function somewhere which will check predefined app image or
`cmd.hasArgument("--mac-app-store")` to figure out if we generating for Mac App
Store.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28487#discussion_r2561089855