<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Thank you for the explanation.<div><br></div><div>It was not obvious to me that the configuration of the DMG appearance actually means configuring the .DS_Store file in the DMG.</div><div><br></div><div>  Alan<br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Mar 4, 2024, at 1:27 PM, Alexander Matveev <alexander.matveev@oracle.com> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Arial, sans-serif;">Hi Alan,<o:p></o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Arial, sans-serif;"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Arial, sans-serif; color: rgb(23, 43, 77); background: white;">See below.</span><span style="font-size: 11pt; font-family: Arial, sans-serif;"><o:p></o:p></span></div><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div id="mail-editor-reference-message-container"><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; border-image: none; padding: 3pt 0in 0in;"><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 10pt; font-family: Aptos, sans-serif;"><b><span style="font-size: 12pt;">From:<span class="Apple-converted-space"> </span></span></b><span style="font-size: 12pt;">core-libs-dev <<a href="mailto:core-libs-dev-retn@openjdk.org" style="color: rgb(70, 120, 134); text-decoration: underline;">core-libs-dev-retn@openjdk.org</a>> on behalf of Alan Snyder <<a href="mailto:javalists@cbfiddle.com" style="color: rgb(70, 120, 134); text-decoration: underline;">javalists@cbfiddle.com</a>><br><b>Date:<span class="Apple-converted-space"> </span></b>Sunday, March 3, 2024 at 7:09</span><span style="font-size: 12pt; font-family: Arial, sans-serif;"> </span><span style="font-size: 12pt;">PM<br><b>To:<span class="Apple-converted-space"> </span></b><a href="mailto:core-libs-dev@openjdk.org" style="color: rgb(70, 120, 134); text-decoration: underline;">core-libs-dev@openjdk.org</a><span class="Apple-converted-space"> </span><<a href="mailto:core-libs-dev@openjdk.org" style="color: rgb(70, 120, 134); text-decoration: underline;">core-libs-dev@openjdk.org</a>><br><b>Subject:<span class="Apple-converted-space"> </span></b>jpackage requests permission via a dialog<o:p></o:p></span></p></div><div><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">I tried using jpackage on macOS to create a DMG (which I have not done before) and was surprised when a system dialog was displayed requesting permission for Terminal to control Finder.<br><br>I found this issue described in JDK-8231855, which was closed without explanation as “not an issue”.<o:p></o:p></span></p><div style="margin: 0in; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Arial, sans-serif;">From<span class="Apple-converted-space"> </span></span><span style="font-size: 11pt; font-family: Arial, sans-serif;">JDK-8231855: “<span style="color: rgb(23, 43, 77); background: white;">Looks like this dialog is part of macOS Catalina Data Protection features. I did not found if it possible not to trigger this prompt. Also, this prompt is shown only once and subsequent jpackage runs will not show any prompts. As workaround in case when jpackage will be part of automated build system which needs to be run without user intervention it is recommended to run jpackage first on this system and confirm any prompts.”.<o:p></o:p></span></span></div><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><br>It seems to me that having a command line build tool try to interact with a user via a dialog is inappropriate, even if it happens only once per system.<o:p></o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Arial, sans-serif;">So far, I did not figure out other solution for this problem.</span><span style="font-size: 11pt;"><br><br>I’m not sure why this dialog is shown, as it appears that all of the actions are performed by running the hdiutil program.<o:p></o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Arial, sans-serif;">This dialog is shown when we running osascript (<a href="https://github.com/openjdk/jdk/blob/master/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/DMGsetup.scpt" style="color: rgb(70, 120, 134); text-decoration: underline;">https://github.com/openjdk/jdk/blob/master/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/DMGsetup.scpt</a>) to post process DMG file. This script will setup DMG background and re-arrange icons, so it look nice.</span><span style="font-size: 11pt;"><br><br>It does seem odd, however, that jpackage mounts the DMG to modify its contents. Shouldn’t the contents be set up before creating the DMG?<o:p></o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Arial, sans-serif;">We need to mount it to run osascript I mentioned above.<br></span><span style="font-size: 11pt;"><br>Is mounting the image the source of the dialog?<o:p></o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Arial, sans-serif;">No, dialog is shown after we mount it from osascript which is run right after DMG is mounted.<br></span><span style="font-size: 11pt;"><br>Is there some reason this cannot be fixed?<o:p></o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Arial, sans-serif;">So far I did not found any substitution to our osascript to setup background image and re-arrange icons. I do not think that Apple provides any other ways to do it.<o:p></o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Arial, sans-serif;">Thanks,<o:p></o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 10pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt; font-family: Arial, sans-serif;">Alexander</span></p></div></div></div></div></div></blockquote></div><br></div></body></html>