dmg.rst 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. Defaults to
  10. CPACK_PACKAGE_FILE_NAME.
  11. .. variable:: CPACK_DMG_FORMAT
  12. The disk image format. Common values are ``UDRO`` (UDIF read-only), ``UDZO`` (UDIF
  13. zlib-compressed) or ``UDBZ`` (UDIF bzip2-compressed). Refer to ``hdiutil(1)`` for
  14. more information on other available formats. Defaults to ``UDZO``.
  15. .. variable:: CPACK_DMG_DS_STORE
  16. Path to a custom ``.DS_Store`` file. This ``.DS_Store`` file can be used to
  17. specify the Finder window position/geometry and layout (such as hidden
  18. toolbars, placement of the icons etc.). This file has to be generated by
  19. the Finder (either manually or through AppleScript) using a normal folder
  20. from which the ``.DS_Store`` file can then be extracted.
  21. .. variable:: CPACK_DMG_DS_STORE_SETUP_SCRIPT
  22. .. versionadded:: 3.5
  23. Path to a custom AppleScript file. This AppleScript is used to generate
  24. a ``.DS_Store`` file which specifies the Finder window position/geometry and
  25. layout (such as hidden toolbars, placement of the icons etc.).
  26. By specifying a custom AppleScript there is no need to use
  27. ``CPACK_DMG_DS_STORE``, as the ``.DS_Store`` that is generated by the AppleScript
  28. will be packaged.
  29. .. variable:: CPACK_DMG_BACKGROUND_IMAGE
  30. Path to an image file to be used as the background. This file will be
  31. copied to ``.background``/``background.<ext>``, where ``<ext>`` is the original image file
  32. extension. The background image is installed into the image before
  33. ``CPACK_DMG_DS_STORE_SETUP_SCRIPT`` is executed or ``CPACK_DMG_DS_STORE`` is
  34. installed. By default no background image is set.
  35. .. variable:: CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK
  36. .. versionadded:: 3.6
  37. Default behaviour is to include a symlink to ``/Applications`` in the DMG.
  38. Set this option to ``ON`` to avoid adding the symlink.
  39. .. variable:: CPACK_DMG_SLA_DIR
  40. .. versionadded:: 3.5
  41. Directory where license and menu files for different languages are stored.
  42. Setting this causes CPack to look for a ``<language>.menu.txt`` and
  43. ``<language>.license.txt`` or ``<language>.license.rtf`` file for every
  44. language defined in ``CPACK_DMG_SLA_LANGUAGES``. If both this variable and
  45. ``CPACK_RESOURCE_FILE_LICENSE`` are set, CPack will only look for the menu
  46. files and use the same license file for all languages. If both
  47. ``<language>.license.txt`` and ``<language>.license.rtf`` exist, the ``.txt``
  48. file will be used.
  49. .. versionadded:: 3.17
  50. RTF support.
  51. .. variable:: CPACK_DMG_SLA_LANGUAGES
  52. .. versionadded:: 3.5
  53. Languages for which a license agreement is provided when mounting the
  54. generated DMG. A menu file consists of 9 lines of text. The first line is
  55. is the name of the language itself, uppercase, in English (e.g. German).
  56. The other lines are translations of the following strings:
  57. - Agree
  58. - Disagree
  59. - Print
  60. - Save...
  61. - You agree to the terms of the License Agreement when you click the
  62. "Agree" button.
  63. - Software License Agreement
  64. - This text cannot be saved. The disk may be full or locked, or the file
  65. may be locked.
  66. - Unable to print. Make sure you have selected a printer.
  67. For every language in this list, CPack will try to find files
  68. ``<language>.menu.txt`` and ``<language>.license.txt`` in the directory
  69. specified by the :variable:`CPACK_DMG_SLA_DIR` variable.
  70. .. variable:: CPACK_DMG_<component>_FILE_NAME
  71. .. versionadded:: 3.17
  72. File name when packaging ``<component>`` as its own DMG
  73. (``CPACK_COMPONENTS_GROUPING`` set to IGNORE).
  74. - Default: ``CPACK_PACKAGE_FILE_NAME-<component>``
  75. .. variable:: CPACK_COMMAND_HDIUTIL
  76. Path to the ``hdiutil(1)`` command used to operate on disk image files on
  77. macOS. This variable can be used to override the automatically detected
  78. command (or specify its location if the auto-detection fails to find it).
  79. .. variable:: CPACK_COMMAND_SETFILE
  80. Path to the ``SetFile(1)`` command used to set extended attributes on files and
  81. directories on macOS. This variable can be used to override the
  82. automatically detected command (or specify its location if the
  83. auto-detection fails to find it).
  84. .. variable:: CPACK_COMMAND_REZ
  85. Path to the ``Rez(1)`` command used to compile resources on macOS. This
  86. variable can be used to override the automatically detected command (or
  87. specify its location if the auto-detection fails to find it).