Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8356218

[macos] Document --app-content

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • 26
    • 17, 21, 24, 25
    • tools
    • generic
    • os_x

      On macos, misuse of the --app-content cli option may fail jpackage to sign an app bundle or later notarization failure.

      On macos, the value of the "--app-content" cli option should point to a directory with the "Resources" subdirectory or any other directory that can be created in the app's "Contents" directory. See [1] for more details about the macos app bundle structure.

      This restriction is not currently documented anywhere. Adding it to the help, man page, and user's guide would be helpful.

      It would also be helpful for jpackage to issue warnings for every item pulled in the app bundle with "--app-content" options not satisfying this restriction.

      jpackage will output a warning if it fails signing, and the "--app-content" option was specified. It was introduced in JDK-8332110, but it is not very helpful as it is not specific. Besides, the warning is displayed only when jpackage fails to sign the app image. If they run jpackage without "--mac-sign" option, the warning will not be displayed, even though the app bundle structure may be invalidated with files pulled in the app image through "--app-content" option.

      See https://github.com/openjdk/jdk/pull/21698#issuecomment-2849491184

      [1] https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW19

            almatvee Alexander Matveev
            asemenyuk Alexey Semenyuk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: