Electron-builder: DMG background resource does not work if projectDir set

Created on 28 Oct 2016  路  2Comments  路  Source: electron-userland/electron-builder

  • Version: 7.14.2

  • Target: OSX(DMG)

When using a projectDir that's different than current directory ("."), specifying a dmg background causes an exception (Error: ENOENT: no such file or directory, lstat 'resources/osx/dmg-background.png').

Code below refers to file https://github.com/electron-userland/electron-builder/blob/master/src/targets/dmg.ts

The root cause seems to be from line 30
await copy(specification.background!, path.join(backgroundDir, backgroundFilename))

Looking at how the dmg icon resource is processed, we notice that it uses path.resolve(packager.projectDir, specification.icon) to find the resource. Maybe that should have been used?

bug mac

All 2 comments

Fix will be released in 20 minutes. Thanks for clear report.

Fixed in 7.15.2

Was this page helpful?
0 / 5 - 0 ratings