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

Michael Hall mik3hall at gmail.com
Sun Oct 30 21:42:03 UTC 2022



> On Oct 26, 2022, at 7:55 PM, Michael Hall <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 <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/20221030/018ec262/attachment.htm>


More information about the core-libs-dev mailing list