RFR: 8350594: Misleading warning about install dir for DMG packaging [v2]

Michael Hall mik3hall at gmail.com
Tue Feb 25 03:27:12 UTC 2025


>> 
>> Warning: "--install-dir" option is ignored for DMG packaging. The installation directory will default to {0}.
> 
> I like this one and yes lets change it: `Warning: "--install-dir" option is ignored for DMG packaging. The installation directory will default to {0}.`
> 

I must be misunderstanding this concern.  Maybe packaging implies something other than just putting the app into a dmg?
jpackage help shows…

Valid values are: {"app-image", "dmg", "pkg”}

By DMG packaging do you mean “dmg” or “pkg”?

Possibly for pkg this makes sense.
 
For MacOS dmg builds if you open them you usually get a Finder window with the application icon and an image with an arrow pointing to an alias of the Application directory. 
The user can then drag and drop the application to the Application directory in that window to do the install themselves. Correct?

For my own development I usually have my build open the dmg and extract the app to the same test directory it is built from.

e.g.

open -Wg HalfPipe-1.0.dmg
ditto /Volumes/HalfPipe/HalfPipe.app outputdir/HalfPipe.app

Either way, I don’t understand where there is ever any need for a —install-dir parameter and am unclear when an installation directory would ever be used for a DMG?

I would think a warning should just indicate that —install-dir is always ignored for dmg builds.





More information about the core-libs-dev mailing list