Our team is creating DMG for application installer using node-appdmg. If application icon is shown in visible area and the hidden icons are moved to the right outside of the visible area following happens:
If the icons are hidden and the icon position is as defined in appdmg.json
If user has com.apple.finder "AppleShowAllFiles" set to true or simply hit the CMD+Shift+. then the position of icon is shifted.
DMG when com.apple.finder "AppleShowAllFiles" is false - this is expected behaviour hidden-not-visible
Here is content of the appdmg.json file
{
"title": "App",
"icon": "icon.icns",
"background": "background.png",
"background-color": "mintcream",
"icon-size": 96,
"window": {
"position": { "x": 200, "y": 200 },
"size": { "width": 400, "height": 400 }
},
"contents": [
{ "x": 200, "y": 200, "type": "file", "path": "App.app" },
{ "x": 600, "y": 0, "type": "position", "path": ".background" },
{ "x": 600, "y": 0, "type": "position", "path": ".DS_Store" },
{ "x": 600, "y": 0, "type": "position", "path": ".Trashes" },
{ "x": 600, "y": 0, "type": "position", "path": ".VolumeIcon.icns" }
]
}
And this happens when the com.apple.finder "AppleShowAllFiles" is true and hidden icons are right to visible area(as described in the appdmg.json)
We thought that this is issue with the appearing scrollbar, but the shift is too big, scrollbar is only few dozens pixels wide and shift is hundred or even more(did not measured exactly). We also tried to move icons down under the visible area. The icon moves counterintuitively to the right closer to the scrollbar.
Here is the layout when the com.apple.finder "AppleShowAllFiles" is true and hidden icons are under the visible area.
{
"title": "App",
"icon": "icon.icns",
"background": "background.png",
"background-color": "mintcream",
"icon-size": 96,
"window": {
"position": { "x": 200, "y": 200 },
"size": { "width": 400, "height": 400 }
},
"contents": [
{ "x": 200, "y": 200, "type": "file", "path": "App.app" },
{ "x": 0, "y": 600, "type": "position", "path": ".background" },
{ "x": 0, "y": 600, "type": "position", "path": ".DS_Store" },
{ "x": 0, "y": 600, "type": "position", "path": ".Trashes" },
{ "x": 0, "y": 600, "type": "position", "path": ".VolumeIcon.icns" }
]
}
Is there something we are doing wrong perhaps in appdmg.json file? We think it is bug so I have already created issue in the GH repository, but no one commented yet.
Maybe someone here has encountered and solved this. Thanks for any response.