Jpackage OS/X DMG install Application folder alias name incorrectly shows as path with /

Alexander Matveev alexander.matveev at oracle.com
Mon Oct 31 21:17:30 UTC 2022


Hi Michael,

If I understood correctly you asking for several things:

1) Change “/Applications” to “Applications”. I agree and we should fix it if possible. Did you file a bug for it? If not I can file.

2) Resize DMG window to show additional content which was added via --mac-dmg-content, so user does not have to scroll or manually resize window? I think we can investigate this, but I think we still need to limit by how many additional files we want to display in case if user adds for example 100 files (very unlikely). Do you want to file enhancement for this? Or I can do it.

3) From your email "SceneBuilder OS/X DMG’s” do you mean provide ability to localize “Applications” folder name? I think we can do this, but user will need to produce separate localized DMG for each language.

Thanks,
Alexander

On Oct 30, 2022, at 2:42 PM, Michael Hall <mik3hall at gmail.com<mailto:mik3hall at gmail.com>> wrote:



On Oct 26, 2022, at 7:55 PM, Michael Hall <mik3hall at gmail.com<mailto:mik3hall at gmail.com>> wrote:

I was looking to see what any other dmg’s I have do to handle this. Not many do. But those usually seem to use a smaller background image and icons.
I may look at that to see if I can manage something like that.

I made some changes that I think might address this. I tried to make the changes as trivial as possible.

The only change to java is in MacDmgBundler.java, the prepareDMGSetupScript method. I added…

        List <String> dmgContent = DMG_CONTENT.fetchFrom(params);
        if (dmgContent.size() > 0) {
         data.put("DEPLOY_ICON_SIZE", "64");
        }
        else {
         data.put("DEPLOY_ICON_SIZE", "128");
        }

I tried counting files in volumePath first but got a FileNotFoundException. Possibly actually a privilege access error?

I obviously added DEPLOY_ICON_SIZE to the AppleScript and changed some spacing and sizing. I wanted to be able to comfortably show up to four additional files without scrolling.

I also put in something for /Applications. I simply hard coded it to “Applications”. This seemed the most straight forward trivial way to do this. Unless someone indicates where it is or might be something other than Applications.

I put screenshots of the before and after DMG windows at http://mikehall.pairserver.com/DMG_windows.dmg
The only after appearance drawback is extra white space at the bottom of the application only window. This could be fairly easy to correct but isn’t really that bad looking.

I appreciate the jpackage people implementing this feature and would appreciate it if they consider this, essentially, cosmetic change.

Thanks.

I mentioned this on the javafx list indicating I had discovered you could use a custom background image for the windows. I noticed in the verbose output today that jpackage indicates it currently supports this feature with a correctly named file in the resource directory. So doing anything external would be unncecessary.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20221031/464004a0/attachment-0001.htm>


More information about the core-libs-dev mailing list