DMG
Generate a DMG with Electron Forge to distribute your Electron app on macOS.
The DMG target builds Apple Disk Image (.dmg
) files, which are the standard format for sharing macOS apps. The DMG acts like a ZIP file, but provides an easy way for users to take the app and put it in the /Applications
directory.
Static file auto-updates with DMG distributions
The Squirrel.Mac implementation behind Electron's autoUpdater
module on macOS supports static file auto-updates from the ZIP artifacts uploaded to your cloud storage Publishers.
If you want to distribute a DMG that supports static file auto-updates, make sure to also make a ZIP target and follow the Auto updating from S3 instructions to configure updates.
Requirements
You can only build the DMG target on macOS machines.
Installation
npm install --save-dev @electron-forge/maker-dmg
Usage
To use @electron-forge/maker-dmg
, add it to the makers
array in your Forge configuration:
module.exports = {
makers: [
{
name: '@electron-forge/maker-dmg',
config: {
background: './assets/dmg-background.png',
format: 'ULFO'
}
}
]
};
Configuration options are documented in MakerDMGConfig
.
Debugging
For advanced debug logging for this maker, add the DEBUG=electron-installer-dmg*
environment variable.
Last updated
Was this helpful?