CPack DragNDrop Generator¶
The DragNDrop CPack generator (macOS) creates a DMG image.
Variables specific to CPack DragNDrop generator¶
The following variables are specific to the DragNDrop installers built on macOS:
-
CPACK_DMG_VOLUME_NAME¶ The volume name of the generated disk image. Defaults to CPACK_PACKAGE_FILE_NAME.
-
CPACK_DMG_FORMAT¶ The disk image format. Common values are
UDRO(UDIF read-only),UDZO(UDIF zlib-compressed) orUDBZ(UDIF bzip2-compressed). Refer tohdiutil(1)for more information on other available formats. Defaults toUDZO.
-
CPACK_DMG_DS_STORE¶ Path to a custom
.DS_Storefile. This.DS_Storefile can be used to specify the Finder window position/geometry and layout (such as hidden toolbars, placement of the icons etc.). This file has to be generated by the Finder (either manually or through AppleScript) using a normal folder from which the.DS_Storefile can then be extracted.
-
CPACK_DMG_DS_STORE_SETUP_SCRIPT¶ Path to a custom AppleScript file. This AppleScript is used to generate a
.DS_Storefile which specifies the Finder window position/geometry and layout (such as hidden toolbars, placement of the icons etc.). By specifying a custom AppleScript there is no need to useCPACK_DMG_DS_STORE, as the.DS_Storethat is generated by the AppleScript will be packaged.
-
CPACK_DMG_BACKGROUND_IMAGE¶ Path to an image file to be used as the background. This file will be copied to
.background/background.<ext>, where<ext>is the original image file extension. The background image is installed into the image beforeCPACK_DMG_DS_STORE_SETUP_SCRIPTis executed orCPACK_DMG_DS_STOREis installed. By default no background image is set.
-
CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK¶ Default behaviour is to include a symlink to
/Applicationsin the DMG. Set this option toONto avoid adding the symlink.
-
CPACK_DMG_SLA_DIR¶ Directory where license and menu files for different languages are stored. Setting this causes CPack to look for a
<language>.menu.txtand<language>.license.txtfile for every language defined inCPACK_DMG_SLA_LANGUAGES. If both this variable andCPACK_RESOURCE_FILE_LICENSEare set, CPack will only look for the menu files and use the same license file for all languages.
-
CPACK_DMG_SLA_LANGUAGES¶ Languages for which a license agreement is provided when mounting the generated DMG. A menu file consists of 9 lines of text. The first line is is the name of the language itself, uppercase, in English (e.g. German). The other lines are translations of the following strings:
- Agree
- Disagree
- Save…
- You agree to the terms of the License Agreement when you click the “Agree” button.
- Software License Agreement
- This text cannot be saved. The disk may be full or locked, or the file may be locked.
- Unable to print. Make sure you have selected a printer.
For every language in this list, CPack will try to find files
<language>.menu.txtand<language>.license.txtin the directory specified by theCPACK_DMG_SLA_DIRvariable.
-
CPACK_COMMAND_HDIUTIL¶ Path to the
hdiutil(1)command used to operate on disk image files on macOS. This variable can be used to override the automatically detected command (or specify its location if the auto-detection fails to find it).
-
CPACK_COMMAND_SETFILE¶ Path to the
SetFile(1)command used to set extended attributes on files and directories on macOS. This variable can be used to override the automatically detected command (or specify its location if the auto-detection fails to find it).
-
CPACK_COMMAND_REZ¶ Path to the
Rez(1)command used to compile resources on macOS. This variable can be used to override the automatically detected command (or specify its location if the auto-detection fails to find it).