MantisBT - CMake
View Issue Details
0008325CMakeCPackpublic2008-12-22 16:302016-06-10 14:30
Naram Qashat 
Bill Hoffman 
normalminoralways
closedmoved 
CMake-2-6 
 
0008325: CPACK_CREATE_DESKTOP_LINKS and CPACK_CREATE_DESKTOP_LINK_ExeName don't work for NSIS Generator
If I set either of the above variables, the NSIS script created doesn't even create a desktop link at all. Looking at the source code of Source/CPack/cmCPackNSISGenerator.cxx for all versions of 2.6.x (2.6.0, 2.6.1, and 2.6.2) shows that it doesn't even do anything with CPACK_CREATE_DESKTOP_LINKS except try to output it as debugging, and it incorrectly appends linkName, not sourceName, to the end of CPACK_CREATE_DESKTOP_LINK_ when searching for those. Even the RC for 2.6.3 doesn't have this fixed.

I'm not sure what can be done to fix CPACK_CREATE_DESKTOP_LINKS, but inside cmCPackNSISGenerator::CreateMenuLinks, towards the end where it has "desktop += linkName", linkName should be replaced with sourceName.
No tags attached.
Issue History
2008-12-22 16:30Naram QashatNew Issue
2008-12-29 14:04Bill HoffmanNote Added: 0014450
2008-12-29 14:04Bill HoffmanStatusnew => assigned
2008-12-29 14:04Bill HoffmanAssigned To => Bill Hoffman
2008-12-29 14:20Naram QashatNote Added: 0014451
2016-06-10 14:27Kitware RobotNote Added: 0041486
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0014450)
Bill Hoffman   
2008-12-29 14:04   
It works for CMake itself...

The code is here:
  if(cpackPackageDesktopLinksVector.size() &&
         std::find(cpackPackageDesktopLinksVector.begin(),
                   cpackPackageDesktopLinksVector.end(),
                   execName)
         != cpackPackageDesktopLinksVector.end())
        {
        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;
        }

Can you show an example?
(0014451)
Naram Qashat   
2008-12-29 14:20   
It looks like I missed that section of code when I was looking. So never mind there.

However, the latter issue with CPACK_CREATE_DESKTOP_LINK_* is still incorrect in the code.
(0041486)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.