1
0

nsis.rst 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. CPack NSIS Generator
  2. --------------------
  3. CPack Nullsoft Scriptable Install System (NSIS) generator specific options.
  4. .. versionchanged:: 3.22
  5. The NSIS generator requires NSIS 3.03 or newer.
  6. Variables specific to CPack NSIS generator
  7. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  8. The following variables are specific to the graphical installers built
  9. on Windows Nullsoft Scriptable Install System.
  10. .. variable:: CPACK_NSIS_INSTALL_ROOT
  11. The default installation directory presented to the end user by the NSIS
  12. installer is under this root dir. The full directory presented to the end
  13. user is: ``${CPACK_NSIS_INSTALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY}``
  14. .. variable:: CPACK_NSIS_MUI_ICON
  15. An icon filename. The name of a ``*.ico`` file used as the main icon for the
  16. generated install program.
  17. .. variable:: CPACK_NSIS_MUI_UNIICON
  18. An icon filename. The name of a ``*.ico`` file used as the main icon for the
  19. generated uninstall program.
  20. .. variable:: CPACK_NSIS_INSTALLER_MUI_ICON_CODE
  21. undocumented.
  22. .. variable:: CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP
  23. .. versionadded:: 3.5
  24. The filename of a bitmap to use as the NSIS ``MUI_WELCOMEFINISHPAGE_BITMAP``.
  25. .. variable:: CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP
  26. .. versionadded:: 3.5
  27. The filename of a bitmap to use as the NSIS ``MUI_UNWELCOMEFINISHPAGE_BITMAP``.
  28. .. variable:: CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS
  29. Extra NSIS commands that will be added to the beginning of the install
  30. Section, before your install tree is available on the target system.
  31. .. variable:: CPACK_NSIS_EXTRA_INSTALL_COMMANDS
  32. Extra NSIS commands that will be added to the end of the install Section,
  33. after your install tree is available on the target system.
  34. .. variable:: CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
  35. Extra NSIS commands that will be added to the uninstall Section, before
  36. your install tree is removed from the target system.
  37. .. variable:: CPACK_NSIS_COMPRESSOR
  38. The arguments that will be passed to the NSIS ``SetCompressor`` command.
  39. .. variable:: CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL
  40. Ask about uninstalling previous versions first. If this is set to ``ON``,
  41. then an installer will look for previous installed versions and if one is
  42. found, ask the user whether to uninstall it before proceeding with the
  43. install.
  44. .. variable:: CPACK_NSIS_MODIFY_PATH
  45. Modify ``PATH`` toggle. If this is set to ``ON``, then an extra page will appear
  46. in the installer that will allow the user to choose whether the program
  47. directory should be added to the system ``PATH`` variable.
  48. .. variable:: CPACK_NSIS_DISPLAY_NAME
  49. The display name string that appears in the Windows *Apps & features*
  50. in *Control Panel*
  51. .. variable:: CPACK_NSIS_PACKAGE_NAME
  52. The title displayed at the top of the installer.
  53. .. variable:: CPACK_NSIS_INSTALLED_ICON_NAME
  54. A path to the executable that contains the installer icon.
  55. .. variable:: CPACK_NSIS_HELP_LINK
  56. URL to a web site providing assistance in installing your application.
  57. .. variable:: CPACK_NSIS_URL_INFO_ABOUT
  58. URL to a web site providing more information about your application.
  59. .. variable:: CPACK_NSIS_CONTACT
  60. Contact information for questions and comments about the installation
  61. process.
  62. .. variable:: CPACK_NSIS_<compName>_INSTALL_DIRECTORY
  63. .. versionadded:: 3.7
  64. Custom install directory for the specified component ``<compName>`` instead
  65. of ``$INSTDIR``.
  66. .. variable:: CPACK_NSIS_CREATE_ICONS_EXTRA
  67. Additional NSIS commands for creating *Start Menu* shortcuts.
  68. .. variable:: CPACK_NSIS_DELETE_ICONS_EXTRA
  69. Additional NSIS commands to uninstall *Start Menu* shortcuts.
  70. .. variable:: CPACK_NSIS_EXECUTABLES_DIRECTORY
  71. Creating NSIS *Start Menu* links assumes that they are in ``bin`` unless this
  72. variable is set. For example, you would set this to ``exec`` if your
  73. executables are in an exec directory.
  74. .. variable:: CPACK_NSIS_MUI_FINISHPAGE_RUN
  75. Specify an executable to add an option to run on the finish page of the
  76. NSIS installer.
  77. .. variable:: CPACK_NSIS_MENU_LINKS
  78. Specify links in ``[application]`` menu. This should contain a list of pair
  79. ``link`` ``link name``. The link may be a URL or a path relative to
  80. installation prefix. Like:
  81. .. code-block:: cmake
  82. set(CPACK_NSIS_MENU_LINKS
  83. "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake.html"
  84. "CMake Help" "https://cmake.org" "CMake Web Site")
  85. .. variable:: CPACK_NSIS_UNINSTALL_NAME
  86. .. versionadded:: 3.17
  87. Specify the name of the program to uninstall the version.
  88. Default is ``Uninstall``.
  89. .. variable:: CPACK_NSIS_WELCOME_TITLE
  90. .. versionadded:: 3.17
  91. The title to display on the top of the page for the welcome page.
  92. .. variable:: CPACK_NSIS_WELCOME_TITLE_3LINES
  93. .. versionadded:: 3.17
  94. Display the title in the welcome page on 3 lines instead of 2.
  95. .. variable:: CPACK_NSIS_FINISH_TITLE
  96. .. versionadded:: 3.17
  97. The title to display on the top of the page for the finish page.
  98. .. variable:: CPACK_NSIS_FINISH_TITLE_3LINES
  99. .. versionadded:: 3.17
  100. Display the title in the finish page on 3 lines instead of 2.
  101. .. variable:: CPACK_NSIS_MUI_HEADERIMAGE
  102. .. versionadded:: 3.17
  103. The image to display on the header of installers pages.
  104. .. variable:: CPACK_NSIS_MANIFEST_DPI_AWARE
  105. .. versionadded:: 3.18
  106. If set, declares that the installer is DPI-aware.
  107. .. variable:: CPACK_NSIS_BRANDING_TEXT
  108. .. versionadded:: 3.20
  109. If set, updates the text at the bottom of the install window.
  110. To set the string to blank, use a space (" ").
  111. .. variable:: CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION
  112. .. versionadded:: 3.20
  113. If set, trim down the size of the control to the size of the branding text string.
  114. Allowed values for this variable are ``LEFT``, ``CENTER`` or ``RIGHT``.
  115. If not specified, the default behavior is ``LEFT``.
  116. .. variable:: CPACK_NSIS_EXECUTABLE
  117. .. versionadded:: 3.21
  118. If set, specify the name of the NSIS executable. Default is ``makensis``.
  119. .. variable:: CPACK_NSIS_IGNORE_LICENSE_PAGE
  120. .. versionadded:: 3.22
  121. If set, do not display the page containing the license during installation.
  122. .. variable:: CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS
  123. .. versionadded:: 3.25
  124. This variable is a :ref:`semicolon-separated list <CMake Language Lists>` of
  125. arguments to prepend to the nsis script to run.
  126. If the arguments do not start with a ``/`` or a ``-``, it will add one
  127. automatically to the corresponding arguments.
  128. The command that will be run is::
  129. makensis.exe <preArgs>... "nsisFileName.nsi" <postArgs>...
  130. where ``<preArgs>...`` is constructed from ``CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS``
  131. and ``<postArgs>...`` is constructed from ``CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS``.
  132. .. variable:: CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS
  133. .. versionadded:: 3.25
  134. This variable is a :ref:`semicolon-separated list <CMake Language Lists>` of
  135. arguments to append to the nsis script to run.
  136. If the arguments do not start with a ``/`` or a ``-``, it will add one
  137. automatically to the corresponding arguments.
  138. The command that will be run is::
  139. makensis.exe <preArgs>... "nsisFileName.nsi" <postArgs>...
  140. where ``<preArgs>...`` is constructed from ``CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS``
  141. and ``<postArgs>...`` is constructed from ``CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS``.
  142. .. variable:: CPACK_NSIS_CRC_CHECK
  143. .. versionadded:: 4.2
  144. Specifies whether or not the installer will perform a CRC on itself before
  145. allowing an install.
  146. Allowed values for this variable are ``on``, ``off``, and ``force``.
  147. If not specified, the default behavior is ``on``.