ifw.rst 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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 Mac OS X.
  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' (Mac OS X),
  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_WIZARD_DEFAULT_WIDTH
  87. Default width of the wizard in pixels. Setting a banner image will override this.
  88. .. variable:: CPACK_IFW_PACKAGE_WIZARD_DEFAULT_HEIGHT
  89. Default height of the wizard in pixels. Setting a watermark image will override this.
  90. .. variable:: CPACK_IFW_PACKAGE_TITLE_COLOR
  91. Color of the titles and subtitles (takes an HTML color code, such as "#88FF33").
  92. .. variable:: CPACK_IFW_PACKAGE_START_MENU_DIRECTORY
  93. Name of the default program group for the product in the Windows Start menu.
  94. By default used :variable:`CPACK_IFW_PACKAGE_NAME`.
  95. .. variable:: CPACK_IFW_TARGET_DIRECTORY
  96. Default target directory for installation.
  97. By default used
  98. "@ApplicationsDir@/:variable:`CPACK_PACKAGE_INSTALL_DIRECTORY`"
  99. You can use predefined variables.
  100. .. variable:: CPACK_IFW_ADMIN_TARGET_DIRECTORY
  101. Default target directory for installation with administrator rights.
  102. You can use predefined variables.
  103. .. variable:: CPACK_IFW_PACKAGE_GROUP
  104. The group, which will be used to configure the root package
  105. .. variable:: CPACK_IFW_PACKAGE_NAME
  106. The root package name, which will be used if configuration group is not
  107. specified
  108. .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME
  109. Filename of the generated maintenance tool.
  110. The platform-specific executable file extension is appended.
  111. By default used QtIFW_ defaults (``maintenancetool``).
  112. .. variable:: CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR
  113. Set to ``OFF`` if the target directory should not be deleted when uninstalling.
  114. Is ``ON`` by default
  115. .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE
  116. Filename for the configuration of the generated maintenance tool.
  117. By default used QtIFW_ defaults (``maintenancetool.ini``).
  118. .. variable:: CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS
  119. Set to ``ON`` if the installation path can contain non-ASCII characters.
  120. Is ``ON`` for QtIFW_ less 2.0 tools.
  121. .. variable:: CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH
  122. Set to ``OFF`` if the installation path cannot contain space characters.
  123. Is ``ON`` for QtIFW_ less 2.0 tools.
  124. .. variable:: CPACK_IFW_PACKAGE_CONTROL_SCRIPT
  125. Filename for a custom installer control script.
  126. .. variable:: CPACK_IFW_PACKAGE_RESOURCES
  127. List of additional resources ('.qrc' files) to include in the installer
  128. binary.
  129. You can use :command:`cpack_ifw_add_package_resources` command to resolve
  130. relative paths.
  131. .. variable:: CPACK_IFW_PACKAGE_FILE_EXTENSION
  132. The target binary extension.
  133. On Linux, the name of the target binary is automatically extended with
  134. '.run', if you do not specify the extension.
  135. On Windows, the target is created as an application with the extension
  136. '.exe', which is automatically added, if not supplied.
  137. On Mac, the target is created as an DMG disk image with the extension
  138. '.dmg', which is automatically added, if not supplied.
  139. .. variable:: CPACK_IFW_REPOSITORIES_ALL
  140. The list of remote repositories.
  141. The default value of this variable is computed by CPack and contains
  142. all repositories added with command :command:`cpack_ifw_add_repository`
  143. or updated with command :command:`cpack_ifw_update_repository`.
  144. .. variable:: CPACK_IFW_DOWNLOAD_ALL
  145. If this is ``ON`` all components will be downloaded.
  146. By default is ``OFF`` or used value
  147. from ``CPACK_DOWNLOAD_ALL`` if set
  148. Components
  149. """"""""""
  150. .. variable:: CPACK_IFW_RESOLVE_DUPLICATE_NAMES
  151. Resolve duplicate names when installing components with groups.
  152. .. variable:: CPACK_IFW_PACKAGES_DIRECTORIES
  153. Additional prepared packages dirs that will be used to resolve
  154. dependent components.
  155. .. variable:: CPACK_IFW_REPOSITORIES_DIRECTORIES
  156. Additional prepared repository dirs that will be used to resolve and
  157. repack dependent components. This feature available only
  158. since QtIFW_ 3.1.
  159. Tools
  160. """""
  161. .. variable:: CPACK_IFW_FRAMEWORK_VERSION
  162. The version of used QtIFW_ tools.
  163. .. variable:: CPACK_IFW_BINARYCREATOR_EXECUTABLE
  164. The path to "binarycreator" command line client.
  165. This variable is cached and may be configured if needed.
  166. .. variable:: CPACK_IFW_REPOGEN_EXECUTABLE
  167. The path to "repogen" command line client.
  168. This variable is cached and may be configured if needed.
  169. .. variable:: CPACK_IFW_INSTALLERBASE_EXECUTABLE
  170. The path to "installerbase" installer executable base.
  171. This variable is cached and may be configured if needed.
  172. .. variable:: CPACK_IFW_DEVTOOL_EXECUTABLE
  173. The path to "devtool" command line client.
  174. This variable is cached and may be configured if needed.
  175. Online installer
  176. ^^^^^^^^^^^^^^^^
  177. By default CPack IFW generator makes offline installer. This means that all
  178. components will be packaged into a binary file.
  179. To make a component downloaded, you must set the ``DOWNLOADED`` option in
  180. :command:`cpack_add_component`.
  181. Then you would use the command :command:`cpack_configure_downloads`.
  182. If you set ``ALL`` option all components will be downloaded.
  183. You also can use command :command:`cpack_ifw_add_repository` and
  184. variable :variable:`CPACK_IFW_DOWNLOAD_ALL` for more specific configuration.
  185. CPack IFW generator creates "repository" dir in current binary dir. You
  186. would copy content of this dir to specified ``site`` (``url``).
  187. See Also
  188. ^^^^^^^^
  189. Qt Installer Framework Manual:
  190. * Index page:
  191. http://doc.qt.io/qtinstallerframework/index.html
  192. * Component Scripting:
  193. http://doc.qt.io/qtinstallerframework/scripting.html
  194. * Predefined Variables:
  195. http://doc.qt.io/qtinstallerframework/scripting.html#predefined-variables
  196. * Promoting Updates:
  197. http://doc.qt.io/qtinstallerframework/ifw-updates.html
  198. Download Qt Installer Framework for you platform from Qt site:
  199. http://download.qt.io/official_releases/qt-installer-framework