bdist_dmg

This command is available on macOS systems; it creates an application bundle, then package it into a DMG disk image suitable for distribution and installation.

The following options are available for the command:

volume-label

Volume label of the DMG disk image

applications-shortcut

Boolean for whether to include shortcuts to Applications in the DMG disk image

silent (-s)

suppress all output except warnings

format

Format of the DMG disk image [default: “UDZO”]

filesystem

Filesystem of the DMG disk image [default: “HFS+”]

size

specifies the size of the filesystem within the image; otherwise, cx_Freeze (and then dmgbuild) will attempt to determine a reasonable size for the image. If you set this, you should set it large enough to hold the files you intend to copy into the image. The syntax is the same as for the -size argument to hdiutil, i.e. you can use the suffixes b, k, m, g, t, p and e for bytes, kilobytes, megabytes, gigabytes, terabytes, exabytes and petabytes respectively.

background

A rgb color in the form #3344ff, svg named color like goldenrod, a path to an image, or the words “builtin-arrow”. [default: None]

show-status-bar

Show the status bar in the Finder window. [default: False]

show-tab-view

Show the tab view in the Finder window. [default: False]

show-path-bar

Show the path bar in the Finder window. [default: False]

show-sidebar

Show the sidebar in the Finder window. [default: False]

sidebar-width

Width of the sidebar in the Finder window. [default: None]

windows-rect

Window rectangle in the form x, y, width, height. The position of the window in ((x, y), (w, h)) format, with y coordinates running from bottom to top. The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use (0, 100000) as the x, y coordinates. Unfortunately it doesn’t appear to be possible to position the window relative to the top left or relative to the centre of the user’s screen.

icon-locations

A dictionary specifying the coordinates of items in the root directory of the disk image, where the keys are filenames and the values are (x, y) tuples. For example, icon-locations = {“Applications”: (100, 100), “README.txt”: (200, 100)}

default-view

The default view of the Finder window. Possible values are “icon-view”, “list-view”, “column-view”, “coverflow”.

show-icon-preview

Show icon preview in the Finder window. [default: False]

license

Dictionary specifying license details with “default-language”, “licenses”, and “buttons”.

default-language: Language code (e.g., “en_US”) if no matching system language. licenses: Map of language codes to license file paths (e.g., {“en_US”: “path/to/license_en.txt”}). buttons: Map of language codes to UI strings ([language, agree, disagree, print, save, instruction]). Example: {“default-language”: “en_US”, “licenses”: {“en_US”: “path/to/license_en.txt”}, “buttons”: {“en_US”: [“English”, “Agree”, “Disagree”, “Print”, “Save”, “Instruction text”]}}

See also

The above options come from the dmgbuild package. For more information, see the dmgbuild documentation .

This is the equivalent help to specify the same options on the command line:

cxfreeze bdist_dmg --help
python setup.py bdist_dmg --help