LinusU / node-appdmg

💾 Generate your app dmgs
MIT License
1.68k stars 152 forks source link

background image broken #159

Open jleppert opened 6 years ago

jleppert commented 6 years ago

I tried everything all permutations but it doesn't work

LinusU commented 6 years ago

Could you please elaborate on what the problem is, and what you have tried?

agustincelentano commented 6 years ago

I use my own background image but it is not being loaded. What I doing wrong? I took the sample file as a model.

Joris-van-der-Wel commented 6 years ago

I had exactly the same issue. I can verify that my png image gets copied to the dmg, however the background does not actually show up in finder....

const dmg = appdmg({
    target: '/absolute-path-to.dmg',
    basepath: __dirname,
    specification: {
        title: `MyApp v1.2.3`,
        icon: 'icons/my-app.icns',
        background: 'my-background.png',
        'icon-size': 64,
        window: {
            size: {
                width: 600,
                height: 500,
            },
        },
        format: 'UDBZ',
        contents: [
            {x: 100, y: 380, type: 'link', path: '/Applications'},
            {x: 400, y: 380, type: 'file', path: 'build/MyApp.app'},
        ],
    },
});

After playing around a little I managed to fix it. Turns out I had a space character in specification.title, after removing the space the background shows up:

const dmg = appdmg({
    target: '/absolute-path-to.dmg',
    basepath: __dirname,
    specification: {
        title: `MyApp-v1.2.3`,
        // snip
    },
});
LinusU commented 5 years ago

This is probably a limitation on how we currently generate the .DS_Store file, try to avoid long names, and special characters in names for now...

SharkAttack99 commented 4 years ago

Confirmed that a a space in the title will cause the background to not display.

appfrilans commented 4 years ago

Cannot either get the background to work. Downloaded the TestBkg@2x and TestBkg files. My json looks like this:

{
  "title": "Title",
  "icon": "icon.png",
  "background": "TestBkg.png",
  "contents": [
    { "x": 448, "y": 344, "type": "link", "path": "/Applications" },
    { "x": 192, "y": 344, "type": "file", "path": "MyApp.app" }
  ]
}

icon.png does not show up either.

mkdotcom commented 4 years ago

Confirmed that a a space in the title will cause the background to not display.

ouyanx commented 3 years ago

In my case, don't use Chinese title. Just English !

JasinYip commented 3 years ago

Having same problem while my title is Chinese.

cdiddy77 commented 1 year ago

Have same problem when my title contains the english text name of my product. I replace with "install" and it works. Magic?

debugly commented 1 year ago

In my case, don't use Chinese title. Just English !

this is a good solution: https://github.com/LinusU/node-appdmg/issues/129#issuecomment-352206694