> On Oct 31, 2022, at 4:17 PM, Alexander Matveev <alexander.matv...@oracle.com> 
> wrote:
> 
> Hi Michael,

Hello Alexander,

> 
> If I understood correctly you asking for several things:
> 
> 1) Change “/Applications” to “Applications”. I agree and we should fix it if 
> possible. Did you file a bug for it? If not I can file.

I thought I did but haven’t received a number yet.

> 
> 2) Resize DMG window to show additional content which was added via 
> --mac-dmg-content, so user does not have to scroll or manually resize window? 
> I think we can investigate this, but I think we still need to limit by how 
> many additional files we want to display in case if user adds for example 100 
> files (very unlikely). Do you want to file enhancement for this? Or I can do 
> it.

Not only resize the window but also the icons. It gives you a better appearance 
than the current. I’m not sure you want to police the number of files, that 
would be up the user. Usually I don’t think anyone is going to include anywhere 
near that. I saw a few dmg’s on my machine that had two or three extra files.

> 
> 3) From your email "SceneBuilder OS/X DMG’s” do you mean provide ability to 
> localize “Applications” folder name? I think we can do this, but user will 
> need to produce separate localized DMG for each language.

I don’t know that I had any responses indicating anyone is doing this or wants 
it. I wasn’t sure if you already were doing any localizing. If not, I don’t 
think its a current concern.

I already implemented changes for this. I signed the OCA so thought I might 
attempt the update. No clue right now what that really involves. So with the 
OCA signed you could probably just go ahead with my changes if you want?

I posted the change to MacDmgBundler in my prior. My changed DMGsetup.scpt is…

tell application "Finder"
  set theDisk to a reference to (disks whose URL = "DEPLOY_VOLUME_URL")
  open theDisk

  set theWindow to a reference to (container window of disks whose URL = 
"DEPLOY_VOLUME_URL")

  set current view of theWindow to icon view
  set toolbar visible of theWindow to false
  set statusbar visible of theWindow to false

  -- size of window should fit the size of background
  set the bounds of theWindow to {400, 100, 920, 480}

  set theViewOptions to a reference to the icon view options of theWindow
  set arrangement of theViewOptions to not arranged
  set icon size of theViewOptions to "DEPLOY_ICON_SIZE"
  set background picture of theViewOptions to POSIX file "DEPLOY_BG_FILE"

  -- Create alias for install location
  make new alias file at POSIX file "DEPLOY_VOLUME_PATH" to POSIX file 
"DEPLOY_INSTALL_LOCATION" with properties {name:"Applications"}

  set allTheFiles to the name of every item of theWindow
  set xpos to 120
  repeat with theFile in allTheFiles
    set theFilePath to POSIX path of theFile
    set appFilePath to POSIX path of "/DEPLOY_TARGET"
    if theFilePath is "DEPLOY_INSTALL_LOCATION" then
      -- Position install location
      set position of item theFile of theWindow to {390, 130}
    else if theFilePath ends with appFilePath then
      -- Position application or runtime
      set position of item theFile of theWindow to {120, 130}
    else
      -- Position all other items in a second row.
      set position of item theFile of theWindow to {xpos, 290}
      set xpos to xpos + 95
    end if
  end repeat


  update theDisk without registering applications
  delay 5
  close (get window of theDisk)
end tell

If you want to use that. 

Reply via email to