summaryrefslogtreecommitdiffstats
path: root/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2015-02-21 16:30:31 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2015-02-21 16:30:31 (GMT)
commit279605f560312aab4dfeef4cce1c8c67d4083b4e (patch)
tree6f91cd08d36c85c5fafcdef3e70ba2207707c2c3 /Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
parent53d7dafface62d40ea795456394f7ab1d5ee6712 (diff)
downloadCMake-279605f560312aab4dfeef4cce1c8c67d4083b4e.zip
CMake-279605f560312aab4dfeef4cce1c8c67d4083b4e.tar.gz
CMake-279605f560312aab4dfeef4cce1c8c67d4083b4e.tar.bz2
CPackWIX: Add installed file properties for the creation of shortcuts.
Diffstat (limited to 'Source/CPack/WiX/cmWIXFilesSourceWriter.cxx')
-rw-r--r--Source/CPack/WiX/cmWIXFilesSourceWriter.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
index ca37699..d4698a7 100644
--- a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
@@ -28,16 +28,21 @@ cmWIXFilesSourceWriter::cmWIXFilesSourceWriter(cmCPackLog* logger,
void cmWIXFilesSourceWriter::EmitShortcut(
std::string const& id,
cmWIXShortcut const& shortcut,
- std::string const& shortcutPrefix)
+ std::string const& shortcutPrefix,
+ size_t shortcutIndex)
{
- std::string shortcutId = shortcutPrefix;
+ std::stringstream shortcutId;
+ shortcutId << shortcutPrefix << id;
- shortcutId += id;
+ if(shortcutIndex > 0)
+ {
+ shortcutId << "_" << shortcutIndex;
+ }
std::string fileId = std::string("CM_F") + id;
BeginElement("Shortcut");
- AddAttribute("Id", shortcutId);
+ AddAttribute("Id", shortcutId.str());
AddAttribute("Name", shortcut.label);
std::string target = "[#" + fileId + "]";
AddAttribute("Target", target);