diff options
author | Mike McQuaid <mike@mikemcquaid.com> | 2011-01-06 13:44:50 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-01-06 21:21:36 (GMT) |
commit | bee514c3611f7a7b972d9ade14f94c0f25bc001e (patch) | |
tree | f388ae1be605509a3dfc5f764a3d833556e4f469 /Source/CPack | |
parent | 702c8f8ba79591744449244ed47a5181fdf68a63 (diff) | |
download | CMake-bee514c3611f7a7b972d9ade14f94c0f25bc001e.zip CMake-bee514c3611f7a7b972d9ade14f94c0f25bc001e.tar.gz CMake-bee514c3611f7a7b972d9ade14f94c0f25bc001e.tar.bz2 |
Add CPack NSIS MUI_FINISHPAGE_RUN support (#11144)
MUI_FINISHPAGE_RUN is frequently used with NSIS and provides a checkbox
on the finish page of an installer which specifies whether the specified
executable should be run when the installer exits. This commit adds support
for this setting in CPack.
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index d27ab0a..97885d5 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -156,6 +156,17 @@ int cmCPackNSISGenerator::PackageFiles() installerIconCode.c_str()); } + if(this->IsSet("CPACK_NSIS_MUI_FINISHPAGE_RUN")) + { + std::string installerRunCode = "!define MUI_FINISHPAGE_RUN \"$INSTDIR\\"; + installerRunCode += this->GetOption("CPACK_NSIS_EXECUTABLES_DIRECTORY"); + installerRunCode += "\\"; + installerRunCode += this->GetOption("CPACK_NSIS_MUI_FINISHPAGE_RUN"); + installerRunCode += "\"\n"; + this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE", + installerRunCode.c_str()); + } + // Setup all of the component sections if (this->Components.empty()) { |