RFR: 8263154: [macos] DMG builds have finder errors
Alexander Matveev
almatvee at openjdk.java.net
Thu Apr 15 22:21:41 UTC 2021
On Thu, 15 Apr 2021 01:24:04 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:
> - Issue was reproducible when install-dir points to some invalid location.
> - Fixed by defaulting DMG drag and drop location to /Applications folder and --install-dir will be ignored with warning for DMG.
> - I do not see any way to support other valid, but uncommon locations for drag and drop. For example: /Users/USERNAME/Applications is not possible to support since user name is not known. /usr/bin requires root privileges and should contain symbolic links. Locations which does not exist also not possible to support, since DMG cannot create paths. So /Applications/MyCompany is not possible for DMG.
Not sure if I understood question about PKG. PKG can create destination folders and will have root access once elevated, so user can specify any locations for --install-dir in case of PKG.
Well DMG is not an installer it is just disk image which contains app (think of it as archive file), so we cannot really support all functionality with DMG as with actual installers.
Yes, I can check if install-dir exist with apple script, but destination machine might not have this folder. Permissions might be different on folder on machine which generates DMG and machine which will install it.
If PKG cannot be install into user home Applications folder, then it is another bug.
Also, if someone really want --install-dir to some other location they can overwrite apple script we using via resource folder. This fix only affects apple script we generate to customize DMG. Extra step for user, but I think it will not be common anyway.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3505
More information about the core-libs-dev
mailing list