[cmake-commits] hoffman committed cmCPackNSISGenerator.cxx 1.28 1.29
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Nov 7 13:12:00 EST 2007
Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv15606/Source/CPack
Modified Files:
cmCPackNSISGenerator.cxx
Log Message:
ENH: change CPACK_CREATE_DESKTOP_LINKS to something that can handle spaces in the name of the exectuable
Index: cmCPackNSISGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackNSISGenerator.cxx,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- cmCPackNSISGenerator.cxx 5 Nov 2007 19:34:36 -0000 1.28
+++ cmCPackNSISGenerator.cxx 7 Nov 2007 18:11:58 -0000 1.29
@@ -228,10 +228,34 @@
<< nsisVersion << std::endl);
return 0;
}
-
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str());
const char* cpackPackageExecutables
= this->GetOption("CPACK_PACKAGE_EXECUTABLES");
+ const char* cpackPackageDeskTopLinks
+ = this->GetOption("CPACK_CREATE_DESKTOP_LINKS");
+ std::vector<std::string> cpackPackageDesktopLinksVector;
+ if(cpackPackageDeskTopLinks)
+ {
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: "
+ << cpackPackageDeskTopLinks << std::endl);
+
+ cmSystemTools::
+ ExpandListArgument(cpackPackageDeskTopLinks,
+ cpackPackageDesktopLinksVector);
+ for(std::vector<std::string>::iterator i =
+ cpackPackageDesktopLinksVector.begin(); i !=
+ cpackPackageDesktopLinksVector.end(); ++i)
+ {
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: "
+ << *i << std::endl);
+ }
+ }
+ else
+ {
+ cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: "
+ << "not set" << std::endl);
+
+ }
if ( cpackPackageExecutables )
{
cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackPackageExecutables: "
@@ -263,9 +287,11 @@
<< ".lnk\"" << std::endl;
// see if CPACK_CREATE_DESKTOP_LINK_ExeName is on
// if so add a desktop link
- std::string desktop = "CPACK_CREATE_DESKTOP_LINK_";
- desktop += execName;
- if(this->IsSet(desktop.c_str()))
+ if(cpackPackageDesktopLinksVector.size() &&
+ std::find(cpackPackageDesktopLinksVector.begin(),
+ cpackPackageDesktopLinksVector.end(),
+ execName)
+ != cpackPackageDesktopLinksVector.end())
{
str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n";
str << " CreateShortCut \"$DESKTOP\\"
More information about the Cmake-commits
mailing list