4 CPack Nullsoft Scriptable Install System (NSIS) generator specific options.
6 .. versionchanged:: 3.22
7 The NSIS generator requires NSIS 3.03 or newer.
9 Variables specific to CPack NSIS generator
10 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 The following variables are specific to the graphical installers built
13 on Windows Nullsoft Scriptable Install System.
15 .. variable:: CPACK_NSIS_INSTALL_ROOT
17 The default installation directory presented to the end user by the NSIS
18 installer is under this root dir. The full directory presented to the end
19 user is: ``${CPACK_NSIS_INSTALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY}``
21 .. variable:: CPACK_NSIS_MUI_ICON
23 An icon filename. The name of a ``*.ico`` file used as the main icon for the
24 generated install program.
26 .. variable:: CPACK_NSIS_MUI_UNIICON
28 An icon filename. The name of a ``*.ico`` file used as the main icon for the
29 generated uninstall program.
31 .. variable:: CPACK_NSIS_INSTALLER_MUI_ICON_CODE
35 .. variable:: CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP
39 The filename of a bitmap to use as the NSIS ``MUI_WELCOMEFINISHPAGE_BITMAP``.
41 .. variable:: CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP
45 The filename of a bitmap to use as the NSIS ``MUI_UNWELCOMEFINISHPAGE_BITMAP``.
47 .. variable:: CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS
49 Extra NSIS commands that will be added to the beginning of the install
50 Section, before your install tree is available on the target system.
52 .. variable:: CPACK_NSIS_EXTRA_INSTALL_COMMANDS
54 Extra NSIS commands that will be added to the end of the install Section,
55 after your install tree is available on the target system.
57 .. variable:: CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
59 Extra NSIS commands that will be added to the uninstall Section, before
60 your install tree is removed from the target system.
62 .. variable:: CPACK_NSIS_COMPRESSOR
64 The arguments that will be passed to the NSIS `SetCompressor` command.
66 .. variable:: CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL
68 Ask about uninstalling previous versions first. If this is set to ``ON``,
69 then an installer will look for previous installed versions and if one is
70 found, ask the user whether to uninstall it before proceeding with the
73 .. variable:: CPACK_NSIS_MODIFY_PATH
75 Modify ``PATH`` toggle. If this is set to ``ON``, then an extra page will appear
76 in the installer that will allow the user to choose whether the program
77 directory should be added to the system ``PATH`` variable.
79 .. variable:: CPACK_NSIS_DISPLAY_NAME
81 The display name string that appears in the Windows `Apps & features`
84 .. variable:: CPACK_NSIS_PACKAGE_NAME
86 The title displayed at the top of the installer.
88 .. variable:: CPACK_NSIS_INSTALLED_ICON_NAME
90 A path to the executable that contains the installer icon.
92 .. variable:: CPACK_NSIS_HELP_LINK
94 URL to a web site providing assistance in installing your application.
96 .. variable:: CPACK_NSIS_URL_INFO_ABOUT
98 URL to a web site providing more information about your application.
100 .. variable:: CPACK_NSIS_CONTACT
102 Contact information for questions and comments about the installation
105 .. variable:: CPACK_NSIS_<compName>_INSTALL_DIRECTORY
107 .. versionadded:: 3.7
109 Custom install directory for the specified component ``<compName>`` instead
112 .. variable:: CPACK_NSIS_CREATE_ICONS_EXTRA
114 Additional NSIS commands for creating `Start Menu` shortcuts.
116 .. variable:: CPACK_NSIS_DELETE_ICONS_EXTRA
118 Additional NSIS commands to uninstall `Start Menu` shortcuts.
120 .. variable:: CPACK_NSIS_EXECUTABLES_DIRECTORY
122 Creating NSIS `Start Menu` links assumes that they are in ``bin`` unless this
123 variable is set. For example, you would set this to ``exec`` if your
124 executables are in an exec directory.
126 .. variable:: CPACK_NSIS_MUI_FINISHPAGE_RUN
128 Specify an executable to add an option to run on the finish page of the
131 .. variable:: CPACK_NSIS_MENU_LINKS
133 Specify links in ``[application]`` menu. This should contain a list of pair
134 ``link`` ``link name``. The link may be a URL or a path relative to
135 installation prefix. Like::
137 set(CPACK_NSIS_MENU_LINKS
138 "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake.html"
139 "CMake Help" "https://cmake.org" "CMake Web Site")
141 .. variable:: CPACK_NSIS_UNINSTALL_NAME
143 .. versionadded:: 3.17
145 Specify the name of the program to uninstall the version.
146 Default is ``Uninstall``.
148 .. variable:: CPACK_NSIS_WELCOME_TITLE
150 .. versionadded:: 3.17
152 The title to display on the top of the page for the welcome page.
154 .. variable:: CPACK_NSIS_WELCOME_TITLE_3LINES
156 .. versionadded:: 3.17
158 Display the title in the welcome page on 3 lines instead of 2.
160 .. variable:: CPACK_NSIS_FINISH_TITLE
162 .. versionadded:: 3.17
164 The title to display on the top of the page for the finish page.
166 .. variable:: CPACK_NSIS_FINISH_TITLE_3LINES
168 .. versionadded:: 3.17
170 Display the title in the finish page on 3 lines instead of 2.
172 .. variable:: CPACK_NSIS_MUI_HEADERIMAGE
174 .. versionadded:: 3.17
176 The image to display on the header of installers pages.
178 .. variable:: CPACK_NSIS_MANIFEST_DPI_AWARE
180 .. versionadded:: 3.18
182 If set, declares that the installer is DPI-aware.
184 .. variable:: CPACK_NSIS_BRANDING_TEXT
186 .. versionadded:: 3.20
188 If set, updates the text at the bottom of the install window.
189 To set the string to blank, use a space (" ").
191 .. variable:: CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION
193 .. versionadded:: 3.20
195 If set, trim down the size of the control to the size of the branding text string.
196 Allowed values for this variable are ``LEFT``, ``CENTER`` or ``RIGHT``.
197 If not specified, the default behavior is ``LEFT``.
199 .. variable:: CPACK_NSIS_EXECUTABLE
201 .. versionadded:: 3.21
203 If set, specify the name of the NSIS executable. Default is ``makensis``.
205 .. variable:: CPACK_NSIS_IGNORE_LICENSE_PAGE
207 .. versionadded:: 3.22
209 If set, do not display the page containing the license during installation.
211 .. variable:: CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS
213 .. versionadded:: 3.25
215 This variable is a :ref:`semicolon-separated list <CMake Language Lists>` of
216 arguments to prepend to the nsis script to run.
217 If the arguments do not start with a ``/`` or a ``-``, it will add one
218 automatically to the corresponding arguments.
219 The command that will be run is::
221 makensis.exe <preArgs>... "nsisFileName.nsi" <postArgs>...
223 where ``<preArgs>...`` is constructed from ``CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS``
224 and ``<postArgs>...`` is constructed from ``CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS``.
227 .. variable:: CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS
229 .. versionadded:: 3.25
231 This variable is a :ref:`semicolon-separated list <CMake Language Lists>` of
232 arguments to append to the nsis script to run.
233 If the arguments do not start with a ``/`` or a ``-``, it will add one
234 automatically to the corresponding arguments.
235 The command that will be run is::
237 makensis.exe <preArgs>... "nsisFileName.nsi" <postArgs>...
239 where ``<preArgs>...`` is constructed from ``CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS``
240 and ``<postArgs>...`` is constructed from ``CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS``.