You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

162 lines
5.7 KiB

  1. CPack DragNDrop Generator
  2. -------------------------
  3. The DragNDrop CPack generator (macOS) creates a DMG image.
  4. Variables specific to CPack DragNDrop generator
  5. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  6. The following variables are specific to the DragNDrop installers built
  7. on macOS:
  8. .. variable:: CPACK_DMG_VOLUME_NAME
  9. The volume name of the generated disk image.
  10. :Default: :variable:`CPACK_PACKAGE_FILE_NAME`
  11. .. variable:: CPACK_DMG_FORMAT
  12. The disk image format.
  13. :Default: ``UDZO``
  14. Common values are ``UDRO`` (UDIF read-only), ``UDZO`` (UDIF
  15. zlib-compressed) or ``UDBZ`` (UDIF bzip2-compressed). Refer to ``hdiutil(1)`` for
  16. more information on other available formats.
  17. .. variable:: CPACK_DMG_DS_STORE
  18. Path to a custom ``.DS_Store`` file. This ``.DS_Store`` file can be used to
  19. specify the Finder window position/geometry and layout (such as hidden
  20. toolbars, placement of the icons etc.). This file has to be generated by
  21. the Finder (either manually or through AppleScript) using a normal folder
  22. from which the ``.DS_Store`` file can then be extracted.
  23. .. variable:: CPACK_DMG_DS_STORE_SETUP_SCRIPT
  24. .. versionadded:: 3.5
  25. Path to a custom AppleScript file. This AppleScript is used to generate
  26. a ``.DS_Store`` file which specifies the Finder window position/geometry and
  27. layout (such as hidden toolbars, placement of the icons etc.).
  28. By specifying a custom AppleScript there is no need to use
  29. ``CPACK_DMG_DS_STORE``, as the ``.DS_Store`` that is generated by the AppleScript
  30. will be packaged.
  31. .. variable:: CPACK_DMG_BACKGROUND_IMAGE
  32. :Default:
  33. Path to an image file to be used as the background. This file will be
  34. copied to ``.background``/``background.<ext>``, where ``<ext>`` is the original image file
  35. extension. The background image is installed into the image before
  36. ``CPACK_DMG_DS_STORE_SETUP_SCRIPT`` is executed or ``CPACK_DMG_DS_STORE`` is
  37. installed. By default no background image is set.
  38. .. variable:: CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK
  39. .. versionadded:: 3.6
  40. Default behavior is to include a symlink to ``/Applications`` in the DMG.
  41. Set this option to ``ON`` to avoid adding the symlink.
  42. .. variable:: CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE
  43. .. versionadded:: 3.23
  44. :Default: ``OFF``
  45. Control whether :variable:`CPACK_RESOURCE_FILE_LICENSE`, if set to a
  46. non-default value, is used as the license agreement provided when
  47. mounting the DMG. If :variable:`!CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE` is
  48. not set, :manual:`cpack(1)` defaults to off.
  49. In a CMake project that uses the :module:`CPack` module to generate
  50. ``CPackConfig.cmake``, :variable:`!CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE`
  51. must be explicitly enabled by the project to activate the SLA.
  52. See policy :policy:`CMP0133`.
  53. .. note::
  54. This option was added in response to macOS 12.0's deprecation of
  55. the ``hdiutil udifrez`` command to make its use optional.
  56. CPack 3.22 and below always use :variable:`CPACK_RESOURCE_FILE_LICENSE`,
  57. if set to a non-default value, as the DMG license.
  58. .. variable:: CPACK_DMG_SLA_DIR
  59. .. versionadded:: 3.5
  60. Directory where license and menu files for different languages are stored.
  61. Setting this causes CPack to look for a ``<language>.menu.txt`` and
  62. ``<language>.license.txt`` or ``<language>.license.rtf`` file for every
  63. language defined in :variable:`CPACK_DMG_SLA_LANGUAGES`. If both this variable and
  64. :variable:`CPACK_RESOURCE_FILE_LICENSE` are set, CPack will only look for the menu
  65. files and use the same license file for all languages. If both
  66. ``<language>.license.txt`` and ``<language>.license.rtf`` exist, the ``.txt``
  67. file will be used.
  68. .. versionadded:: 3.17
  69. RTF support.
  70. .. variable:: CPACK_DMG_SLA_LANGUAGES
  71. .. versionadded:: 3.5
  72. Languages for which a license agreement is provided when mounting the
  73. generated DMG. A menu file consists of 9 lines of text. The first line is
  74. is the name of the language itself, uppercase, in English (e.g. German).
  75. The other lines are translations of the following strings:
  76. - Agree
  77. - Disagree
  78. - Print
  79. - Save...
  80. - You agree to the terms of the License Agreement when you click the
  81. "Agree" button.
  82. - Software License Agreement
  83. - This text cannot be saved. The disk may be full or locked, or the file
  84. may be locked.
  85. - Unable to print. Make sure you have selected a printer.
  86. For every language in this list, CPack will try to find files
  87. ``<language>.menu.txt`` and ``<language>.license.txt`` in the directory
  88. specified by the :variable:`CPACK_DMG_SLA_DIR` variable.
  89. .. variable:: CPACK_DMG_<component>_FILE_NAME
  90. .. versionadded:: 3.17
  91. File name when packaging ``<component>`` as its own DMG
  92. (:variable:`CPACK_COMPONENTS_GROUPING` set to ``IGNORE``).
  93. :Default: ``CPACK_PACKAGE_FILE_NAME-<component>``
  94. .. variable:: CPACK_DMG_FILESYSTEM
  95. .. versionadded:: 3.21
  96. :Default: ``HFS+``
  97. The filesystem format. Common values are ``APFS`` and ``HFS+``.
  98. See ``man hdiutil`` for a full list of supported formats.
  99. .. variable:: CPACK_COMMAND_HDIUTIL
  100. Path to the ``hdiutil(1)`` command used to operate on disk image files on
  101. macOS. This variable can be used to override the automatically detected
  102. command (or specify its location if the auto-detection fails to find it).
  103. .. variable:: CPACK_COMMAND_SETFILE
  104. Path to the ``SetFile(1)`` command used to set extended attributes on files and
  105. directories on macOS. This variable can be used to override the
  106. automatically detected command (or specify its location if the
  107. auto-detection fails to find it).
  108. .. variable:: CPACK_COMMAND_REZ
  109. Path to the ``Rez(1)`` command used to compile resources on macOS. This
  110. variable can be used to override the automatically detected command (or
  111. specify its location if the auto-detection fails to find it).