RFR: 8351073: [macos] jpackage produces invalid Java runtime DMG bundles [v2]
Alexander Matveev
almatvee at openjdk.org
Wed Jul 16 02:01:57 UTC 2025
On Mon, 14 Jul 2025 23:08:53 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
>> I need it inside `createMacApplication()` before `MacApplication` instance is created.
>
> If you need a property of a `MacApplication` instance, create it and get the property.
> `MacApplicationBuilder.validatedBundleIdentifier()` function is internal and should not be used outside of `MacApplicationBuilder`.
>
> It is OK to call `MacApplicationBuilder.create()` multiple times. See how this is done in [LinuxPackageBuilder.java](https://github.com/openjdk/jdk/blob/f36147b3263662229e9a0ec712b9748711d2d85d/src/jdk.jpackage/linux/classes/jdk/jpackage/internal/LinuxPackageBuilder.java#L48)
Fixed.
>> https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundledevelopmentregion?language=objc
>>
>> By default it will be `en-US`. Not sure why JDK Info.plist has `English`, since it is not a documented value. Also all jpackage Info plist template files also have `English`. I think we need to file a separate bug and change it to `en-US` or remove it. I think remove it is better, since no need to set it to default value.
>>
>> Not sure if it is important for `runtime bundles`, but for `application bundles` it might be important in case if application does not have English localization. For example application is only in German language, then this value should be set to German language ID. I think it might make sense to file a bug to investigate if we want to provide CLI option to specify value for `CFBundleDevelopmentRegion` similar to `--mac-app-category`. Any suggestions?
>
> Please file a bug to address the hardcoded value of the `CFBundleDevelopmentRegion`. We may decide later what to do with it: change it to `en-US`, remove it, or add a new cli option to set it.
Done. [JDK-8362335](https://bugs.openjdk.org/browse/JDK-8362335).
>> Copy-paste. Forgot to update description. I fixed it. `runtimeImageDir` is a value of `--runtime-image` in case of runtime installer.
>
>> runtimeImageDir is a value of --runtime-image in case of runtime installer.
>
> This duplicates `Package.predefinedAppImage()` function. In case of runtime packaging, the "predefined app image" should be the value of `--runtime-image`. Can you evaluate if you can use `Package.predefinedAppImage()` function instead of adding a new one?
`predefinedAppImage(): Optional.empty` - it is empty. I updated code to re-use it for runtime installers and renamed to `predefinedAppOrRuntimeImage ()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26173#discussion_r2208825286
PR Review Comment: https://git.openjdk.org/jdk/pull/26173#discussion_r2208876258
PR Review Comment: https://git.openjdk.org/jdk/pull/26173#discussion_r2208936239
More information about the core-libs-dev
mailing list