[Cmake-commits] CMake branch, next, updated. v2.8.3-1228-g6bdb5e4
David Cole
david.cole at kitware.com
Thu Jan 6 16:51:58 EST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 6bdb5e43a0d7c88d55f7c759275d5f7436f86d25 (commit)
via bee514c3611f7a7b972d9ade14f94c0f25bc001e (commit)
via 702c8f8ba79591744449244ed47a5181fdf68a63 (commit)
via fec32328b17662d44bfa7769e672529c24e1697f (commit)
from 91642b90ad8c83572747e979831c0afe29741e17 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6bdb5e43a0d7c88d55f7c759275d5f7436f86d25
commit 6bdb5e43a0d7c88d55f7c759275d5f7436f86d25
Merge: 91642b9 bee514c
Author: David Cole <david.cole at kitware.com>
AuthorDate: Thu Jan 6 16:51:52 2011 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 6 16:51:52 2011 -0500
Merge topic 'cpack-nsis-changes' into next
bee514c Add CPack NSIS MUI_FINISHPAGE_RUN support (#11144)
702c8f8 Add CPACK_NSIS_EXECUTABLES_DIRECTORY (#7828)
fec3232 Allow NSIS package or uninstall icon (#11143)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bee514c3611f7a7b972d9ade14f94c0f25bc001e
commit bee514c3611f7a7b972d9ade14f94c0f25bc001e
Author: Mike McQuaid <mike at mikemcquaid.com>
AuthorDate: Thu Jan 6 13:44:50 2011 +0000
Commit: David Cole <david.cole at kitware.com>
CommitDate: Thu Jan 6 16:21:36 2011 -0500
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.
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@
+ at 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())
{
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=702c8f8ba79591744449244ed47a5181fdf68a63
commit 702c8f8ba79591744449244ed47a5181fdf68a63
Author: Mike McQuaid <mike at mikemcquaid.com>
AuthorDate: Thu Jan 6 12:48:47 2011 +0000
Commit: David Cole <david.cole at kitware.com>
CommitDate: Thu Jan 6 16:21:23 2011 -0500
Add CPACK_NSIS_EXECUTABLES_DIRECTORY (#7828)
NSIS installers default to assuming the executables exist in a
directory named "bin" under the installation directory. As this
isn't usual for Windows programs, the addition of this variable
allows the customization of this directory and links still to be
created correctly.
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 7033e31..dc65b5a 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -257,6 +257,11 @@
# CPACK_NSIS_DELETE_ICONS_EXTRA -Additional NSIS commands to
# uninstall start menu shortcuts.
#
+# CPACK_NSIS_EXECUTABLES_DIRECTORY - Creating NSIS start menu links
+# assumes that they are in 'bin' unless this variable is set.
+# For example, you would set this to 'exec' if your executables are
+# in an exec directory.
+#
# The following variable is specific to installers build on Mac OS X
# using PackageMaker:
#
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index f3ebf30..d27ab0a 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -421,10 +421,13 @@ int cmCPackNSISGenerator::InitializeInternal()
return 0;
}
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str());
+ this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin");
const char* cpackPackageExecutables
= this->GetOption("CPACK_PACKAGE_EXECUTABLES");
const char* cpackPackageDeskTopLinks
= this->GetOption("CPACK_CREATE_DESKTOP_LINKS");
+ const char* cpackNsisExecutablesDirectory
+ = this->GetOption("CPACK_NSIS_EXECUTABLES_DIRECTORY");
std::vector<std::string> cpackPackageDesktopLinksVector;
if(cpackPackageDeskTopLinks)
{
@@ -472,7 +475,8 @@ int cmCPackNSISGenerator::InitializeInternal()
++ it;
std::string linkName = *it;
str << " CreateShortCut \"$SMPROGRAMS\\$STARTMENU_FOLDER\\"
- << linkName << ".lnk\" \"$INSTDIR\\bin\\" << execName << ".exe\""
+ << linkName << ".lnk\" \"$INSTDIR\\"
+ << cpackNsisExecutablesDirectory << "\\" << execName << ".exe\""
<< std::endl;
deleteStr << " Delete \"$SMPROGRAMS\\$MUI_TEMP\\" << linkName
<< ".lnk\"" << std::endl;
@@ -486,7 +490,8 @@ int cmCPackNSISGenerator::InitializeInternal()
{
str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n";
str << " CreateShortCut \"$DESKTOP\\"
- << linkName << ".lnk\" \"$INSTDIR\\bin\\" << execName << ".exe\""
+ << linkName << ".lnk\" \"$INSTDIR\\"
+ << cpackNsisExecutablesDirectory << "\\" << execName << ".exe\""
<< std::endl;
deleteStr << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n";
deleteStr << " Delete \"$DESKTOP\\" << linkName
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fec32328b17662d44bfa7769e672529c24e1697f
commit fec32328b17662d44bfa7769e672529c24e1697f
Author: Mike McQuaid <mike at mikemcquaid.com>
AuthorDate: Thu Jan 6 12:35:48 2011 +0000
Commit: David Cole <david.cole at kitware.com>
CommitDate: Thu Jan 6 15:14:38 2011 -0500
Allow NSIS package or uninstall icon (#11143)
Previously both CPACK_NSIS_MUI_ICON and CPACK_NSIS_MUI_UNIICON
needed to be set for either to take effect. This commit allows
either to be set rather than requiring both as users may well
want to e.g. use a default uninstall icon but a custom install
icon.
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index f25866c..f3ebf30 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -129,14 +129,21 @@ int cmCPackNSISGenerator::PackageFiles()
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " << nsisInFileName
<< " to " << nsisFileName << std::endl);
if(this->IsSet("CPACK_NSIS_MUI_ICON")
- && this->IsSet("CPACK_NSIS_MUI_UNIICON"))
+ || this->IsSet("CPACK_NSIS_MUI_UNIICON"))
{
- std::string installerIconCode="!define MUI_ICON \"";
- installerIconCode += this->GetOption("CPACK_NSIS_MUI_ICON");
- installerIconCode += "\"\n";
- installerIconCode += "!define MUI_UNICON \"";
- installerIconCode += this->GetOption("CPACK_NSIS_MUI_UNIICON");
- installerIconCode += "\"\n";
+ std::string installerIconCode;
+ if(this->IsSet("CPACK_NSIS_MUI_ICON"))
+ {
+ installerIconCode += "!define MUI_ICON \"";
+ installerIconCode += this->GetOption("CPACK_NSIS_MUI_ICON");
+ installerIconCode += "\"\n";
+ }
+ if(this->IsSet("CPACK_NSIS_MUI_UNIICON"))
+ {
+ installerIconCode += "!define MUI_UNICON \"";
+ installerIconCode += this->GetOption("CPACK_NSIS_MUI_UNIICON");
+ installerIconCode += "\"\n";
+ }
this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_ICON_CODE",
installerIconCode.c_str());
}
-----------------------------------------------------------------------
Summary of changes:
Modules/CPack.cmake | 8 ++++++
Modules/NSIS.template.in | 1 +
Source/CPack/cmCPackNSISGenerator.cxx | 41 +++++++++++++++++++++++++-------
3 files changed, 41 insertions(+), 9 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list