# DMG

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.

{% hint style="success" %}
**Static file auto-updates with DMG distributions**

The [Squirrel.Mac](https://github.com/Squirrel/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](/config/publishers.md).

If you want to distribute a DMG that supports static file auto-updates, make sure to also make a [ZIP](/config/makers/zip.md) target and follow the [S3](/config/publishers/s3.md#auto-updating-from-s3) instructions to configure updates.
{% endhint %}

## Requirements

You can only build the DMG target on macOS machines.

## Installation

```sh
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](/config/configuration.md):

{% code title="forge.config.js" %}

```javascript
module.exports = {
  makers: [
    {
      name: '@electron-forge/maker-dmg',
      config: {
        background: './assets/dmg-background.png',
        format: 'ULFO'
      }
    }
  ]
};
```

{% endcode %}

Configuration options are documented in [`MakerDMGConfig`](https://js.electronforge.io/classes/_electron_forge_maker_dmg.MakerDMG.html).

## Debugging

For advanced debug logging for this maker, add the `DEBUG=electron-installer-dmg*` environment variable.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.electronforge.io/config/makers/dmg.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
