dmg.rst 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. Path to a custom AppleScript file. This AppleScript is used to generate
  23. a ``.DS_Store`` file which specifies the Finder window position/geometry and
  24. layout (such as hidden toolbars, placement of the icons etc.).
  25. By specifying a custom AppleScript there is no need to use
  26. ``CPACK_DMG_DS_STORE``, as the ``.DS_Store`` that is generated by the AppleScript
  27. will be packaged.
  28. .. variable:: CPACK_DMG_BACKGROUND_IMAGE
  29. Path to an image file to be used as the background. This file will be
  30. copied to ``.background``/``background.<ext>``, where ``<ext>`` is the original image file
  31. extension. The background image is installed into the image before
  32. ``CPACK_DMG_DS_STORE_SETUP_SCRIPT`` is executed or ``CPACK_DMG_DS_STORE`` is
  33. installed. By default no background image is set.
  34. .. variable:: CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK
  35. Default behaviour is to include a symlink to ``/Applications`` in the DMG.
  36. Set this option to ``ON`` to avoid adding the symlink.
  37. .. variable:: CPACK_DMG_SLA_DIR
  38. Directory where license and menu files for different languages are stored.
  39. Setting this causes CPack to look for a ``<language>.menu.txt`` and
  40. ``<language>.license.txt`` file for every language defined in
  41. ``CPACK_DMG_SLA_LANGUAGES``. If both this variable and
  42. ``CPACK_RESOURCE_FILE_LICENSE`` are set, CPack will only look for the menu
  43. files and use the same license file for all languages.
  44. .. variable:: CPACK_DMG_SLA_LANGUAGES
  45. Languages for which a license agreement is provided when mounting the
  46. generated DMG. A menu file consists of 9 lines of text. The first line is
  47. is the name of the language itself, uppercase, in English (e.g. German).
  48. The other lines are translations of the following strings:
  49. - Agree
  50. - Disagree
  51. - Print
  52. - Save...
  53. - You agree to the terms of the License Agreement when you click the
  54. "Agree" button.
  55. - Software License Agreement
  56. - This text cannot be saved. The disk may be full or locked, or the file
  57. may be locked.
  58. - Unable to print. Make sure you have selected a printer.
  59. For every language in this list, CPack will try to find files
  60. ``<language>.menu.txt`` and ``<language>.license.txt`` in the directory
  61. specified by the :variable:`CPACK_DMG_SLA_DIR` variable.
  62. .. variable:: CPACK_COMMAND_HDIUTIL
  63. Path to the ``hdiutil(1)`` command used to operate on disk image files on
  64. macOS. This variable can be used to override the automatically detected
  65. command (or specify its location if the auto-detection fails to find it).
  66. .. variable:: CPACK_COMMAND_SETFILE
  67. Path to the ``SetFile(1)`` command used to set extended attributes on files and
  68. directories on macOS. This variable can be used to override the
  69. automatically detected command (or specify its location if the
  70. auto-detection fails to find it).
  71. .. variable:: CPACK_COMMAND_REZ
  72. Path to the ``Rez(1)`` command used to compile resources on macOS. This
  73. variable can be used to override the automatically detected command (or
  74. specify its location if the auto-detection fails to find it).