summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-10-29 12:11:44 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-10-29 12:11:44 (GMT)
commit02f79c72426ec24efb597ddfdb298336f650c801 (patch)
tree8cf678608e65c185be3db1d987114d313c4443c8 /Source/CPack
parent37bd33ecea6678aa15fff654ea577f9af7957eda (diff)
downloadCMake-02f79c72426ec24efb597ddfdb298336f650c801.zip
CMake-02f79c72426ec24efb597ddfdb298336f650c801.tar.gz
CMake-02f79c72426ec24efb597ddfdb298336f650c801.tar.bz2
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
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx31
1 files changed, 25 insertions, 6 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index f742d8e..99618e1 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -295,15 +295,34 @@ void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str,
++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_";