diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-10-29 12:11:44 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-10-29 12:11:44 (GMT) |
commit | 02f79c72426ec24efb597ddfdb298336f650c801 (patch) | |
tree | 8cf678608e65c185be3db1d987114d313c4443c8 /Source/CPack | |
parent | 37bd33ecea6678aa15fff654ea577f9af7957eda (diff) | |
download | CMake-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.cxx | 31 |
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_"; |