LinusU / node-appdmg

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

Not an issue but a question #222

Open simon88 opened 1 year ago

simon88 commented 1 year ago

Hi I'm trying to specify the size of the windows but it's doesn't work, here is what I've done:

{
  "title": "test",
  "background": "2.png",
  "icon-size": 90,
  "window": {
    "size": {
        "width": 600,
        "height": 500,
    },
  },
  "contents": [
    { "x": 100, "y": 350, "type": "file", "path": "test.app" },
    { "x": 600, "y": 350, "type": "link", "path": "/Applications" }
  ]
}
misterpropik commented 7 months ago

did you find a solution?

jozefizso commented 4 months ago

This is the correct way to set window size for the DMG package.

You JSON must be fixed because it is not valid:

Error: Parse error on line 8:
... "height": 500,    },  },  "contents"
----------------------^
Expecting 'STRING', got '}'
{
    "title": "test",
    "background": "2.png",
    "icon-size": 90,
    "window": {
        "size": {
            "width": 600,
            "height": 500
        }
    },
    "contents": [
        {
            "x": 100,
            "y": 350,
            "type": "file",
            "path": "test.app"
        },
        {
            "x": 600,
            "y": 350,
            "type": "link",
            "path": "/Applications"
        }
    ]
}