summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CPack.cmake3
-rw-r--r--Modules/NSIS.template.in1
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx11
3 files changed, 15 insertions, 0 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index dc65b5a..5f9f05f 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -262,6 +262,9 @@
# For example, you would set this to 'exec' if your executables are
# in an exec directory.
#
+# CPACK_NSIS_MUI_FINISHPAGE_RUN - Specify an executable to add an option
+# to run on the finish page of the NSIS installer.
+#
# The following variable is specific to installers build on Mac OS X
# using PackageMaker:
#
diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
index 776bc07..ffe0515 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -540,6 +540,7 @@ FunctionEnd
@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
@CPACK_NSIS_INSTALLER_ICON_CODE@
@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
+@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@
;--------------------------------
;Pages
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())
{