Command Line Tool

Command Line Tool

The dmgcanvas command line tool allows you to build disk images from DMG Canvas documents using the command line. With scripting, you can use dmgcanvas to automate your disk image workflow.

To install and use dmgcanvas, select the “dmgcanvas Tool” menu item from the “DMG Canvas” application menu, then select the location from the popup below where you would like the symbolic link pointing to dmgcanvas to be created in and click the “Create Link” button.

For the latest documentation, execute the dmgcanvas tool with no arguments. Usage:

$ dmgcanvas [verb] <pathToTemplate> <pathToDestinationDiskImage> [options]

Verbs:
    build
        Builds a partial disk image ('Build and Pause')
    finalize
        Finalizes a partial disk image
    (none)
        Builds a complete finalized disk image.
        
Options:
    -v <name> 
    -volume <name> 
    -volumeName <name> 
        Sets the name of the mounted volume in Finder
    -volumeIcon <path> 
    -identity <code signing identity> 
        The disk image will be code signed with a certificate with the given identity,
        overriding any identity specified in the template.
        Note that macOS 10.15 Catalina requires the dmg also be notarized to open.
    -notarizationAppleID <appleid> 
        When provided, the disk image will be uploaded to Apple for Notarization.
        Note that notarization requires the disk image be code signed.
    -notarizationPassword <password> 
        The App-Specific Password that can be used for Notarization with the Apple ID.
        See https://support.apple.com/en-us/HT204397  
    -notarizationASCProvider <asc-provider> 
    -notarizationPrimaryBundleID <primary-bundle-id>  
        Include the primary-bundle-id flag—which is required—to specify an identifier
        that helps you keep track of automated correspondence from the notarization
        service. The value you give doesn’t need to match the bundle identifier of the
        submitted app or have any particular value. It only needs to make sense to you.
        The notarization service includes the value whenever it emails you regarding
        the given notarization submission.  
    -backgroundImage <path> 
    -setFilePath <file name> <new file path> 
        Sets the file path for a file (given by name) which is in the template document.
        dmgcanvas will copy the file at the given path into the disk image instead of
        the path used when creating the document. The name of the file in the disk image
        will be that of the file at the specified file path, not the name as shown in the
        disk image template. This workflow can sometimes be than relying on relative or
        absolute paths specified when the template is made.
    -setTextString <textObjectIdentifier> <new string> 
        Sets the string in an existing text object in the disk image's background.