LinusU / node-appdmg

💾 Generate your app dmgs
MIT License
1.67k stars 151 forks source link

Hidden file affects the position of the icon and cause layout confusion #237

Open cdwmhcc opened 7 months ago

cdwmhcc commented 7 months ago
{
  "title": "Test Application",
  "icon": "test-app.icns",
  "background": "test-background.png",
  "contents": [
    { "x": 448, "y": 344, "type": "link", "path": "/Applications" },
    { "x": 192, "y": 344, "type": "file", "path": "/Applications/TestApp.app" },
    { "x": 5000, "y": 0, "type": "position", "path": ".VolumeIcon.icns" },
    { "x": 5000, "y": 0, "type": "position", "path": ".background" },
    { "x": 5000, "y": 0, "type": "position", "path": ".DS_Store"}
  ]
}

If contents contains items with "type": "position"

  1. Will affect the x and y values in "type": "file" and "type": "link".
  2. When the user uses the shortcut keys command + shift + . to show/hide files, it will cause layout confusion. (If it doesn’t happen again, you can exit dmg and reopen it)
cdwmhcc commented 7 months ago

In addition, when you open the dmg for the first time, the icon will flash. I used dropdmg as well as dmg canvas for testing and they have no such side effects.