JDK-8263155 : Allow additional contents for DMG
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: x86_64
  • Submitted: 2021-03-05
  • Updated: 2022-10-31
  • Resolved: 2021-10-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 18
18 b21Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Doesn't apply except OS X specific.

A DESCRIPTION OF THE PROBLEM :
It would be nice if it were possible to include additional files on DMG installs. Possibly a src.zip, PDF or java doc documentation, licenses, etc.





Comments
Changeset: b2128a96 Author: Andy Herrick <herrick@openjdk.org> Date: 2021-10-22 12:17:45 +0000 URL: https://git.openjdk.java.net/jdk/commit/b2128a96670daeca93aca84ee7613b2b337ddfa4
22-10-2021

The additional items go in a second row, and we do not automatically resize (perhaps we should) The result is that: 1.) the background (mainly just the arrow) only goes under the main app and the destination directory so the view is much like without additional content. 2.) only the very top of the second row shows, and there is a vertical scrollbar . you must either resize or scroll to see the additional items. 3.) 3 additional items can fit in the third row before a horizontal scrollbar is added (under the application, arrow, and target dir) if one of the files is .app, it is an error (an ConfigurationException showing the FileAlreadyExistsException. Same thing if any other file is listed twice.
15-10-2021

attached screen shots show first - the default finder view of app with 3 items of additional content, the second shows the same app in finder after window is expanded to show all the items.
15-10-2021

The current suggestion is to create a new command line option : --mac-dmg-content <path to additional content>[,<path to additional content>...] Include all the referenced content in the dmg. This option can be used multiple times. Only valid for Mac dmg type bundles The mac-dmg-content argument is a comma separated list of paths to any content (presumably a runtime image or pkg, but can be anything) The Disk Image created by jpackage will include the application plus all the mac-dmg-content. It's dmg script will show in finder the main app image and prompt to move it to the install-dir (as now) but will also show all the co-bundled items.
11-10-2021

Originally part of JDK-8208405, this is now an independent enhancement.
11-10-2021

Additional information received from submitter ==================================== No this is different from including files internal to the application. A DMG is a disk image that opens (mounts) just like a OS X directory into it’s own window showing the contents. Currently jpackage should open and show your application, an arrow icon, and a folder Applications icon so that you can do a drag and drop install of the application by moving the app icon to the folder icon. Right now that is all you see when you open a jpackage DMG. Actually right now you don’t see the Applications folder icon. That is due to the bug from https://bugs.openjdk.java.net/browse/JDK-8263154 which I reported and you also emailed me on. Sometimes you might wish to have other files available to the user in the DMG itself. Such as those mentioned in the RFE. The jpackage options you indicate allow additional files to be included in the application itself not the built DMG. That is what the RFE is requesting. Additional files to be included in the created disk image.
08-03-2021

The required files like src.zip, pdf etc. can be added in a directory and using jpackage with --input or -i input path should do the work. Requested submitter to check if he really wants this.
05-03-2021