ifw.rst 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. CPack IFW Generator
  2. -------------------
  3. See :module:`CPackIFW` for details on the CPackIFW module.
  4. .. _QtIFW: http://doc.qt.io/qtinstallerframework/index.html
  5. Overview
  6. ^^^^^^^^
  7. CPack ``IFW`` generator helps you to create online and offline
  8. binary cross-platform installers with a graphical user interface.
  9. CPack IFW generator prepares project installation and generates configuration
  10. and meta information for QtIFW_ tools.
  11. The QtIFW_ provides a set of tools and utilities to create
  12. installers for the supported desktop Qt platforms: Linux, Microsoft Windows,
  13. and macOS.
  14. You should also install QtIFW_ to use CPack ``IFW`` generator.
  15. Hints
  16. ^^^^^
  17. Generally, the CPack ``IFW`` generator automatically finds QtIFW_ tools,
  18. but if you don't use a default path for installation of the QtIFW_ tools,
  19. the path may be specified in either a CMake or an environment variable:
  20. .. variable:: CPACK_IFW_ROOT
  21. An CMake variable which specifies the location of the QtIFW_ tool suite.
  22. The variable will be cached in the ``CPackConfig.cmake`` file and used at
  23. CPack runtime.
  24. .. variable:: QTIFWDIR
  25. An environment variable which specifies the location of the QtIFW_ tool
  26. suite.
  27. .. note::
  28. The specified path should not contain "bin" at the end
  29. (for example: "D:\\DevTools\\QtIFW2.0.5").
  30. The :variable:`CPACK_IFW_ROOT` variable has a higher priority and overrides
  31. the value of the :variable:`QTIFWDIR` variable.
  32. Internationalization
  33. ^^^^^^^^^^^^^^^^^^^^
  34. Some variables and command arguments support internationalization via
  35. CMake script. This is an optional feature.
  36. Installers created by QtIFW_ tools have built-in support for
  37. internationalization and many phrases are localized to many languages,
  38. but this does not apply to the description of the your components and groups
  39. that will be distributed.
  40. Localization of the description of your components and groups is useful for
  41. users of your installers.
  42. A localized variable or argument can contain a single default value, and a
  43. set of pairs the name of the locale and the localized value.
  44. For example:
  45. .. code-block:: cmake
  46. set(LOCALIZABLE_VARIABLE "Default value"
  47. en "English value"
  48. en_US "American value"
  49. en_GB "Great Britain value"
  50. )
  51. Variables
  52. ^^^^^^^^^
  53. You can use the following variables to change behavior of CPack ``IFW``
  54. generator.
  55. Debug
  56. """""
  57. .. variable:: CPACK_IFW_VERBOSE
  58. Set to ``ON`` to enable addition debug output.
  59. By default is ``OFF``.
  60. Package
  61. """""""
  62. .. variable:: CPACK_IFW_PACKAGE_TITLE
  63. Name of the installer as displayed on the title bar.
  64. By default used :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`.
  65. .. variable:: CPACK_IFW_PACKAGE_PUBLISHER
  66. Publisher of the software (as shown in the Windows Control Panel).
  67. By default used :variable:`CPACK_PACKAGE_VENDOR`.
  68. .. variable:: CPACK_IFW_PRODUCT_URL
  69. URL to a page that contains product information on your web site.
  70. .. variable:: CPACK_IFW_PACKAGE_ICON
  71. Filename for a custom installer icon. The actual file is '.icns' (macOS),
  72. '.ico' (Windows). No functionality on Unix.
  73. .. variable:: CPACK_IFW_PACKAGE_WINDOW_ICON
  74. Filename for a custom window icon in PNG format for the Installer
  75. application.
  76. .. variable:: CPACK_IFW_PACKAGE_LOGO
  77. Filename for a logo is used as QWizard::LogoPixmap.
  78. .. variable:: CPACK_IFW_PACKAGE_WATERMARK
  79. Filename for a watermark is used as QWizard::WatermarkPixmap.
  80. .. variable:: CPACK_IFW_PACKAGE_BANNER
  81. Filename for a banner is used as QWizard::BannerPixmap.
  82. .. variable:: CPACK_IFW_PACKAGE_BACKGROUND
  83. Filename for an image used as QWizard::BackgroundPixmap (only used by MacStyle).
  84. .. variable:: CPACK_IFW_PACKAGE_WIZARD_STYLE
  85. Wizard style to be used ("Modern", "Mac", "Aero" or "Classic").
  86. .. variable:: CPACK_IFW_PACKAGE_STYLE_SHEET
  87. Filename for a stylesheet.
  88. .. variable:: CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH
  89. Default width of the wizard in pixels. Setting a banner image will override this.
  90. .. variable:: CPACK_IFW_PACKAGE_WIZARD_DEFAULT_HEIGHT
  91. Default height of the wizard in pixels. Setting a watermark image will override this.
  92. .. variable:: CPACK_IFW_PACKAGE_TITLE_COLOR
  93. Color of the titles and subtitles (takes an HTML color code, such as "#88FF33").
  94. .. variable:: CPACK_IFW_PACKAGE_START_MENU_DIRECTORY
  95. Name of the default program group for the product in the Windows Start menu.
  96. By default used :variable:`CPACK_IFW_PACKAGE_NAME`.
  97. .. variable:: CPACK_IFW_TARGET_DIRECTORY
  98. Default target directory for installation.
  99. By default used
  100. "@ApplicationsDir@/:variable:`CPACK_PACKAGE_INSTALL_DIRECTORY`"
  101. You can use predefined variables.
  102. .. variable:: CPACK_IFW_ADMIN_TARGET_DIRECTORY
  103. Default target directory for installation with administrator rights.
  104. You can use predefined variables.
  105. .. variable:: CPACK_IFW_PACKAGE_GROUP
  106. The group, which will be used to configure the root package
  107. .. variable:: CPACK_IFW_PACKAGE_NAME
  108. The root package name, which will be used if configuration group is not
  109. specified
  110. .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME
  111. Filename of the generated maintenance tool.
  112. The platform-specific executable file extension is appended.
  113. By default used QtIFW_ defaults (``maintenancetool``).
  114. .. variable:: CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR
  115. Set to ``OFF`` if the target directory should not be deleted when uninstalling.
  116. Is ``ON`` by default
  117. .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE
  118. Filename for the configuration of the generated maintenance tool.
  119. By default used QtIFW_ defaults (``maintenancetool.ini``).
  120. .. variable:: CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS
  121. Set to ``ON`` if the installation path can contain non-ASCII characters.
  122. Is ``ON`` for QtIFW_ less 2.0 tools.
  123. .. variable:: CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH
  124. Set to ``OFF`` if the installation path cannot contain space characters.
  125. Is ``ON`` for QtIFW_ less 2.0 tools.
  126. .. variable:: CPACK_IFW_PACKAGE_CONTROL_SCRIPT
  127. Filename for a custom installer control script.
  128. .. variable:: CPACK_IFW_PACKAGE_RESOURCES
  129. List of additional resources ('.qrc' files) to include in the installer
  130. binary.
  131. You can use :command:`cpack_ifw_add_package_resources` command to resolve
  132. relative paths.
  133. .. variable:: CPACK_IFW_PACKAGE_FILE_EXTENSION
  134. The target binary extension.
  135. On Linux, the name of the target binary is automatically extended with
  136. '.run', if you do not specify the extension.
  137. On Windows, the target is created as an application with the extension
  138. '.exe', which is automatically added, if not supplied.
  139. On Mac, the target is created as an DMG disk image with the extension
  140. '.dmg', which is automatically added, if not supplied.
  141. .. variable:: CPACK_IFW_REPOSITORIES_ALL
  142. The list of remote repositories.
  143. The default value of this variable is computed by CPack and contains
  144. all repositories added with command :command:`cpack_ifw_add_repository`
  145. or updated with command :command:`cpack_ifw_update_repository`.
  146. .. variable:: CPACK_IFW_DOWNLOAD_ALL
  147. If this is ``ON`` all components will be downloaded.
  148. By default is ``OFF`` or used value
  149. from ``CPACK_DOWNLOAD_ALL`` if set
  150. Components
  151. """"""""""
  152. .. variable:: CPACK_IFW_RESOLVE_DUPLICATE_NAMES
  153. Resolve duplicate names when installing components with groups.
  154. .. variable:: CPACK_IFW_PACKAGES_DIRECTORIES
  155. Additional prepared packages dirs that will be used to resolve
  156. dependent components.
  157. .. variable:: CPACK_IFW_REPOSITORIES_DIRECTORIES
  158. Additional prepared repository dirs that will be used to resolve and
  159. repack dependent components. This feature available only
  160. since QtIFW_ 3.1.
  161. Tools
  162. """""
  163. .. variable:: CPACK_IFW_FRAMEWORK_VERSION
  164. The version of used QtIFW_ tools.
  165. .. variable:: CPACK_IFW_BINARYCREATOR_EXECUTABLE
  166. The path to "binarycreator" command line client.
  167. This variable is cached and may be configured if needed.
  168. .. variable:: CPACK_IFW_REPOGEN_EXECUTABLE
  169. The path to "repogen" command line client.
  170. This variable is cached and may be configured if needed.
  171. .. variable:: CPACK_IFW_INSTALLERBASE_EXECUTABLE
  172. The path to "installerbase" installer executable base.
  173. This variable is cached and may be configured if needed.
  174. .. variable:: CPACK_IFW_DEVTOOL_EXECUTABLE
  175. The path to "devtool" command line client.
  176. This variable is cached and may be configured if needed.
  177. Online installer
  178. ^^^^^^^^^^^^^^^^
  179. By default CPack IFW generator makes offline installer. This means that all
  180. components will be packaged into a binary file.
  181. To make a component downloaded, you must set the ``DOWNLOADED`` option in
  182. :command:`cpack_add_component`.
  183. Then you would use the command :command:`cpack_configure_downloads`.
  184. If you set ``ALL`` option all components will be downloaded.
  185. You also can use command :command:`cpack_ifw_add_repository` and
  186. variable :variable:`CPACK_IFW_DOWNLOAD_ALL` for more specific configuration.
  187. CPack IFW generator creates "repository" dir in current binary dir. You
  188. would copy content of this dir to specified ``site`` (``url``).
  189. See Also
  190. ^^^^^^^^
  191. Qt Installer Framework Manual:
  192. * Index page:
  193. http://doc.qt.io/qtinstallerframework/index.html
  194. * Component Scripting:
  195. http://doc.qt.io/qtinstallerframework/scripting.html
  196. * Predefined Variables:
  197. http://doc.qt.io/qtinstallerframework/scripting.html#predefined-variables
  198. * Promoting Updates:
  199. http://doc.qt.io/qtinstallerframework/ifw-updates.html
  200. Download Qt Installer Framework for you platform from Qt site:
  201. http://download.qt.io/official_releases/qt-installer-framework