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

jpackage --dmg produces disk image with icons not positioned correctly/missing

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      os_x

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Mac OS X 10.15.5
      java --version
      openjdk 16-ea 2021-03-16
      OpenJDK Runtime Environment (build 16-ea+6-203)
      OpenJDK 64-Bit Server VM (build 16-ea+6-203, mixed mode, sharing)

      A DESCRIPTION OF THE PROBLEM :
      When jpackage is used to produce a .dmg, the /Applications alias does not get placed in the disk image and the hidden folders are not placed outside of the bounds of the window. It would appear that the dmg-setup.scpt fails with Finder reporting an error.

      There is the same problem in jdk15.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run a command similar to the following:
      jpackage --type dmg --app-image /Users/davidjlgradwell/NetBeansDev/PKBAnt/jpackageappimageoutput/PKB.app --name PKBInstaller --dest /Users/davidjlgradwell/NetBeansDev/PKBAnt/jpackagedmgoutputTest3 --resource-dir /Users/davidjlgradwell/NetBeansDev/PKBAnt/resources --verbose
      Open disk image produced and examine.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Both the new application's icon and the /Applications alias icon should show in an appropriate place. The hidden icons should be positioned outside the visible window so that they are not visible to the user even if they have "Show hidden files" turned on.
      ACTUAL -
      The /Applications icon is not written to the disk image and hence does not appear. It would seem that the dmg-setup.scpt fails. The relevant part of the --verbose output is

      [14:58:01.147] Running [osascript, /var/folders/0s/796js79s4v5b6cp2c49xsdvr0000gn/T/jdk.incubator.jpackage15137994083275299714/config/PKBInstaller-dmg-setup.scpt]
      [14:58:06.377] /var/folders/0s/796js79s4v5b6cp2c49xsdvr0000gn/T/jdk.incubator.jpackage15137994083275299714/config/PKBInstaller-dmg-setup.scpt:476:517: execution error: Finder got an error: Can’t set 1 to false. (-10006)
      [14:58:06.378] java.io.IOException: Command [osascript, /var/folders/0s/796js79s4v5b6cp2c49xsdvr0000gn/T/jdk.incubator.jpackage15137994083275299714/config/PKBInstaller-dmg-setup.scpt] exited with 1 code
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.Executor.executeExpectSuccess(Executor.java:75)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.IOUtils.exec(IOUtils.java:183)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.IOUtils.exec(IOUtils.java:151)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.MacDmgBundler.buildDMG(MacDmgBundler.java:395)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.MacDmgBundler.bundle(MacDmgBundler.java:91)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.MacDmgBundler.execute(MacDmgBundler.java:537)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.Arguments.generateBundle(Arguments.java:664)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.internal.Arguments.processArguments(Arguments.java:538)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.main.Main.execute(Main.java:98)
      at jdk.incubator.jpackage/jdk.incubator.jpackage.main.Main.main(Main.java:52)


      CUSTOMER SUBMITTED WORKAROUND :
      None.

      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                adev ANUPAM DEV
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: