[cmake-commits] hoffman committed cmCPackNSISGenerator.cxx 1.21 1.22

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Sep 18 15:16:23 EDT 2007


Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv9886/Source/CPack

Modified Files:
	cmCPackNSISGenerator.cxx 
Log Message:
ENH: allow for desktop link to be created and fix chop of last char in PATH on uninstall


Index: cmCPackNSISGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackNSISGenerator.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- cmCPackNSISGenerator.cxx	18 Jun 2007 13:00:33 -0000	1.21
+++ cmCPackNSISGenerator.cxx	18 Sep 2007 19:16:21 -0000	1.22
@@ -241,6 +241,20 @@
         << std::endl;
       deleteStr << "  Delete \"$SMPROGRAMS\\$MUI_TEMP\\" << linkName
         << ".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()))
+        {
+        str << "  StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n";
+        str << "    CreateShortCut \"$DESKTOP\\"
+            << linkName << ".lnk\" \"$INSTDIR\\bin\\" << execName << ".exe\""
+            << std::endl;
+        deleteStr << "  StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n";
+        deleteStr << "    Delete \"$DESKTOP\\" << linkName
+                  << ".lnk\"" << std::endl;
+        }
       }
     this->SetOptionIfNotSet("CPACK_NSIS_CREATE_ICONS", str.str().c_str());
     this->SetOptionIfNotSet("CPACK_NSIS_DELETE_ICONS", 



More information about the Cmake-commits mailing list