[Cmake-commits] CMake branch, next, updated. v2.8.3-1007-g2274047
David Cole
david.cole at kitware.com
Fri Dec 17 13:38:10 EST 2010
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 22740473008aeb09bfa8e0ba271f55f5252b0f3d (commit)
via cd9aa73f3a40b20ea6414779e4057ac236314d86 (commit)
from e3881deec56f6a18ec73b879be359c29b54c395f (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=22740473008aeb09bfa8e0ba271f55f5252b0f3d
commit 22740473008aeb09bfa8e0ba271f55f5252b0f3d
Merge: e3881de cd9aa73
Author: David Cole <david.cole at kitware.com>
AuthorDate: Fri Dec 17 13:38:08 2010 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Dec 17 13:38:08 2010 -0500
Merge topic 'fix-8210-find-makensis-in-path' into next
cd9aa73 CPack: look for makensis in the PATH (#8210)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cd9aa73f3a40b20ea6414779e4057ac236314d86
commit cd9aa73f3a40b20ea6414779e4057ac236314d86
Author: David Cole <david.cole at kitware.com>
AuthorDate: Fri Dec 17 13:29:10 2010 -0500
Commit: David Cole <david.cole at kitware.com>
CommitDate: Fri Dec 17 13:29:10 2010 -0500
CPack: look for makensis in the PATH (#8210)
Previously, we would search in the Windows registry for the path
to makensis, and fail immediately if we could not read the registry
value, assuming that it was simply not installed.
This change looks for makensis in the PATH even if the registry value
is not there, enabling the scenario where makensis is installed without
admin privileges and never even touches HKEY_LOCAL_MACHINE during the
non-admin install.
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index d0eda81..f25866c 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -337,6 +337,7 @@ int cmCPackNSISGenerator::InitializeInternal()
<< std::endl);
std::vector<std::string> path;
std::string nsisPath;
+ bool gotRegValue = true;
#ifdef _WIN32
if ( !cmsys::SystemTools::ReadRegistryValue(
@@ -346,24 +347,37 @@ int cmCPackNSISGenerator::InitializeInternal()
if ( !cmsys::SystemTools::ReadRegistryValue(
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath) )
{
- cmCPackLogger
- (cmCPackLog::LOG_ERROR,
- "Cannot find NSIS registry value. This is usually caused by NSIS "
- "not being installed. Please install NSIS from "
- "http://nsis.sourceforge.net"
- << std::endl);
- return 0;
+ gotRegValue = false;
}
}
- path.push_back(nsisPath);
+
+ if (gotRegValue)
+ {
+ path.push_back(nsisPath);
+ }
#endif
+
nsisPath = cmSystemTools::FindProgram("makensis", path, false);
+
if ( nsisPath.empty() )
{
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find NSIS compiler"
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Cannot find NSIS compiler makensis: likely it is not installed, "
+ "or not in your PATH"
<< std::endl);
+
+ if (!gotRegValue)
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR,
+ "Could not read NSIS registry value. This is usually caused by "
+ "NSIS not being installed. Please install NSIS from "
+ "http://nsis.sourceforge.net"
+ << std::endl);
+ }
+
return 0;
}
+
std::string nsisCmd = "\"" + nsisPath + "\" " NSIS_OPT "VERSION";
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Test NSIS version: "
<< nsisCmd.c_str() << std::endl);
-----------------------------------------------------------------------
Summary of changes:
Source/CPack/cmCPackNSISGenerator.cxx | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list