CPackNSIS: Add options to set the bitmap for NSIS installer left side

set MUI_WELCOMEFINISHPAGE_BITMAP
set MUI_UNWELCOMEFINISHPAGE_BITMAP
This commit is contained in:
Colin Tracey 2015-09-25 15:06:08 -05:00 committed by Brad King
parent 3709e950f4
commit 3758af12fa
4 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,6 @@
cpack-nsis-bitmap
-----------------
* The :module:`CPackNSIS` module learned new variables to add bitmaps to the
installer. See the :variable:`CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP`
and :variable:`CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP` variables.

View File

@ -30,6 +30,14 @@
# #
# undocumented. # undocumented.
# #
# .. variable:: CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP
#
# The filename of a bitmap to use as the NSIS MUI_WELCOMEFINISHPAGE_BITMAP.
#
# .. variable:: CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP
#
# The filename of a bitmap to use as the NSIS MUI_UNWELCOMEFINISHPAGE_BITMAP.
#
# .. variable:: CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS # .. variable:: CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS
# #
# Extra NSIS commands that will be added to the beginning of the install # Extra NSIS commands that will be added to the beginning of the install

View File

@ -542,6 +542,8 @@ FunctionEnd
; Define some macro setting for the gui ; Define some macro setting for the gui
@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@ @CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
@CPACK_NSIS_INSTALLER_ICON_CODE@ @CPACK_NSIS_INSTALLER_ICON_CODE@
@CPACK_NSIS_INSTALLER_MUI_WELCOMEFINISH_CODE@
@CPACK_NSIS_INSTALLER_MUI_UNWELCOMEFINISH_CODE@
@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@ @CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@ @CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@

View File

@ -158,6 +158,28 @@ int cmCPackNSISGenerator::PackageFiles()
installerIconCode.c_str()); 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")) if(this->IsSet("CPACK_NSIS_MUI_FINISHPAGE_RUN"))
{ {
std::string installerRunCode = "!define MUI_FINISHPAGE_RUN \"$INSTDIR\\"; std::string installerRunCode = "!define MUI_FINISHPAGE_RUN \"$INSTDIR\\";