[cmake-developers] [PATCH] add options to set the bitmap for NSIS installer left side

Colin Tracey ctracey at nvidia.com
Fri Oct 2 17:27:31 EDT 2015


>From 5cd81e17a51c5dc74e494c39a5f496f8e54a5bbf Mon Sep 17 00:00:00 2001
From: Colin Tracey <ctracey at nvidia.com>
Date: Fri, 25 Sep 2015 15:06:08 -0500
Subject: [PATCH] add options to set the bitmap for NSIS installer left side

set MUI_WELCOMEFINISHPAGE_BITMAP
set MUI_UNWELCOMEFINISHPAGE_BITMAP
---
Modules/NSIS.template.in              |  2 ++
Source/CPack/cmCPackNSISGenerator.cxx | 18 ++++++++++++++++++
2 files changed, 20 insertions(+)

diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
index 76310af..1ef3d28 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -542,6 +542,8 @@ FunctionEnd
; Define some macro setting for the gui
@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
@CPACK_NSIS_INSTALLER_ICON_CODE@
+ at CPACK_NSIS_INSTALLER_MUI_WELCOMEFINISH_CODE@
+ at CPACK_NSIS_INSTALLER_MUI_UNWELCOMEFINISH_CODE@
@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 6cdda28..5f8d7aa 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -158,6 +158,24 @@ int cmCPackNSISGenerator::PackageFiles()
                             installerIconCode.c_str());
     }
+  if (this->IsSet("CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP"))
+    {
+    std::string installerBitmapCode = "!define MUI_WELCOMEFINISHPAGE_BITMAP \"";
+    installerBitmapCode += this->GetOption("CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP");
+    installerBitmapCode += "\"\n";
+    this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_WELCOMEFINISH_CODE",
+                            installerBitmapCode.c_str());
+    }
+
+  if (this->IsSet("CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP"))
+    {
+    std::string installerBitmapCode = "!define MUI_UNWELCOMEFINISHPAGE_BITMAP \"";
+    installerBitmapCode += this->GetOption("CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP");
+    installerBitmapCode += "\"\n";
+    this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_UNWELCOMEFINISH_CODE",
+                            installerBitmapCode.c_str());
+    }
+
   if(this->IsSet("CPACK_NSIS_MUI_FINISHPAGE_RUN"))
     {
     std::string installerRunCode = "!define MUI_FINISHPAGE_RUN \"$INSTDIR\\";
--
1.9.5.github.0


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20151002/178bbc73/attachment.html>


More information about the cmake-developers mailing list