mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
CPack/NSIS: Add option for setting custom makensis executable
It allows users to set a custom one without changing the PATH environment variable. Fixes: #21733
This commit is contained in:
@@ -193,3 +193,9 @@ on Windows Nullsoft Scriptable Install System.
|
||||
.. versionadded:: 3.20
|
||||
|
||||
If set, trim down the size of the control to the size of the branding text string.
|
||||
|
||||
.. variable:: CPACK_NSIS_EXECUTABLE
|
||||
|
||||
.. versionadded:: 3.21
|
||||
|
||||
If set, specify the name of the NSIS executable. Default is ``makensis``.
|
||||
|
6
Help/release/dev/cpack-nsis-executable-name.rst
Normal file
6
Help/release/dev/cpack-nsis-executable-name.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
cpack-nsis-executable-name
|
||||
--------------------------
|
||||
|
||||
* The :cpack_gen:`CPack NSIS Generator` gained a new variable
|
||||
:variable:`CPACK_NSIS_EXECUTABLE` to specify the makensis
|
||||
executable to use instead of the default one.
|
@@ -430,7 +430,9 @@ int cmCPackNSISGenerator::InitializeInternal()
|
||||
}
|
||||
#endif
|
||||
|
||||
nsisPath = cmSystemTools::FindProgram("makensis", path, false);
|
||||
this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLE", "makensis");
|
||||
nsisPath = cmSystemTools::FindProgram(
|
||||
this->GetOption("CPACK_NSIS_EXECUTABLE"), path, false);
|
||||
|
||||
if (nsisPath.empty()) {
|
||||
cmCPackLogger(
|
||||
|
Reference in New Issue
Block a user