[cmake-commits] hoffman committed cmCPackNSISGenerator.cxx 1.24 1.25
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Oct 29 08:11:46 EDT 2007
Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv25026/Source/CPack
Modified Files:
cmCPackNSISGenerator.cxx
Log Message:
ENH: add ability to set installer icons, links to web pages, nsis code in the icon section of the template, and ability to escape variables correctly
Index: cmCPackNSISGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackNSISGenerator.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- cmCPackNSISGenerator.cxx 19 Oct 2007 16:03:16 -0000 1.24
+++ cmCPackNSISGenerator.cxx 29 Oct 2007 12:11:44 -0000 1.25
@@ -295,15 +295,34 @@
++it )
{
std::string sourceName = *it;
+ bool url = false;
+ if(sourceName.find("http:") == 0)
+ {
+ url = true;
+ }
/* convert / to \\ */
- cmSystemTools::ReplaceString(sourceName, "/", "\\");
+ if(!url)
+ {
+ cmSystemTools::ReplaceString(sourceName, "/", "\\");
+ }
++ it;
std::string linkName = *it;
- str << " CreateShortCut \"$SMPROGRAMS\\$STARTMENU_FOLDER\\"
- << linkName << ".lnk\" \"$INSTDIR\\" << sourceName << "\""
- << std::endl;
- deleteStr << " Delete \"$SMPROGRAMS\\$MUI_TEMP\\" << linkName
- << ".lnk\"" << std::endl;
+ if(!url)
+ {
+ str << " CreateShortCut \"$SMPROGRAMS\\$STARTMENU_FOLDER\\"
+ << linkName << ".lnk\" \"$INSTDIR\\" << sourceName << "\""
+ << std::endl;
+ deleteStr << " Delete \"$SMPROGRAMS\\$MUI_TEMP\\" << linkName
+ << ".lnk\"" << std::endl;
+ }
+ else
+ {
+ str << " WriteINIStr \"$SMPROGRAMS\\$STARTMENU_FOLDER\\"
+ << linkName << ".url\" \"InternetShortcut\" \"URL\" \"" << sourceName << "\""
+ << std::endl;
+ deleteStr << " Delete \"$SMPROGRAMS\\$MUI_TEMP\\" << linkName
+ << ".url\"" << std::endl;
+ }
// see if CPACK_CREATE_DESKTOP_LINK_ExeName is on
// if so add a desktop link
std::string desktop = "CPACK_CREATE_DESKTOP_LINK_";
More information about the Cmake-commits
mailing list